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 <[email protected]>
Cc: Dylan Baker <[email protected]>
[mlankhorst: Changed to not use len over a potentially large string in
response to review comments.]
Reviewed-by: Dylan Baker <[email protected]>
---
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


_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to