[Piglit] [PATCH] tests/igt.py: check for pass or skip before timeout

Thomas Wood thomas.wood at intel.com
Tue May 6 03:15:08 PDT 2014


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
-- 
1.9.0



More information about the Piglit mailing list