[Piglit] [PATCH 5/7] cl.py: Use the more standard sys.platform.startswith for linux detection

Dylan Baker baker.dylan.c at gmail.com
Mon Jan 12 00:22:30 PST 2015


Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 tests/cl.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/cl.py b/tests/cl.py
index f7f2811..0efe673 100644
--- a/tests/cl.py
+++ b/tests/cl.py
@@ -6,7 +6,7 @@ from __future__ import division, absolute_import, print_function
 
 import os
 import os.path as path
-import platform
+import sys
 import glob
 
 from framework.profile import TestProfile
@@ -18,7 +18,8 @@ __all__ = ['profile']
 ######
 # Helper functions
 
-can_do_concurrent = platform.system().lower()[0:5] != 'linux' or glob.glob('/dev/dri/render*')
+can_do_concurrent = (not sys.platform.startswith('linux') or
+                     glob.glob('/dev/dri/render*'))
 
 def add_plain_test(group, name, args):
         group[name] = PiglitCLTest(args, run_concurrent=can_do_concurrent)
-- 
2.2.1



More information about the Piglit mailing list