diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-05-28 09:42:37 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-05-28 09:42:37 +0000 |
commit | 42b0a674db95c8d2bcfabf4579081aab12017eaa (patch) | |
tree | e4807ca19002fd373863b92b33424a6a84a143ae | |
parent | 4a061582e4fa565e668dc3bf1b8535fa8bae3766 (diff) |
Set program name in tests to module name (e.g. test/bbackupd).
Add option to show PID in logs (-P) in tests.
-rw-r--r-- | infrastructure/buildenv-testmain-template.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/infrastructure/buildenv-testmain-template.cpp b/infrastructure/buildenv-testmain-template.cpp index b42f3118..661c0100 100644 --- a/infrastructure/buildenv-testmain-template.cpp +++ b/infrastructure/buildenv-testmain-template.cpp @@ -164,6 +164,8 @@ int main(int argc, char * const * argv) // Start memory leak testing MEMLEAKFINDER_START + Logging::SetProgramName(BOX_MODULE); + #ifdef HAVE_GETOPT_H #ifdef NDEBUG int logLevel = Log::NOTICE; // need an int to do math with @@ -181,7 +183,7 @@ int main(int argc, char * const * argv) int ch; - while ((ch = getopt_long(argc, argv, "c:d:qs:t:vTUV", longopts, NULL)) + while ((ch = getopt_long(argc, argv, "c:d:qs:t:vPTUV", longopts, NULL)) != -1) { switch(ch) @@ -213,6 +215,14 @@ int main(int argc, char * const * argv) } break; + #ifndef WIN32 + case 'P': + { + Console::SetShowPID(true); + } + break; + #endif + case 'q': { if(logLevel == Log::NOTHING) |