mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
TestDriver: Add '-N' option to print all tests
This commit is contained in:
committed by
Brad King
parent
b7f83c37a4
commit
4e34426fb3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user