Commit ba9aea35 authored by Dylan Baker's avatar Dylan Baker

framework: Use custom class for ASM parser tests

This is going to make serialization easier, since asmparser tests take a
file argument, which must be relative at build time, but absolute at run
Tested-by: Rafael Antognolli's avatarRafael Antognolli <>
parent 9461d923
......@@ -189,3 +189,17 @@ class PiglitCLTest(PiglitBaseTest): # pylint: disable=too-few-public-methods
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."""
def __init__(self, type_, filename):
super(ASMParserTest, self).__init__(['asmparsertest', type_])
self.filename = filename
def command(self):
command = super(ASMParserTest, self).command
return command + [os.path.join(ROOT_DIR, self.filename)]
......@@ -21,6 +21,7 @@ from framework.driver_classifier import DriverClassifier
from framework.test import (PiglitGLTest, PiglitBaseTest,
GLSLParserTest, GLSLParserNoConfigError)
from framework.test.shader_test import ShaderTest, MultiShaderTest
from framework.test.piglit_test import ASMParserTest
from .py_modules.constants import TESTS_DIR, GENERATED_TESTS_DIR
__all__ = ['profile']
......@@ -340,6 +341,7 @@ for group, files in six.iteritems(shader_tests):
profile.test_list[group] = MultiShaderTest(files)
# Collect and add all asmparsertests
_basedir = os.path.join(basedir, 'asmparsertest', 'shaders')
......@@ -353,8 +355,8 @@ for basedir in [TESTS_DIR, GENERATED_TESTS_DIR]:
group = grouptools.join(base_group, filename)
profile.test_list[group] = PiglitGLTest(
['asmparsertest', type_, os.path.join(dirpath, filename)])
profile.test_list[group] = ASMParserTest(
type_, os.path.join(dirpath, filename))
# Find and add all apitrace tests.
classifier = DriverClassifier()
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