Commit 64efac0a authored by Denis Bilenko's avatar Denis Bilenko

testrunner.py: bug fix in --stats: include the names of the failed test modules

- some module don't have a single unittest; they were missed by --stats
parent c727d741
...@@ -318,12 +318,6 @@ def print_stats(options): ...@@ -318,12 +318,6 @@ def print_stats(options):
total = len(get_testcases(cursor, options.runid)) total = len(get_testcases(cursor, options.runid))
failed = get_testcases(cursor, options.runid, 'FAIL') failed = get_testcases(cursor, options.runid, 'FAIL')
timedout = get_testcases(cursor, options.runid, 'TIMEOUT') timedout = get_testcases(cursor, options.runid, 'TIMEOUT')
if failed:
print 'FAILURES: '
print ' - ' + '\n - '.join(failed)
if timedout:
print 'TIMEOUTS: '
print ' - ' + '\n - '.join(timedout)
warning_reports = [] warning_reports = []
for test, output, retcode in cursor.execute('select test, output, retcode from test where runid=?', (options.runid, )): for test, output, retcode in cursor.execute('select test, output, retcode from test where runid=?', (options.runid, )):
output_lower = (output or '').lower() output_lower = (output or '').lower()
...@@ -335,6 +329,12 @@ def print_stats(options): ...@@ -335,6 +329,12 @@ def print_stats(options):
timedout.append(test) timedout.append(test)
elif retcode != 0: elif retcode != 0:
failed.append(test) failed.append(test)
if failed:
print 'FAILURES: '
print ' - ' + '\n - '.join(failed)
if timedout:
print 'TIMEOUTS: '
print ' - ' + '\n - '.join(timedout)
if warning_reports: if warning_reports:
print 'WARNINGS: ' print 'WARNINGS: '
for test, warnings, tracebacks in warning_reports: for test, warnings, tracebacks in warning_reports:
......
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