[Intel-gfx] [PATCH piglit] igt: Make "warn" status work again as expected.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Tue Apr 19 13:33:36 UTC 2016


When writing a patch that adds a igt_warn() when lockdep is unavailable
I noticed that the warn error doesn't work any more. Fix this by monitoring
stderr, and only setting 'pass' when stderr is empty.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Cc: Dylan Baker <baker.dylan.c at gmail.com>
---
diff --git a/tests/igt.py b/tests/igt.py
index 7ebb03646b50..1e5d2f111fa6 100644
--- a/tests/igt.py
+++ b/tests/igt.py
@@ -114,7 +114,9 @@ class IGTTest(Test):
     def interpret_result(self):
         super(IGTTest, self).interpret_result()
 
-        if self.result.returncode == 0:
+        if self.result.returncode == 0 and len(self.result.err) > 0:
+            self.result.result = 'warn'
+        elif self.result.returncode == 0:
             self.result.result = 'pass'
         elif self.result.returncode == 77:
             self.result.result = 'skip'



More information about the Intel-gfx mailing list