diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-03-27 16:09:55 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2018-05-01 14:28:46 -0700 |
commit | 5fa0abc6ca79ab1ac15fe1eb1f37324d38592a3c (patch) | |
tree | 229f91281d27afaef159179fb770fe8d29505bd5 /framework | |
parent | 229b3b3de75d1cb60589d40cedadbcca91235f73 (diff) |
framework/test: use relative paths for GLSLParser tests
Tested-by: Rafael Antognolli <rafael.antognolli@intel.com>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/test/glsl_parser_test.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/framework/test/glsl_parser_test.py b/framework/test/glsl_parser_test.py index 46344a8ab..35eadfe4b 100644 --- a/framework/test/glsl_parser_test.py +++ b/framework/test/glsl_parser_test.py @@ -33,7 +33,7 @@ import six from framework import exceptions from .base import TestIsSkip from .opengl import FastSkipMixin -from .piglit_test import PiglitBaseTest, TEST_BIN_DIR +from .piglit_test import PiglitBaseTest, TEST_BIN_DIR, ROOT_DIR __all__ = [ 'GLSLParserTest', @@ -95,11 +95,12 @@ class Parser(object): self.gl_required = set() self.glsl_es_version = None self.glsl_version = None + abs_filepath = os.path.join(ROOT_DIR, filepath) try: - with io.open(filepath, mode='r', encoding='utf-8') as testfile: + with io.open(abs_filepath, mode='r', encoding='utf-8') as testfile: testfile = testfile.read() - self.config = self.parse(testfile, filepath) + self.config = self.parse(testfile, abs_filepath) self.command = self.get_command(filepath) except GLSLParserInternalError as e: raise exceptions.PiglitFatalError( @@ -278,6 +279,12 @@ class GLSLParserTest(FastSkipMixin, PiglitBaseTest): command, run_concurrent=True, gl_required=gl_required, glsl_version=glsl_version, glsl_es_version=glsl_es_version) + @PiglitBaseTest.command.getter + def command(self): + command = super(GLSLParserTest, self).command + glslfile = os.path.join(ROOT_DIR, command[1]) + return [command[0], glslfile] + command[2:] + @classmethod def new(cls, filepath): parsed = Parser(filepath) |