diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-12-18 00:19:20 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-12-18 00:19:20 +0000 |
commit | be03e10b26eaa53aca68517f4086560e74c9a7cf (patch) | |
tree | f2ccad1aeae7831e8226ba643b7dcb81ce7911f7 /infrastructure/buildenv-testmain-template.cpp | |
parent | 3bb029868ac789bdc6cff8c39c18df30c177e194 (diff) |
Better way to pass arguments to test daemons, with --test-daemon-args.
Diffstat (limited to 'infrastructure/buildenv-testmain-template.cpp')
-rw-r--r-- | infrastructure/buildenv-testmain-template.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/infrastructure/buildenv-testmain-template.cpp b/infrastructure/buildenv-testmain-template.cpp index b392606b..45ad0933 100644 --- a/infrastructure/buildenv-testmain-template.cpp +++ b/infrastructure/buildenv-testmain-template.cpp @@ -164,12 +164,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' }, { NULL, 0, NULL, 0 } }; int ch; - while ((ch = getopt_long(argc, argv, "c:s:t:TU", longopts, NULL)) + while ((ch = getopt_long(argc, argv, "c:d:s:t:TUV", longopts, NULL)) != -1) { switch(ch) @@ -184,6 +185,16 @@ int main(int argc, char * const * argv) } break; + case 'd': + { + if (test_args.length() > 0) + { + test_args += " "; + } + test_args += optarg; + } + break; + case 's': { bbstored_args += " "; @@ -194,16 +205,12 @@ int main(int argc, char * const * argv) case 't': { Console::SetTag(optarg); - test_args += " -t '"; - test_args += optarg; - test_args += "'"; } break; case 'T': { Console::SetShowTime(true); - test_args += " -T"; } break; @@ -211,7 +218,12 @@ int main(int argc, char * const * argv) { Console::SetShowTime(true); Console::SetShowTimeMicros(true); - test_args += " -U"; + } + break; + + case 'V': + { + Logging::SetGlobalLevel(Log::EVERYTHING); } break; |