]> git.proxmox.com Git - mirror_frr.git/commitdiff
tests: topotests/lib/lutil.py: add timestamp to log of test start
authorG. Paul Ziemba <paulz@labn.net>
Sat, 19 Dec 2020 19:41:05 +0000 (11:41 -0800)
committerG. Paul Ziemba <paulz@labn.net>
Tue, 29 Dec 2020 13:34:46 +0000 (05:34 -0800)
    Timestamps in test logs are needed for correlation with messages in
    routing protocol log files. Vox populi indicates preference for
    timestamp at beginning of line.

    OLD:
    (#55) scripts/rip-show.py:61 COMMAND:r1:vtysh -c "show ip rip status": 00:0.* 00:0:wait:RIP Peers:

    NEW:
    Sat Dec 19 08:26:45 2020 (#55) scripts/rip-show.py:61 COMMAND:r1:vtysh -c "show ip rip status": 00:0.* 00:0:wait:RIP Peers:

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
tests/topotests/lib/lutil.py

index 9cbea67af1183dd612164d5e3e269932ec706846..0b6a946fdaf4d2b29075968072ae68bc1346fb99 100644 (file)
@@ -23,6 +23,7 @@ import time
 import datetime
 import json
 import math
+import time
 from lib.topolog import logger
 from mininet.net import Mininet
 
@@ -194,8 +195,9 @@ Total %-4d                                                           %-4d %d\n\
         if op != "wait":
             self.l_line += 1
         self.log(
-            "(#%d) %s:%s COMMAND:%s:%s:%s:%s:%s:"
+            "%s (#%d) %s:%s COMMAND:%s:%s:%s:%s:%s:"
             % (
+                time.asctime(),
                 self.l_total + 1,
                 self.l_filename,
                 self.l_line,