summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-04-03 13:24:59 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-05-01 14:28:36 -0700
commit6fcec59a050da7b53b2507c739c923dc47749283 (patch)
tree79a81cda250f146f49597aa031a59d2806c667c7 /framework
parentb7409883a49073e44550c7e50be25adfcfca82fe (diff)
framework/test: Add class for cl-program-tester
These tests need some special handling for serializing, since they take file paths as arguments. Tested-by: Rafael Antognolli <rafael.antognolli@intel.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/test/piglit_test.py35
1 files changed, 25 insertions, 10 deletions
diff --git a/framework/test/piglit_test.py b/framework/test/piglit_test.py
index b5c9a53a7..f5fd0c83c 100644
--- a/framework/test/piglit_test.py
+++ b/framework/test/piglit_test.py
@@ -181,16 +181,6 @@ class PiglitGLTest(WindowResizeMixin, PiglitBaseTest):
self._command = [n for n in new if n not in ['-auto', '-fbo']]
-class PiglitCLTest(PiglitBaseTest): # pylint: disable=too-few-public-methods
- """ OpenCL specific Test class.
-
- Set concurrency based on CL requirements.
-
- """
- def __init__(self, command, run_concurrent=CL_CONCURRENT, **kwargs):
- super(PiglitCLTest, self).__init__(command, run_concurrent, **kwargs)
-
-
class ASMParserTest(PiglitBaseTest):
"""Test class for ASM parser tests."""
@@ -208,3 +198,28 @@ class ASMParserTest(PiglitBaseTest):
class BuiltInConstantsTest(PiglitBaseTest):
"""Test class for handling built in constants tests."""
+
+
+class PiglitCLTest(PiglitBaseTest): # pylint: disable=too-few-public-methods
+ """ OpenCL specific Test class.
+
+ Set concurrency based on CL requirements.
+
+ """
+ def __init__(self, command, run_concurrent=CL_CONCURRENT, **kwargs):
+ super(PiglitCLTest, self).__init__(command, run_concurrent, **kwargs)
+
+
+class CLProgramTester(PiglitCLTest):
+
+ """Class for cl-program-tester tests."""
+
+ def __init__(self, filename):
+ super(CLProgramTester, self).__init__(['cl-program-tester'])
+ self.filename = filename
+
+ @PiglitCLTest.command.getter
+ def command(self):
+ command = super(CLProgramTester, self).command
+ command.insert(1, self.filename)
+ return command