[Piglit] [PATCH] junit.py: Avoid special test names.

Dylan Baker baker.dylan.c at gmail.com
Fri Feb 20 12:28:48 PST 2015


This looks fine to me, though I haven't tested it.

Mark, does this seem good to you?

Reviewed-by: Dylan Baker <baker.dylan.c at gmail.com>

On Fri, Feb 20, 2015 at 11:53:50AM +0000, Jose Fonseca wrote:
> For example, Jenkins was displaying its REST API page when one navigated
> to  .../testReport/piglit.spec/ARB_occlusion_query2/api/ result.
> ---
>  framework/backends/junit.py | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/framework/backends/junit.py b/framework/backends/junit.py
> index 839c99a..ddaf826 100644
> --- a/framework/backends/junit.py
> +++ b/framework/backends/junit.py
> @@ -166,8 +166,16 @@ class JUnitBackend(FileBackend):
>          # set different root names.
>          classname = 'piglit.' + classname
>  
> +        testname += self._test_suffix
> +
> +        # Jenkins will display special pages when the test has certain names.
> +        # https://jenkins-ci.org/issue/18062
> +        # https://jenkins-ci.org/issue/19810
> +        if testname in ('api', 'search'):
> +            testname += '_'
> +
>          # Create the root element
> -        element = etree.Element('testcase', name=testname + self._test_suffix,
> +        element = etree.Element('testcase', name=testname,
>                                  classname=classname,
>                                  time=str(data['time']),
>                                  status=str(data['result']))
> -- 
> 2.1.0
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150220/44bffb31/attachment.sig>


More information about the Piglit mailing list