[Piglit] [PATCH] framework/exectest.py: Set returncode to 0 when executable is missing.

Dylan Baker baker.dylan.c at gmail.com
Tue Jun 10 12:47:04 PDT 2014


On Tuesday, June 10, 2014 08:16:04 PM jfonseca at vmware.com wrote:
> From: José Fonseca <jfonseca at vmware.com>
> 
> Just like piglit_report_result(PIGLIT_SKIP) does.
> 
> Otherwise these tests are considered failures or -- with my commit
> 058e0f8a1e536b68ef43d27ada80645845a39e19 -- crashes.
> ---
>  framework/exectest.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/framework/exectest.py b/framework/exectest.py
> index a833066..a5e06ae 100644
> --- a/framework/exectest.py
> +++ b/framework/exectest.py
> @@ -205,7 +205,7 @@ class Test(object):
>                  out = ("PIGLIT: {'result': 'skip'}\n"
>                         "Test executable not found.\n")
>                  err = ""
> -                returncode = None
> +                returncode = 0
>              else:
>                  raise e

I'm not excited by this, tests that don't run shouldn't have return codes, 
especially not the 'everything is fine!' return code.

I'd prefer to fix the check that 058e0f8a1e536b68ef43d27ada80645845a39e19 
broke by replacing:
if self.result['returncode'] < 0
with
if self.result['returncode'] is not None and self.result['returncode'] < 0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140610/ec622280/attachment.sig>


More information about the Piglit mailing list