mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 23:31:37 +00:00
[lit] Simplify --time-tests code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188946 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7b0cdf7bf4
commit
0dd41a99e3
@ -407,17 +407,11 @@ def main(builtinParameters = {}):
|
|||||||
print(' %s' % t.getFullName())
|
print(' %s' % t.getFullName())
|
||||||
sys.stdout.write('\n')
|
sys.stdout.write('\n')
|
||||||
|
|
||||||
if opts.timeTests:
|
if opts.timeTests and tests:
|
||||||
# Collate, in case we repeated tests.
|
# Order by time.
|
||||||
times = {}
|
test_times = [(t.getFullName(), t.elapsed)
|
||||||
for t in tests:
|
for t in tests]
|
||||||
key = t.getFullName()
|
lit.util.printHistogram(test_times, title='Tests')
|
||||||
times[key] = times.get(key, 0.) + t.elapsed
|
|
||||||
|
|
||||||
byTime = list(times.items())
|
|
||||||
byTime.sort(key = lambda item: item[1])
|
|
||||||
if byTime:
|
|
||||||
lit.util.printHistogram(byTime, title='Tests')
|
|
||||||
|
|
||||||
for name,code in (('Expected Passes ', lit.Test.PASS),
|
for name,code in (('Expected Passes ', lit.Test.PASS),
|
||||||
('Expected Failures ', lit.Test.XFAIL),
|
('Expected Failures ', lit.Test.XFAIL),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user