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

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Wed Apr 20 10:56:11 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>
[mlankhorst: Changed to not use len over a potentially large string in
response to review comments.]
Reviewed-by: Dylan Baker <baker.dylan.c at gmail.com>
---
I don't have commit rights to piglit, so have a tested patch. :-)

 tests/igt.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/igt.py b/tests/igt.py
index 7ebb03646b50..132cfa0c8808 100644
--- a/tests/igt.py
+++ b/tests/igt.py
@@ -115,7 +115,10 @@ class IGTTest(Test):
         super(IGTTest, self).interpret_result()
 
         if self.result.returncode == 0:
-            self.result.result = 'pass'
+            if not self.result.err:
+                self.result.result = 'pass'
+            else:
+                self.result.result = 'warn'
         elif self.result.returncode == 77:
             self.result.result = 'skip'
         elif self.result.returncode == 78:
-- 
2.1.0




More information about the Intel-gfx mailing list