diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-04-03 10:36:41 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2018-05-01 14:31:25 -0700 |
commit | 8786e15481e658a91c99a5bb7c3b81f239bb7a96 (patch) | |
tree | 4768050cef5c9c51c6ee23421c8985baeb0b4679 /framework | |
parent | 1be0b641b4dcc5f7c8922efd288aee86fa595856 (diff) |
tests/glsl_parser_test.py: fix is_skip for serialized profiles
Currently is_skip() relies on runtime detection of which glslparsertest
binaries are built, but we can't assume that at build time. Instead
always assign the appropriate binary, and then check for the existence
of that binary at run time.
Tested-by: Rafael Antognolli <rafael.antognolli@intel.com>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/test/glsl_parser_test.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/framework/test/glsl_parser_test.py b/framework/test/glsl_parser_test.py index 35eadfe4b..88646c97f 100644 --- a/framework/test/glsl_parser_test.py +++ b/framework/test/glsl_parser_test.py @@ -122,7 +122,7 @@ class Parser(object): # If GLES is requested, but piglit was not built with a gles version, # then ARB_ES3<ver>_compatibility is required. Add it to # self.gl_required - if self.glsl_es_version and not _HAS_GLES_BIN: + if self.glsl_es_version and _FORCE_DESKTOP_VERSION: if self.glsl_es_version == 1.0: ver = '2' elif self.glsl_es_version == 3.0: @@ -148,14 +148,10 @@ class Parser(object): then the test will be skipped in the python layer. """ - if (_is_gles_version(version) - and _HAS_GLES_BIN - and not _FORCE_DESKTOP_VERSION): + if _is_gles_version(version) and not _FORCE_DESKTOP_VERSION: return 'glslparsertest_gles2' - elif _HAS_GL_BIN: - return 'glslparsertest' else: - return 'None' + return 'glslparsertest' def get_command(self, filepath): """ Create the command argument to pass to super() @@ -295,8 +291,12 @@ class GLSLParserTest(FastSkipMixin, PiglitBaseTest): glsl_es_version=parsed.glsl_es_version) def is_skip(self): - if os.path.basename(self.command[0]) == 'None': - raise TestIsSkip('Test is for desktop OpenGL, ' - 'but only an OpenGL ES binary has been built') + if os.path.basename(self.command[0]) == 'glslparsertest' and not _HAS_GL_BIN: + raise TestIsSkip('Test is for desktop OpenGL, but piglit was not ' + 'built with OpenGL support.') + elif (os.path.basename(self.command[0]) == 'glslparsertest_gles2' + and not _HAS_GLES_BIN): + raise TestIsSkip('Test is for OpenGL ES, but piglit was not ' + 'built with OpenGL ES support.') super(GLSLParserTest, self).is_skip() |