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

Charmaine Lee charmainel at vmware.com
Thu Jan 26 00:09:02 UTC 2017


Reviewed-by: Charmaine Lee <charmainel at vmware.com>
________________________________________
From: Neha Bhende <bhenden at vmware.com>
Sent: Wednesday, January 25, 2017 3:19 PM
To: piglit at lists.freedesktop.org
Cc: Charmaine Lee; Brian Paul; Neha Bhende
Subject: [Review Request (master branch)] framework/test/glsl_parser_test.py: fix python script to run glslparsertest on windows

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