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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
Cc: Dylan Baker <baker.dylan.c@xxxxxxxxx>
---
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'

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux