[14/15] tests: enumerate subtests in linestipple

Submitted by Dylan Baker on Jan. 23, 2018, 1:22 a.m.

Details

Message ID af3afb0591714ebe17ff53c9b15b2e3db0e10414.1516670408.git-series.dylan@pnwbakers.com
State New
Headers show
Series "Series without cover letter" ( rev: 10 ) in Piglit

Not browsing as part of any series.

Commit Message

Dylan Baker Jan. 23, 2018, 1:22 a.m.
---
 tests/general/linestipple.c | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

Patch hide | download patch | download mbox

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)
 {