diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-07-03 02:30:37 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-07-03 02:30:37 (GMT) |
commit | e712c7c05e1a0aade09b98fbb52a8d95b85fc027 (patch) | |
tree | 58d3b60e38ee41ba1fc2cb4d2600bc50390215c9 /Source/CTest/cmCTestTestHandler.cxx | |
parent | 69ca8776a8a63fcc4d14f59afc1ab8980bb70e9e (diff) | |
download | CMake-e712c7c05e1a0aade09b98fbb52a8d95b85fc027.zip CMake-e712c7c05e1a0aade09b98fbb52a8d95b85fc027.tar.gz CMake-e712c7c05e1a0aade09b98fbb52a8d95b85fc027.tar.bz2 |
ENH: Improve performance of testing and do not complain if DartTestfile.txt is not found or if directory does not exist
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 44756b5..adae1c4 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -86,10 +86,8 @@ bool cmCTestSubdirCommand::InitialPass(std::vector<std::string> const& args) if ( !cmSystemTools::FileExists(fname.c_str()) ) { - std::string m = "Could not find directory: "; - m += fname; - this->SetError(m.c_str()); - return false; + // No subdirectory? So what... + continue; } cmSystemTools::ChangeDirectory(fname.c_str()); const char* testFilename; @@ -105,8 +103,8 @@ bool cmCTestSubdirCommand::InitialPass(std::vector<std::string> const& args) } else { - cmSystemTools::ChangeDirectory(cwd.c_str()); - return false; + // No DartTestfile.txt? Who cares... + continue; } fname += "/"; fname += testFilename; @@ -291,6 +289,8 @@ cmCTestTestHandler::cmCTestTestHandler() m_CustomMaximumFailedTestOutputSize = 300 * 1024; m_MemCheck = false; + + m_DartStuff.compile("(<DartMeasurement.*/DartMeasurement[a-zA-Z]*>)"); } //---------------------------------------------------------------------- @@ -484,7 +484,6 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed, std::vector<cmStdString> &failed) { std::string current_dir = cmSystemTools::GetCurrentWorkingDirectory(); - cmsys::RegularExpression dartStuff("(<DartMeasurement.*/DartMeasurement[a-zA-Z]*>)"); m_TestList.clear(); this->GetListOfTests(); @@ -737,11 +736,11 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed, } failed.push_back(testname); } - if (output != "") + if (!output.empty() && output.find("<DartMeasurement") != output.npos) { - if (dartStuff.find(output.c_str())) + if (m_DartStuff.find(output.c_str())) { - std::string dartString = dartStuff.match(1); + std::string dartString = m_DartStuff.match(1); cmSystemTools::ReplaceString(output, dartString.c_str(),""); cres.m_RegressionImages = this->GenerateRegressionImages(dartString); } |