summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2012-12-16 14:42:50 -0800
committerKenneth Graunke <kenneth@whitecape.org>2012-12-16 14:42:50 -0800
commit7fe549c2b294e8175fc836a0d1e7ef0d7984fca7 (patch)
tree418b977c1419f0a6ef83e550e359b5767a87c58b
parent351232d8f49e379051e9ca56650e00be753bea6d (diff)
add fixes/regressions reports.
-rwxr-xr-xprograms/report.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/programs/report.py b/programs/report.py
index 87ef155..57622f9 100755
--- a/programs/report.py
+++ b/programs/report.py
@@ -98,6 +98,22 @@ def broken(rs):
def changed(rs):
return any(rs[0] != r for r in rs)
+def skipped(rs):
+ return any(r == 'skip' or r is None for r in rs)
+
+def regressed(rs):
+ return any(worseThan(a, b) for (a, b) in zip(rs, rs[1:]))
+
+def fixed(rs):
+ return regressed(list(reversed(rs)))
+
+# Helper function: return True if status a is more severe than status b.
+def worseThan(a, b):
+ statuses = ['hang', 'timeout', 'crash', 'fail', 'skip', 'pass']
+ if not a or a == 'skip' or not b or b == 'skip':
+ return False
+ return statuses.index(b) < statuses.index(a)
+
#############################################################################
##### Summary page generation
#############################################################################
@@ -105,7 +121,10 @@ def changed(rs):
pages = [
('All', 'index.html', None),
('Changes', 'changes.html', changed),
- ('Problems', 'problems.html', broken)
+ ('Fixes', 'fixes.html', fixed),
+ ('Problems', 'problems.html', broken),
+ ('Skipped', 'skipped.html', skipped),
+ ('Regressions', 'regressions.html', regressed),
]
def build_navbox(current_page):