Commit 33dfd925 authored by Joachim Breitner's avatar Joachim Breitner

Test driver: Print total time spent at the end

parent 71f09183
......@@ -232,12 +232,9 @@ print 'Found', len(t_files), '.T files...'
t = getTestRun()
# Avoid cmd.exe built-in 'date' command on Windows
if not windows:
t.start_time = chop(os.popen('date').read())
else:
t.start_time = 'now'
t.start_time = time.localtime()
print 'Beginning test run at', t.start_time
print 'Beginning test run at', time.strftime("%c %Z",t.start_time)
# set stdout to unbuffered (is this the best way to do it?)
sys.stdout.flush()
......
......@@ -123,7 +123,7 @@ def getConfig():
class TestRun:
def __init__(self):
self.start_time = ''
self.start_time = None
self.total_tests = 0
self.total_test_cases = 0
self.n_framework_failures = 0
......
......@@ -12,6 +12,8 @@ import errno
import string
import re
import traceback
import time
import datetime
import copy
import glob
import types
......@@ -2114,7 +2116,10 @@ def summary(t, file):
file.write('\n')
printUnexpectedTests(file, [t.unexpected_passes, t.unexpected_failures])
file.write('OVERALL SUMMARY for test run started at '
+ t.start_time + '\n'
+ time.strftime("%c %Z", t.start_time) + '\n'
+ string.rjust(str(datetime.timedelta(seconds=
round(time.time() - time.mktime(t.start_time)))), 8)
+ ' spent to go through\n'
+ string.rjust(`t.total_tests`, 8)
+ ' total tests, which gave rise to\n'
+ string.rjust(`t.total_test_cases`, 8)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment