diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2009-12-10 20:37:04 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2009-12-10 20:37:04 (GMT) |
commit | 4de7cc3621c723f76938063c10a4f8fc691ad58e (patch) | |
tree | 9ff9aa8fe77645b8d3c86f5cb8652adcdadde6b4 /Source/CTest/cmCTestTestHandler.cxx | |
parent | 48b613392848610d243962086fb289a93cc41f0d (diff) | |
download | CMake-4de7cc3621c723f76938063c10a4f8fc691ad58e.zip CMake-4de7cc3621c723f76938063c10a4f8fc691ad58e.tar.gz CMake-4de7cc3621c723f76938063c10a4f8fc691ad58e.tar.bz2 |
Unfortunately, I noticed the comment on bug 8668 too late. This changes my last implementation of the exe wrapper to something which makes much more sense: a REQUIRED_FILES property on tests.
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index dadd39c..dd99268 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -269,30 +269,7 @@ bool cmCTestAddTestCommand this->SetError("called with incorrect number of arguments"); return false; } - - bool prefixCmdFound = false; - std::vector<std::string> actualArgs, prefix; - - //separate the regular command and the prefix command (bug 8668) - for(std::vector<std::string>::const_iterator i = args.begin(); - i != args.end(); ++i) - { - if(*i == "EXEC_PREFIX_CMD") - { - prefixCmdFound = true; - continue; - } - if(prefixCmdFound) - { - prefix.push_back(*i); - } - else - { - actualArgs.push_back(*i); - } - } - - return this->TestHandler->AddTest(actualArgs, prefix); + return this->TestHandler->AddTest(args); } //---------------------------------------------------------------------- @@ -2036,6 +2013,10 @@ bool cmCTestTestHandler::SetTestsProperties( { rtit->Cost = static_cast<float>(atof(val.c_str())); } + if ( key == "REQUIRED_FILE" ) + { + rtit->RequiredFiles.push_back(val); + } if ( key == "RUN_SERIAL" ) { rtit->RunSerial = cmSystemTools::IsOn(val.c_str()); @@ -2127,8 +2108,7 @@ bool cmCTestTestHandler::SetTestsProperties( } //---------------------------------------------------------------------- -bool cmCTestTestHandler::AddTest(const std::vector<std::string>& args, - const std::vector<std::string>& prefix) +bool cmCTestTestHandler::AddTest(const std::vector<std::string>& args) { const std::string& testname = args[0]; cmCTestLog(this->CTest, DEBUG, "Add test: " << args[0] << std::endl); @@ -2183,7 +2163,6 @@ bool cmCTestTestHandler::AddTest(const std::vector<std::string>& args, cmCTestTestProperties test; test.Name = testname; test.Args = args; - test.PrefixArgs = prefix; test.Directory = cmSystemTools::GetCurrentWorkingDirectory(); cmCTestLog(this->CTest, DEBUG, "Set test directory: " << test.Directory << std::endl); |