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())
|
||||
sys.stdout.write('\n')
|
||||
|
||||
if opts.timeTests:
|
||||
# Collate, in case we repeated tests.
|
||||
times = {}
|
||||
for t in tests:
|
||||
key = t.getFullName()
|
||||
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')
|
||||
if opts.timeTests and tests:
|
||||
# Order by time.
|
||||
test_times = [(t.getFullName(), t.elapsed)
|
||||
for t in tests]
|
||||
lit.util.printHistogram(test_times, title='Tests')
|
||||
|
||||
for name,code in (('Expected Passes ', lit.Test.PASS),
|
||||
('Expected Failures ', lit.Test.XFAIL),
|
||||
|
Loading…
x
Reference in New Issue
Block a user