From: Ian Romanick <[email protected]>

The code in the PIGLIT_GL_TEST_CONFIG_BEGIN block assumes that various
command line parameters will be at specific locations.  However, if
--check-link is used, these locations will be off by one.  Process the
command line options in the PIGLIT_GL_TEST_CONFIG_BEGIN block to avoid
this problem.

Signed-off-by: Ian Romanick <[email protected]>
Cc: Kenneth Graunke <[email protected]>
---
 tests/glslparsertest/glslparsertest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/glslparsertest/glslparsertest.c 
b/tests/glslparsertest/glslparsertest.c
index d9f1947..170dbad 100644
--- a/tests/glslparsertest/glslparsertest.c
+++ b/tests/glslparsertest/glslparsertest.c
@@ -39,6 +39,7 @@ static unsigned parse_glsl_version_number(const char *str);
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
+       argc = process_options(argc, argv);
        if (argc > 3) {
                const unsigned int int_version
                        = parse_glsl_version_number(argv[3]);
@@ -408,7 +409,6 @@ piglit_init(int argc, char**argv)
        unsigned glsl_version = 0;
        int i;
 
-       argc = process_options(argc, argv);
        if (argc < 3)
                usage(argv[0]);
 
-- 
1.8.1.4

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to