From 22550e2d81e8a3eb4cf1750463052619cf5e1baf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Diemer?= <stephane.diemer@ubicast.eu>
Date: Wed, 15 Feb 2017 09:43:55 +0100
Subject: [PATCH] Added timestamps in tests (refs #20343).

---
 tester.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tester.py b/tester.py
index 3af48d9b..50db9491 100755
--- a/tester.py
+++ b/tester.py
@@ -156,6 +156,8 @@ class Tester():
         # Run all tests
         for name, description, command in tests:
             log('\033[1;95m-- Test "%s" --\033[0;0m' % name)
+            start_date = datetime.datetime.utcnow()
+            log('Test start: %s UTC.' % start_date.strftime('%Y-%m-%d %H:%M:%S'))
             # Run test
             p = subprocess.Popen(command, stdin=sys.stdin, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
             out, err = p.communicate()
@@ -171,6 +173,8 @@ class Tester():
                 success = False
                 exit_code = 1
                 log('Command exited with code %s.' % p.returncode)
+            end_date = datetime.datetime.utcnow()
+            log('Test end: %s UTC (duration: %s).' % (end_date.strftime('%Y-%m-%d %H:%M:%S'), end_date - start_date))
             results.append((name, description, command, success))
         # Display results
         log('\nTests results:')
-- 
GitLab