diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-09-24 22:34:16 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-09-24 22:34:16 (GMT) |
commit | 80f20047af31e35894b61afa11226dcab0b6a77b (patch) | |
tree | 040e9b69236523be3c728bc8dca652860efe6656 /Source/ctest.cxx | |
parent | b5de000f26247b6a0be2ac429ead001cbe9da72e (diff) | |
download | CMake-80f20047af31e35894b61afa11226dcab0b6a77b.zip CMake-80f20047af31e35894b61afa11226dcab0b6a77b.tar.gz CMake-80f20047af31e35894b61afa11226dcab0b6a77b.tar.bz2 |
Add verbose flag -V, which makes the output of tests to be displayed; also add help to ctest
Diffstat (limited to 'Source/ctest.cxx')
-rw-r--r-- | Source/ctest.cxx | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/Source/ctest.cxx b/Source/ctest.cxx index a2387c3..0852620 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -228,7 +228,7 @@ void ctest::ProcessDirectory(std::vector<std::string> &passed, cmSystemTools::ReplaceString(output, dartStuff.match(1).c_str(),""); } - if (output != "") + if (output != "" && m_Verbose) { std::cerr << output.c_str() << "\n"; } @@ -245,7 +245,7 @@ void ctest::ProcessDirectory(std::vector<std::string> &passed, cmSystemTools::ReplaceString(output, dartStuff.match(1).c_str(),""); } - if (output != "") + if (output != "" && m_Verbose) { std::cerr << output.c_str() << "\n"; } @@ -266,6 +266,7 @@ int main (int argc, char *argv[]) std::vector<std::string> failed; int total; + ctest inst; // look at the args @@ -282,6 +283,11 @@ int main (int argc, char *argv[]) { inst.m_ConfigType = args[i+1]; } + + if( arg.find("-V",0) == 0 || arg.find("--verbose",0) == 0 ) + { + inst.m_Verbose = true; + } if(arg.find("-R",0) == 0 && i < args.size() - 1) { @@ -295,6 +301,25 @@ int main (int argc, char *argv[]) inst.m_ExcludeRegExp = args[i+1]; inst.m_UseExcludeRegExpFirst = inst.m_UseIncludeRegExp ? false : true; } + + if(arg.find("-h") == 0 || + arg.find("-help") == 0 || + arg.find("-H") == 0 || + arg.find("--help") == 0 || + arg.find("/H") == 0 || + arg.find("/HELP") == 0 || + arg.find("/?") == 0) + { + std::cerr << "Usage: " << argv[0] << " <options>" << std::endl + << "\t -D type Specify config type" << std::endl + << "\t -E test Specify regular expression for tests to exclude" + << std::endl + << "\t -R test Specify regular expression for tests to include" + << std::endl + << "\t -V Verbose testing" << std::endl + << "\t -H Help page" << std::endl; + return 1; + } } // call process directory |