Skip to content
Snippets Groups Projects
Commit 22550e2d authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Added timestamps in tests (refs #20343).

parent 25066e4c
No related branches found
No related tags found
No related merge requests found
......@@ -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:')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment