[Piglit] [PATCH 1/1] cl: Run concurrent on Linux render nodes, or non-Linux

Jan Vesely jan.vesely at rutgers.edu
Fri Sep 26 16:02:49 PDT 2014


Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---

Something like this?

 tests/cl.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/tests/cl.py b/tests/cl.py
index f618f59..2d3c930 100644
--- a/tests/cl.py
+++ b/tests/cl.py
@@ -7,6 +7,9 @@ __all__ = ['profile']
 import os
 import os.path as path
 
+import platform
+import glob
+
 from framework.opencv import add_opencv_tests
 
 from framework.profile import TestProfile
@@ -16,13 +19,9 @@ from framework.exectest import PiglitTest
 # Helper functions
 
 def add_plain_test(group, name, args):
-        group[name] = PiglitTest(args)
-
-# TODO: Use concurrent tests for everything once kernels with render nodes
-# enabled by default (3.16 or newer) are more widely used.
-def add_concurrent_test(group, name, args):
-        test = PiglitTest(args, run_concurrent=True)
-        group[name] = test
+        group[name] = PiglitTest(args, run_concurrent=
+		platform.system().lower()[0:5] != 'linux' or
+		glob.glob('/dev/dri/render*'))
 
 def add_plain_program_tester_test(group, name, path):
         add_plain_test(group, name, ['cl-program-tester', path])
-- 
1.9.3



More information about the Piglit mailing list