[8/9] tests/fbo-storage-formats: enumerate subtests

Submitted by Dylan Baker on Jan. 20, 2018, 12:26 a.m.

Details

Message ID b88b666d66a066b25d530fc7565acec50a483de8.1516407949.git-series.dylan@pnwbakers.com
State New
Headers show
Series "Series without cover letter" ( rev: 13 12 11 10 9 8 7 6 5 4 3 2 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Dylan Baker Jan. 20, 2018, 12:26 a.m.
---
 tests/fbo/fbo-storage-formats.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Patch hide | download patch | download mbox

diff --git a/tests/fbo/fbo-storage-formats.c b/tests/fbo/fbo-storage-formats.c
index 4db990d..a11335b 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)
+{
+	static int len = ARRAY_SIZE(formats) + ARRAY_SIZE(invalid_formats);
+	const char* names[64];
+
+	int t = 0;
+	for (int i = 0; i < ARRAY_SIZE(formats); i++) {
+		names[t] = piglit_get_gl_enum_name(formats[i].format);
+		++t;
+	}
+	for (int i = 0; i < ARRAY_SIZE(invalid_formats); i++) {
+		names[t] = piglit_get_gl_enum_name(invalid_formats[i]);
+		++t;
+	}
+
+	piglit_enumerate_subtest_list(len, names);
+}
+
+
 void
 piglit_init(int argc, char**argv)
 {
+	enumerate_subtests();
+
 	piglit_require_extension("GL_EXT_framebuffer_object");
 
 	have_extension[0] = GL_TRUE;