[Piglit] [Review Request (master branch)] framework/test/glsl_parser_test.py: fix python script to run glslparsertest on windows

Neha Bhende bhenden at vmware.com
Wed Jan 25 23:19:54 UTC 2017


glslparsertest was not running on windows because python script is looking for
glslparsertest. On windows, piglit creates  glslparsertest.exe. With this fix,
all glslparsertest will run on windows.
---
 framework/test/glsl_parser_test.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/framework/test/glsl_parser_test.py b/framework/test/glsl_parser_test.py
index 22eb6ce..0955ff3 100644
--- a/framework/test/glsl_parser_test.py
+++ b/framework/test/glsl_parser_test.py
@@ -40,8 +40,12 @@ __all__ = [
 ]
 
 # In different configurations piglit may have one or both of these.
-_HAS_GL_BIN = os.path.exists(os.path.join(TEST_BIN_DIR, 'glslparsertest'))
-_HAS_GLES_BIN = os.path.exists(os.path.join(TEST_BIN_DIR, 'glslparsertest_gles2'))
+if sys.platform == 'win32':
+    _HAS_GL_BIN = os.path.exists(os.path.join(TEST_BIN_DIR, 'glslparsertest.exe'))
+    _HAS_GLES_BIN = os.path.exists(os.path.join(TEST_BIN_DIR, 'glslparsertest_gles2.exe'))
+else:
+    _HAS_GL_BIN = os.path.exists(os.path.join(TEST_BIN_DIR, 'glslparsertest'))
+    _HAS_GLES_BIN = os.path.exists(os.path.join(TEST_BIN_DIR, 'glslparsertest_gles2'))
 
 # This forces testing with compatibility extensions, even when GLES support is
 # built
-- 
1.9.1



More information about the Piglit mailing list