diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2012-12-17 01:15:50 -0800 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2012-12-17 01:15:50 -0800 |
commit | 82000d37194315a0a28961db834f431bb1a5814d (patch) | |
tree | 8468240d02482de93984ec3c3a9e685491acba5b | |
parent | ffde5dec5c9e45d8e79e5f97710439ad75390d75 (diff) |
more work on detail pages.
-rwxr-xr-x | programs/report.py | 19 | ||||
-rw-r--r-- | programs/templates/index.css | 17 |
2 files changed, 28 insertions, 8 deletions
diff --git a/programs/report.py b/programs/report.py index 6119899..801c179 100755 --- a/programs/report.py +++ b/programs/report.py @@ -138,10 +138,15 @@ def build_navbox(current_page): return ''.join([link(p[0], p[1]) for p in pages]) def testResult(run_name, full_name, status, detail_filename): - html = '<a class="%(status)s" href="%(link)s">%(status)s</a>' % { - 'status': status if status else 'skip', - 'link': path.join(escape(run_name), detail_filename) - } + if interesting(status): + html = '<a class="%(status)s" href="%(link)s">%(status)s</a>' % { + 'status': status if status else 'skip', + 'link': path.join(escape(run_name), detail_filename) + '#' + escape(full_name) + } + else: + html = '<span class="%(status)s">%(status)s</span>' % { + 'status': status if status else 'skip', + } return html class StackEntry: @@ -247,7 +252,7 @@ def writeSummaryHtml(run_names, results, resultsDir, page, filename, detailFilen ############################################################################# def interesting(r): - return r and r['result'] and r['result'] != 'skip' and r['result'] != 'pass' + return r and r != 'skip' # Create result<N>.html pages containing the test result details for a # single testrun. @@ -255,12 +260,12 @@ def writeDetailPages(dirname, run_name, results, filenames, col): pages = {} for test in results.keys(): r = results[test][col] - if interesting(r): + if r and interesting(r['result']): p = filenames[test] if p not in pages: pages[p] = [] - pages[p].append(templates['result_test'] % dict(r, test=test, run=run_name)) + pages[p].append(templates['result_test'] % dict(r, esc_test=escape(test), test=test, run=run_name)) for p in pages.keys(): writefile(path.join(dirname, p), diff --git a/programs/templates/index.css b/programs/templates/index.css index be6321c..f989f80 100644 --- a/programs/templates/index.css +++ b/programs/templates/index.css @@ -9,6 +9,10 @@ h1 { margin-right: 1em; } +/** + * Summary pages: + */ + #navbox { font-family: sans-serif; font-weight: bold; @@ -88,7 +92,7 @@ div.resultColumn { min-width: 5em; } -div.resultColumn a { +div.resultColumn a, div.resultColumn span { display: block; padding: 4pt; } @@ -141,3 +145,14 @@ div.group .fail:nth-child(even) { background-color: #e00505; } div.group .crash:nth-child(odd) { background-color: #111111; } div.group .crash:nth-child(even) { background-color: #000000; } +/** + * Detail pages: + */ + +div.result { + display: none; +} + +h1.pass { + background-color: #20ff20; +} |