Commit 209f3d64 authored by U. Artie Eoff's avatar U. Artie Eoff Committed by Chad Versace

Replace poolName in Test constructor with boolean option.

Replaced poolName in the Test constructor with runConcurrent
boolean option.  runConcurrent defaults to False.  When True, the
Test pushes its doRunWork to the ConcurrentTestPool to be executed
in another thread.  When False, doRunWork is executed immediately
on the calling thread (main thread).
Reviewed-by: default avatarChad Versace <>
parent bc66671c
......@@ -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)
if self.runConcurrent:
ConcurrentTestPool().put(self.__doRunWork, args = (env, path,))
self.__doRunWork(env, path)
def __doRunWork(self, env, path):
# Exclude tests that don't match the filter regexp
......@@ -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'
......@@ -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:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment