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

Jan Vesely jan.vesely at rutgers.edu
Sun Sep 28 13:30:34 PDT 2014


v2: make the flag a module parameter

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

This still restricts CPU implementations to run serial on linux machines without
render nodes, but I guess those few cases can use -c.

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

diff --git a/tests/cl.py b/tests/cl.py
index f618f59..67ed542 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
@@ -15,14 +18,10 @@ from framework.exectest import PiglitTest
 ######
 # Helper functions
 
-def add_plain_test(group, name, args):
-        group[name] = PiglitTest(args)
+can_do_concurrent = platform.system().lower()[0:5] != 'linux' or glob.glob('/dev/dri/render*')
 
-# 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
+def add_plain_test(group, name, args):
+        group[name] = PiglitTest(args, run_concurrent=can_do_concurrent)
 
 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