[Piglit] [PATCH 2/4] fbo-formats: print test set names if given an invalid name
Brian Paul
brianp at vmware.com
Tue Jun 21 22:44:32 UTC 2016
If one of the fbo tests is given an invalid test set name on the command
line, print the list of test set names to help the user.
---
tests/fbo/fbo-formats.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/fbo/fbo-formats.h b/tests/fbo/fbo-formats.h
index 0e2af5f..fcfad26 100644
--- a/tests/fbo/fbo-formats.h
+++ b/tests/fbo/fbo-formats.h
@@ -653,7 +653,12 @@ fbo_formats_init(int argc, char **argv, GLboolean print_options)
if (argc == 2) {
test_set_index = fbo_lookup_test_set(argv[1]);
if (test_set_index < 0) {
+ unsigned i;
fprintf(stderr, "Unknown test set: %s\n", argv[1]);
+ fprintf(stderr, "Test sets:\n");
+ for (i = 0; i < ARRAY_SIZE(test_sets); i++) {
+ fprintf(stderr, "\t%s\n", test_sets[i].param);
+ }
exit(1);
}
} else if (argc > 2) {
--
1.9.1
More information about the Piglit
mailing list