From bf72ccefc5afb373582374e2a71a7287b92e8e3b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 21 Aug 2013 22:45:36 +0000 Subject: Add support for the -W option to test runner executable. --- infrastructure/buildenv-testmain-template.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'infrastructure/buildenv-testmain-template.cpp') diff --git a/infrastructure/buildenv-testmain-template.cpp b/infrastructure/buildenv-testmain-template.cpp index 0de18255..e5b1360d 100644 --- a/infrastructure/buildenv-testmain-template.cpp +++ b/infrastructure/buildenv-testmain-template.cpp @@ -248,7 +248,7 @@ int main(int argc, char * const * argv) int ch; - while ((ch = getopt_long(argc, argv, "c:d:qs:t:vPTUV", longopts, NULL)) + while ((ch = getopt_long(argc, argv, "c:d:qs:t:vPTUVW:", longopts, NULL)) != -1) { switch(ch) @@ -320,6 +320,17 @@ int main(int argc, char * const * argv) } break; + case 'W': + { + logLevel = Logging::GetNamedLevel(optarg); + if (logLevel == Log::INVALID) + { + BOX_FATAL("Invalid logging level: " << optarg); + return 2; + } + } + break; + case 't': { Logging::SetProgramName(optarg); -- cgit v1.2.3