diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-02-07 21:54:21 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-02-07 21:54:21 +0000 |
commit | e6ddc6fbcbf3681c1088ccd7516dbdaa510379f4 (patch) | |
tree | 3b57c380503c2b9503cac61789845d832afc55ee | |
parent | eaf52c756a62007f8bc57062aa7626de3a4ec409 (diff) |
Allow running only named tests in test suites that support it.
-rw-r--r-- | infrastructure/buildenv-testmain-template.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/infrastructure/buildenv-testmain-template.cpp b/infrastructure/buildenv-testmain-template.cpp index 2471004d..85b0465c 100644 --- a/infrastructure/buildenv-testmain-template.cpp +++ b/infrastructure/buildenv-testmain-template.cpp @@ -57,6 +57,7 @@ int test(int argc, const char *argv[]); int failures = 0; int first_fail_line; std::string first_fail_file; +std::list<std::string> run_only_named_tests; #ifdef WIN32 #define QUIET_PROCESS "-Q" @@ -239,12 +240,13 @@ int main(int argc, char * const * argv) { "bbackupd-args", required_argument, NULL, 'c' }, { "bbstored-args", required_argument, NULL, 's' }, { "test-daemon-args", required_argument, NULL, 'd' }, + { "execute-only", required_argument, NULL, 'e' }, { NULL, 0, NULL, 0 } }; int ch; - while ((ch = getopt_long(argc, argv, "c:d:qs:t:vPTUVW:", longopts, NULL)) + while ((ch = getopt_long(argc, argv, "c:d:e:qs:t:vPTUVW:", longopts, NULL)) != -1) { switch(ch) @@ -276,6 +278,12 @@ int main(int argc, char * const * argv) } break; + case 'e': + { + run_only_named_tests.push_back(optarg); + } + break; + #ifndef WIN32 case 'P': { |