[Piglit] [PATCH 14/15] tests: enumerate subtests in linestipple

Dylan Baker dylan at pnwbakers.com
Tue Jan 23 01:22:15 UTC 2018


---
 tests/general/linestipple.c | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/tests/general/linestipple.c b/tests/general/linestipple.c
index ba0924e..6626b3c 100644
--- a/tests/general/linestipple.c
+++ b/tests/general/linestipple.c
@@ -28,14 +28,6 @@
 
 #include "piglit-util-gl.h"
 
-PIGLIT_GL_TEST_CONFIG_BEGIN
-
-	config.supports_gl_compat_version = 10;
-
-	config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
-
-PIGLIT_GL_TEST_CONFIG_END
-
 struct vertex {
 	GLuint x;
 	GLuint y;
@@ -198,6 +190,22 @@ static struct stipple_line Lines[] = {
 	}
 };
 
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+	config.supports_gl_compat_version = 10;
+
+	config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+
+	const int numLines = ARRAY_SIZE(Lines);
+	const char *subtests[ARRAY_SIZE(Lines)];
+	for (int i = 0; i < numLines; i++) {
+		subtests[i] = Lines[i].name;
+	}
+	subtests[numLines] = NULL;
+	config.all_subtests = subtests;
+
+PIGLIT_GL_TEST_CONFIG_END
+
 enum piglit_result
 piglit_display(void)
 {
-- 
git-series 0.9.1


More information about the Piglit mailing list