[Piglit] [PATCH] tests/igt.py: check for pass or skip before timeout
Dylan Baker
baker.dylan.c at gmail.com
Tue May 6 20:01:18 PDT 2014
On Tuesday, May 06, 2014 11:15:08 AM Thomas Wood wrote:
> Don't wait for the timeout thread if the process has already quit with
> pass or skip status.
>
> Signed-off-by: Thomas Wood <thomas.wood at intel.com>
> ---
> tests/igt.py | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tests/igt.py b/tests/igt.py
> index 7cfb6ad..7f815fe 100644
> --- a/tests/igt.py
> +++ b/tests/igt.py
> @@ -168,7 +168,11 @@ class IGTTest(Test):
> timeout = ProcessTimeout(600, proc)
> timeout.start()
> out, err = proc.communicate()
> - if (timeout.join() > 0):
> +
> + # check for pass or skip first
> + if proc.returncode in (0, 77):
> + returncode = proc.returncode
> + elif timeout.join() > 0:
> returncode = 78
> else:
> returncode = proc.returncode
Reviewed-by: Dylan Baker <baker.dylan.c at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140506/5c600d05/attachment.sig>
More information about the Piglit
mailing list