action="append",
default=[])
execution_group.add_argument("--time-tests",
- dest="timeTests",
help="Track elapsed wall time for each test",
action="store_true")
execution_group.add_argument("--no-execute",
executed_tests = [t for t in filtered_tests if t.result]
+ if opts.time_tests:
+ print_histogram(executed_tests)
+
print_results(executed_tests, elapsed, opts)
if opts.output_path:
lit_config.warning("Failed to delete temp directory '%s'" % tmp_dir)
+def print_histogram(tests):
+ test_times = [(t.getFullName(), t.result.elapsed) for t in tests]
+ lit.util.printHistogram(test_times, title='Tests')
+
+
# Status code, summary label, group label
failure_codes = [
(lit.Test.UNRESOLVED, 'Unresolved Tests', 'Unresolved'),
for (code, _, group_label) in all_codes:
print_group(code, group_label, tests_by_code[code], opts)
- if opts.timeTests and tests:
- test_times = [(t.getFullName(), t.result.elapsed) for t in tests]
- lit.util.printHistogram(test_times, title='Tests')
-
print_summary(tests_by_code, opts.quiet, elapsed)
barW = 40
hr = '-' * (barW + 34)
- print('\nSlowest %s:' % title)
+ print('Slowest %s:' % title)
print(hr)
for name, value in reversed(items[-20:]):
print('%.2fs: %s' % (value, name))
print('[%*.*fs,%*.*fs) :: [%s%s] :: [%*d/%*d]' % (
pDigits, pfDigits, i * barH, pDigits, pfDigits, (i + 1) * barH,
'*' * w, ' ' * (barW - w), cDigits, len(row), cDigits, len(items)))
+ print(hr)
class ExecuteCommandTimeoutException(Exception):