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

Dylan Baker dylan at pnwbakers.com
Thu Jan 26 18:14:21 UTC 2017


sys is not imported in glsl_parser_test.py, you'll need to do that.

Quoting Neha Bhende (2017-01-25 15:19:54)
> 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
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20170126/6b4e086b/attachment.sig>


More information about the Piglit mailing list