[Piglit] [PATCH 1/2] glslparsertest: Allow ! in extension list to require non-support.

Kenneth Graunke kenneth at whitecape.org
Mon Mar 12 00:10:16 PDT 2012


For example:
// [config]
// required_extensions: !GL_ARB_draw_instanced
// [end config]
will cause the test to run only if the GL_ARB_draw_instanced is _not_
advertised.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 tests/glslparsertest/glslparsertest.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/tests/glslparsertest/glslparsertest.c b/tests/glslparsertest/glslparsertest.c
index 2777c0d..43ce123 100644
--- a/tests/glslparsertest/glslparsertest.c
+++ b/tests/glslparsertest/glslparsertest.c
@@ -309,7 +309,10 @@ piglit_init(int argc, char**argv)
 	}
 
 	for (i = 4; i < argc; i++) {
-		piglit_require_extension(argv[i]);
+		if (argv[i][0] == '!')
+			piglit_require_not_extension(argv[i] + 1);
+		else
+			piglit_require_extension(argv[i]);
 	}
 
 	test();
-- 
1.7.7.6



More information about the Piglit mailing list