]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: lutil - fix test numbering, add test number to command logging
authorLou Berger <lberger@labn.net>
Fri, 27 Apr 2018 18:00:23 +0000 (14:00 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Nov 2018 01:22:14 +0000 (20:22 -0500)
tests/topotests/lib/lutil.py

index fe134914836c301e9ef51bd498f6d2c49990813b..9be6505eeb22dde882e7b3d0d6d2759947d1958d 100755 (executable)
@@ -81,6 +81,7 @@ Test Target Summary                                                  Pass Fail\n
             f = 1
             p = 0
             self.l_fail += 1
+        self.l_total += 1
         res = "%-4d %-6s %-56s %-4d %d" % (self.l_total, target, str, p, f)
         self.log ('R:'+res)
         self.summary(res)
@@ -178,10 +179,9 @@ Total %-4d                                                           %-4d %d\n\
         global net
         if op != 'wait':
             self.l_line  += 1
-        if op == 'pass' or op == 'fail':
-            self.l_total += 1
-        self.log('%s:%s COMMAND:%s:%s:%s:%s:%s:' % \
-                 (self.l_filename, self.l_line, target, command, regexp, op, result))
+        self.log('(#%d) %s:%s COMMAND:%s:%s:%s:%s:%s:' % \
+                 (self.l_total+1,
+                  self.l_filename, self.l_line, target, command, regexp, op, result))
         if self.net == '':
             return False
         #self.log("Running %s %s" % (target, command))