summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-03-26 15:22:12 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-05-01 14:28:17 -0700
commita3ddc62114168ce39a30965298ce95349889f67d (patch)
treefa3d21fd263ab09a4491ef1c32a41f7975f81e60 /framework
parentfd84fca6514d8f42232f91ee063915f3eed44e22 (diff)
framework: do the same for shader test
Tested-by: Rafael Antognolli <rafael.antognolli@intel.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/test/shader_test.py46
1 files changed, 26 insertions, 20 deletions
diff --git a/framework/test/shader_test.py b/framework/test/shader_test.py
index a3fb8e209..64edb58c5 100644
--- a/framework/test/shader_test.py
+++ b/framework/test/shader_test.py
@@ -154,26 +154,31 @@ class ShaderTest(FastSkipMixin, PiglitBaseTest):
"""
- def __init__(self, filename):
- if bool(os.environ.get('PIGLIT_NO_FAST_SKIP', False)):
- # No need to parse the shader test file if we've disabled
- # the FastSkip feature.
- super(ShaderTest, self).__init__(
- ['shader_runner', filename],
- run_concurrent=True,)
- else:
- parser = Parser(filename)
- parser.parse()
-
- super(ShaderTest, self).__init__(
- [parser.prog, parser.filename],
- run_concurrent=True,
- gl_required=parser.gl_required,
- gl_version=parser.gl_version,
- gles_version=parser.gles_version,
- glsl_version=parser.glsl_version,
- glsl_es_version=parser.glsl_es_version)
-
+ def __init__(self, command, gl_required=set(), gl_version=None,
+ gles_version=None, glsl_version=None, glsl_es_version=None,
+ **kwargs):
+ super(ShaderTest, self).__init__(
+ command,
+ run_concurrent=True,
+ gl_required=gl_required,
+ gl_version=gl_version,
+ gles_version=gles_version,
+ glsl_version=glsl_version,
+ glsl_es_version=glsl_es_version)
+
+ @classmethod
+ def new(cls, filename):
+ parser = Parser(filename)
+ parser.parse()
+
+ return cls(
+ [parser.prog, parser.filename],
+ run_concurrent=True,
+ gl_required=parser.gl_required,
+ gl_version=parser.gl_version,
+ gles_version=parser.gles_version,
+ glsl_version=parser.glsl_version,
+ glsl_es_version=parser.glsl_es_version)
@PiglitBaseTest.command.getter
def command(self):
@@ -197,6 +202,7 @@ class MultiShaderTest(ReducedProcessMixin, PiglitBaseTest):
"""
def __init__(self, filenames):
+ # TODO
assert filenames
prog = None
files = []