TestDriver: Add '-N' option to print all tests

This commit is contained in:
Daniel Pfeifer
2026-03-26 10:36:22 -04:00
committed by Brad King
parent b7f83c37a4
commit 4e34426fb3
11 changed files with 102 additions and 0 deletions
+9
View File
@@ -88,6 +88,7 @@ int main(int ac, char* av[])
{
int i;
int testNum = 0;
int show_only;
int partial_match;
int run_all;
char *arg;
@@ -117,14 +118,22 @@ int main(int ac, char* av[])
ac--;
av++;
}
show_only = 0;
partial_match = 0;
run_all = 0;
arg = CM_NULL; /* NOLINT */
/* If partial match or running all tests are requested. */
if (testToRun == -1 && ac > 1) {
show_only = (strcmp(av[1], "-N") == 0) ? 1 : 0;
partial_match = (strcmp(av[1], "-R") == 0) ? 1 : 0;
run_all = (strcmp(av[1], "-A") == 0) ? 1 : 0;
}
if (show_only == 1) {
for (i = 0; i < NumTests; ++i) {
printf("%s\n", cmakeGeneratedFunctionMapEntries[i].name);
}
return 0;
}
if (partial_match != 0 && ac < 3) {
printf("-R needs an additional parameter.\n");
return -1;