diff options
author | Matěj Cepl <mcepl@redhat.com> | 2011-10-04 19:39:40 +0200 |
---|---|---|
committer | Paul Berry <stereotype441@gmail.com> | 2011-10-05 17:39:04 -0700 |
commit | cc07951c197ae6e22f0dafc5a0d38381c5237884 (patch) | |
tree | f27b40723061e61db80f7315536d6f04e3dd921b /piglit-summary-html.py | |
parent | d4dcd97c3de740d6fb798ce9095e3a19e11bd86b (diff) |
Don't add slash to the start of HREFs of individual test results.
Otherwise the browser thinks they are in the root of the current
hierarchy, whereas they are in the same folder as index.html.
Signed-off-by: Matěj Cepl <mcepl@redhat.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Diffstat (limited to 'piglit-summary-html.py')
-rwxr-xr-x | piglit-summary-html.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/piglit-summary-html.py b/piglit-summary-html.py index 6e5082c00..a255a153a 100755 --- a/piglit-summary-html.py +++ b/piglit-summary-html.py @@ -148,6 +148,12 @@ def writeTestrunHtml(testrun, filename): writefile(filename, Testrun % locals()) +def hrefFromParts(codename, path): + outStr = codename + '/' + testPathToHtmlFilename(path) + if outStr[0] == '/': + outStr = outStr[1:] + return outStr + def buildTestSummary(indent, alternate, testsummary): tenindent = 10 - indent path = testsummary.path @@ -155,7 +161,7 @@ def buildTestSummary(indent, alternate, testsummary): testruns = "".join([IndexTestTestrun % { 'alternate': alternate, 'status': result.status, - 'link': result.testrun.codename + '/' + testPathToHtmlFilename(path) + 'link': hrefFromParts(result.testrun.codename, path) } for result in testsummary.results]) return IndexTest % locals() |