[Piglit] [PATCH 12/16] tests/fbo-storage-formats: enumerate subtests

Fabian Bieler fabianbieler at fastmail.fm
Mon Jan 29 00:22:22 UTC 2018


From: Dylan Baker <dylan at pnwbakers.com>

---
 tests/fbo/fbo-storage-formats.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/tests/fbo/fbo-storage-formats.c b/tests/fbo/fbo-storage-formats.c
index 7f136846d..bb74efb2f 100644
--- a/tests/fbo/fbo-storage-formats.c
+++ b/tests/fbo/fbo-storage-formats.c
@@ -243,9 +243,31 @@ piglit_display(void)
 }
 
 
+static void
+enumerate_subtests(void)
+{
+	const char *names[64];
+
+	assert(ARRAY_SIZE(formats) + ARRAY_SIZE(invalid_formats) < 64);
+
+	int t = 0;
+	for (int i = 0; i < ARRAY_SIZE(formats); i++) {
+		names[t++] = piglit_get_gl_enum_name(formats[i].format);
+	}
+	for (int i = 0; i < ARRAY_SIZE(invalid_formats); i++) {
+		names[t++] = piglit_get_gl_enum_name(invalid_formats[i]);
+	}
+	names[t] = NULL;
+
+	piglit_register_subtests(names);
+}
+
+
 void
 piglit_init(int argc, char**argv)
 {
+	enumerate_subtests();
+
 	piglit_require_extension("GL_EXT_framebuffer_object");
 
 	have_extension[0] = GL_TRUE;
-- 
2.15.1



More information about the Piglit mailing list