[Piglit] [Patch v2 08/13] framework/exectest.py: Fix action for non 0 returncode

Dylan Baker baker.dylan.c at gmail.com
Wed Apr 16 20:06:16 PDT 2014


Previously a test would be marked with a note if the returncode was
non-zero. This isn't very useful as no one looks at the note field.
Instead, this patch marks tests that pass and return a non-zero status
as warn, so a developer will actually see that.

Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
---
 framework/exectest.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/framework/exectest.py b/framework/exectest.py
index 29ac7c5..5e13d35 100644
--- a/framework/exectest.py
+++ b/framework/exectest.py
@@ -187,8 +187,8 @@ class Test(object):
 
         if returncode in crash_codes:
             results['result'] = 'crash'
-        elif returncode != 0:
-            results['note'] = 'Returncode was {0}'.format(returncode)
+        elif returncode != 0 and results['result'] == 'pass':
+            results['result'] = 'warn'
 
         if self.ENV.valgrind:
             # If the underlying test failed, simply report
-- 
1.9.2



More information about the Piglit mailing list