Commit 6fcec59a authored by Dylan Baker's avatar Dylan Baker

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's avatarRafael Antognolli <rafael.antognolli@intel.com>
parent b7409883
......@@ -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
......@@ -14,7 +14,7 @@ from __future__ import (
import os
from framework.profile import TestProfile
from framework.test import PiglitCLTest
from framework.test.piglit_test import PiglitCLTest, CLProgramTester
from framework import grouptools
from .py_modules.constants import TESTS_DIR, GENERATED_TESTS_DIR
......@@ -110,8 +110,8 @@ def add_program_test_dir(group, dirpath):
if ext not in ['.cl', '.program_test']:
continue
profile.test_list[grouptools.join(group, testname)] = PiglitCLTest(
['cl-program-tester', os.path.join(dirpath, filename)])
profile.test_list[grouptools.join(group, testname)] = CLProgramTester(
os.path.join(dirpath, filename))
add_program_test_dir(grouptools.join('program', 'build'),
......
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