diff options
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 69090d6..9a747ac 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -733,11 +733,11 @@ void cmCTestTestHandler::ProcessOneTest(cmCTestTestProperties *it, if ( !this->CTest->GetShowOnly() ) { res = this->CTest->RunTest(arguments, &output, &retVal, this->LogFile, - it->Timeout); + it->Timeout, &it->Environment); } - - clock_finish = cmSystemTools::GetTime(); - + + clock_finish = cmSystemTools::GetTime(); + if ( this->LogFile ) { double ttime = clock_finish - clock_start; @@ -2209,7 +2209,7 @@ bool cmCTestTestHandler::SetTestsProperties( } } if ( key == "DEPENDS" ) - { + { std::vector<std::string> lval; cmSystemTools::ExpandListArgument(val.c_str(), lval); std::vector<std::string>::iterator crit; @@ -2218,6 +2218,16 @@ bool cmCTestTestHandler::SetTestsProperties( rtit->Depends.push_back(*crit); } } + if ( key == "ENVIRONMENT" ) + { + std::vector<std::string> lval; + cmSystemTools::ExpandListArgument(val.c_str(), lval); + std::vector<std::string>::iterator crit; + for ( crit = lval.begin(); crit != lval.end(); ++ crit ) + { + rtit->Environment.push_back(*crit); + } + } if ( key == "MEASUREMENT" ) { size_t pos = val.find_first_of("="); |