[Piglit] [PATCH 2/2] fbo-blit-stretch: add ability to choose a subtest

Marek Olšák maraeo at gmail.com
Wed Sep 12 07:29:45 PDT 2012


---
 tests/fbo/fbo-blit-stretch.cpp |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/fbo/fbo-blit-stretch.cpp b/tests/fbo/fbo-blit-stretch.cpp
index f990954..4c4b528 100644
--- a/tests/fbo/fbo-blit-stretch.cpp
+++ b/tests/fbo/fbo-blit-stretch.cpp
@@ -530,11 +530,17 @@ tests[] = {
 	},
 };
 
+static int test_index = -1;
+
 enum piglit_result
 piglit_display(void)
 {
 	GLboolean pass = GL_TRUE;
 	for (unsigned i = 0; i < ARRAY_SIZE(tests); i++) {
+		if (test_index != -1 &&
+		    test_index != i)
+			continue;
+
 		TestCase test = tests[i];
 
 		test.filter = GL_NEAREST;
@@ -553,4 +559,7 @@ piglit_init(int argc, char **argv)
 	piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
 
 	piglit_require_extension("GL_ARB_framebuffer_object");
+
+	if (argc == 2)
+		sscanf(argv[1], "%d", &test_index);
 }
-- 
1.7.9.5



More information about the Piglit mailing list