trawick 2003/05/18 05:50:49
Modified: test testall.c
Log:
add "-l" option for listing testcases to make it easier for a regression
test to run them one at a time, since it avoids having to hard-code the
testcase names
Revision Changes Path
1.43 +6 -0 apr/test/testall.c
Index: testall.c
===================================================================
RCS file: /home/cvs/apr/test/testall.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- testall.c 16 May 2003 11:50:21 -0000 1.42
+++ testall.c 18 May 2003 12:50:49 -0000 1.43
@@ -135,6 +135,12 @@
exclude = 1;
continue;
}
+ if (!strcmp(argv[i], "-l")) {
+ for (i = 0; tests[i].func != NULL; i++) {
+ printf("%s\n", tests[i].testname);
+ }
+ exit(0);
+ }
if (argv[i][0] == '-') {
fprintf(stderr, "invalid option: `%s'\n", argv[i]);
exit(1);