summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/core.py15
-rwxr-xr-xframework/glsl_parser_test.py6
-rw-r--r--tests/all.tests4
3 files changed, 15 insertions, 10 deletions
diff --git a/framework/core.py b/framework/core.py
index 8f33b913..58b62927 100644
--- a/framework/core.py
+++ b/framework/core.py
@@ -290,17 +290,22 @@ class Test:
ignoreErrors = []
sleep = 0
- def __init__(self, poolName = "base"):
- self.poolName = poolName
+ def __init__(self, runConcurrent = False):
+ '''
+ 'runConcurrent' controls whether this test will
+ execute it's work (i.e. __doRunWork) on the calling thread
+ (i.e. the main thread) or from the ConcurrentTestPool threads.
+ '''
+ self.runConcurrent = runConcurrent
def run(self):
raise NotImplementedError
def doRun(self, env, path):
- if "base" == self.poolName:
- self.__doRunWork(env, path)
- else:
+ if self.runConcurrent:
ConcurrentTestPool().put(self.__doRunWork, args = (env, path,))
+ else:
+ self.__doRunWork(env, path)
def __doRunWork(self, env, path):
# Exclude tests that don't match the filter regexp
diff --git a/framework/glsl_parser_test.py b/framework/glsl_parser_test.py
index 3ecdf4cb..03511254 100755
--- a/framework/glsl_parser_test.py
+++ b/framework/glsl_parser_test.py
@@ -185,11 +185,11 @@ class GLSLParserTest(PlainExecTest):
'require_extensions' : '',
}
- def __init__(self, filepath, poolName='gpu-not-used'):
+ def __init__(self, filepath, runConcurrent = True):
"""
:filepath: Must end in one '.vert', '.geom', or '.frag'.
"""
- Test.__init__(self, poolName)
+ Test.__init__(self, runConcurrent)
self.__config = None
self.__command = None
self.__filepath = filepath
@@ -305,7 +305,7 @@ class GLSLParserTest(PlainExecTest):
Check that that all required options are present. If
validation fails, set ``self.result`` to failure.
-
+
Currently, this function does not validate the options'
values.
diff --git a/tests/all.tests b/tests/all.tests
index c3d9f2ae..71683120 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -1200,7 +1200,7 @@ for filename in os.listdir('tests/glslparsertest/glsl2'):
asmparsertest = Group()
def add_asmparsertest(group, shader):
test = PlainExecTest(['asmparsertest', '-auto', group, 'tests/asmparsertest/shaders/' + group + '/' + shader])
- test.poolName = "gpu-not-used"
+ test.runConcurrent = True
asmparsertest[group + '/' + shader] = test
add_asmparsertest('ARBfp1.0', 'abs-01.txt')
@@ -1651,7 +1651,7 @@ profile.tests['glx'] = glx
class ValgrindExecTest(PlainExecTest):
def __init__(self, test):
- Test.__init__(self, test.poolName)
+ Test.__init__(self, test.runConcurrent)
self.orig_test = test
self.env = {}
if 'PIGLIT_TEST' in test.env: