[Piglit] [PATCH 1/2] unittests: Make module skip correct

Dylan Baker dylan at pnwbakers.com
Thu Jun 30 19:16:53 UTC 2016


This skips in the wrong cases, it skips when the module is available
rather than when it is not.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 unittests/utils/nose.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/unittests/utils/nose.py b/unittests/utils/nose.py
index 5852718..02a7bf5 100644
--- a/unittests/utils/nose.py
+++ b/unittests/utils/nose.py
@@ -312,10 +312,10 @@ class Skip(object):
                                           stdout=null, stderr=null)
                 except OSError as e:
                     if e.errno == errno.ENOENT:
-                        return False
+                        return True
                 except subprocess.CalledProcessError as e:
                     pass
-            return True
+            return False
 
         return cls(
             check(), 'Test requires that binary {} is available'.format(name))
-- 
2.9.0



More information about the Piglit mailing list