mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-30 19:55:11 +00:00
Modify the script to output the regressions and passes into categories. My Python-fu could use some improving...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142643 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b4c945716f
commit
b9ad624fcd
@ -62,6 +62,13 @@ def parse(file):
|
|||||||
|
|
||||||
# Diff results and look for regressions.
|
# Diff results and look for regressions.
|
||||||
def diffResults(d_old, d_new):
|
def diffResults(d_old, d_new):
|
||||||
|
regressions = {}
|
||||||
|
passes = {}
|
||||||
|
removed = ''
|
||||||
|
|
||||||
|
for x in ['compile state', 'compile time', 'exec state', 'exec time']:
|
||||||
|
regressions[x] = ''
|
||||||
|
passes[x] = ''
|
||||||
|
|
||||||
for t in sorted(d_old.keys()) :
|
for t in sorted(d_old.keys()) :
|
||||||
if d_new.has_key(t):
|
if d_new.has_key(t):
|
||||||
@ -77,13 +84,13 @@ def diffResults(d_old, d_new):
|
|||||||
|
|
||||||
if d_old[t][x] == 'PASS':
|
if d_old[t][x] == 'PASS':
|
||||||
if d_new[t][x] != 'PASS':
|
if d_new[t][x] != 'PASS':
|
||||||
print t + " *** REGRESSION (" + x + " now fails)"
|
regressions[x] += t + "\n"
|
||||||
else:
|
else:
|
||||||
if d_new[t][x] == 'PASS':
|
if d_new[t][x] == 'PASS':
|
||||||
print t + " * NEW PASS (" + x + " now fails)"
|
passes[x] += t + "\n"
|
||||||
|
|
||||||
else :
|
else :
|
||||||
print t + "*** REGRESSION (" + x + " now fails)"
|
regressions[x] += t + "\n"
|
||||||
|
|
||||||
if x == 'compile state' or x == 'exec state':
|
if x == 'compile state' or x == 'exec state':
|
||||||
continue
|
continue
|
||||||
@ -92,25 +99,53 @@ def diffResults(d_old, d_new):
|
|||||||
if not d_old[t].has_key(x) and not d_new[t].has_key(x):
|
if not d_old[t].has_key(x) and not d_new[t].has_key(x):
|
||||||
continue
|
continue
|
||||||
elif not d_new[t].has_key(x):
|
elif not d_new[t].has_key(x):
|
||||||
print t + " *** REGRESSION (" + x + ")"
|
regressions[x] += t + "\n"
|
||||||
elif not d_old[t].has_key(x):
|
elif not d_old[t].has_key(x):
|
||||||
print t + " * NEW PASS (" + x + ")"
|
passes[x] += t + "\n"
|
||||||
|
|
||||||
if math.isnan(d_old[t][x]) and math.isnan(d_new[t][x]):
|
if math.isnan(d_old[t][x]) and math.isnan(d_new[t][x]):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
elif math.isnan(d_old[t][x]) and not math.isnan(d_new[t][x]):
|
elif math.isnan(d_old[t][x]) and not math.isnan(d_new[t][x]):
|
||||||
print t + " * NEW PASS (" + x + ")"
|
passes[x] += t + "\n"
|
||||||
|
|
||||||
elif not math.isnan(d_old[t][x]) and math.isnan(d_new[t][x]):
|
elif not math.isnan(d_old[t][x]) and math.isnan(d_new[t][x]):
|
||||||
print t + " *** REGRESSION (" + x + ")"
|
regressions[x] += t + ": NaN%\n"
|
||||||
|
|
||||||
if d_new[t][x] > d_old[t][x] and d_old[t][x] > 0.0 and \
|
if d_new[t][x] > d_old[t][x] and d_old[t][x] > 0.0 and \
|
||||||
(d_new[t][x] - d_old[t][x]) / d_old[t][x] > .05:
|
(d_new[t][x] - d_old[t][x]) / d_old[t][x] > .05:
|
||||||
print t + " *** REGRESSION (" + x + ")"
|
regressions[x] += t + ": " + "{0:.1f}".format(100 * (d_new[t][x] - d_old[t][x]) / d_old[t][x]) + "%\n"
|
||||||
|
|
||||||
else :
|
else :
|
||||||
print t + ": Removed from test-suite."
|
removed += t + "\n"
|
||||||
|
|
||||||
|
if len(regressions['compile state']) != 0:
|
||||||
|
print 'REGRESSION: Compilation Failed'
|
||||||
|
print regressions['compile state']
|
||||||
|
|
||||||
|
if len(regressions['exec state']) != 0:
|
||||||
|
print 'REGRESSION: Execution Failed'
|
||||||
|
print regressions['exec state']
|
||||||
|
|
||||||
|
if len(regressions['compile time']) != 0:
|
||||||
|
print 'REGRESSION: Compilation Time'
|
||||||
|
print regressions['compile time']
|
||||||
|
|
||||||
|
if len(regressions['exec time']) != 0:
|
||||||
|
print 'REGRESSION: Execution Time'
|
||||||
|
print regressions['exec time']
|
||||||
|
|
||||||
|
if len(passes['compile state']) != 0:
|
||||||
|
print 'NEW PASSES: Compilation'
|
||||||
|
print passes['compile state']
|
||||||
|
|
||||||
|
if len(passes['exec state']) != 0:
|
||||||
|
print 'NEW PASSES: Execution'
|
||||||
|
print passes['exec state']
|
||||||
|
|
||||||
|
if len(removed) != 0:
|
||||||
|
print 'REMOVED TESTS'
|
||||||
|
print removed
|
||||||
|
|
||||||
# Main
|
# Main
|
||||||
if len(sys.argv) < 3 :
|
if len(sys.argv) < 3 :
|
||||||
|
Loading…
Reference in New Issue
Block a user