[Piglit] [PATCH piglit] Don't add slash to the start of HREFs of individual test results.
Paul Berry
stereotype441 at gmail.com
Tue Oct 4 16:40:28 PDT 2011
On 4 October 2011 10:39, Matěj Cepl <mcepl at redhat.com> wrote:
> 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 at redhat.com>
> ---
> 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 6e5082c..a255a15 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()
> --
> 1.7.6.4
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
Unless someone objects I'll push this upstream tomorrow.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20111004/00548d99/attachment.html>
More information about the Piglit
mailing list