diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-01-22 17:22:12 -0800 |
---|---|---|
committer | Fabian Bieler <fabianbieler@fastmail.fm> | 2018-02-05 19:44:17 +0100 |
commit | caa63ac9e0714f0029f713b35d896c3c064531dd (patch) | |
tree | fd468de78d1ef46215a268cb273cab4244cdf3a3 | |
parent | 1f9171ea5cfba8166595d31bcb7d6423a4192d27 (diff) |
tests/fbo-storage-formats: enumerate subtests
Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
-rw-r--r-- | tests/fbo/fbo-storage-formats.c | 22 |
1 files changed, 22 insertions, 0 deletions
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; |