diff options
author | Ken Martin <ken.martin@kitware.com> | 2007-06-06 15:02:24 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2007-06-06 15:02:24 (GMT) |
commit | a175613a561d50dc1b2d39d052e11563cd6d8d57 (patch) | |
tree | 280d4fd1af6a12e8ba24b6a6c3e8be8e47c1cc15 /Source/CTest | |
parent | 80de27ace5b86bc169874f1b366c9c0c422ab32a (diff) | |
download | CMake-a175613a561d50dc1b2d39d052e11563cd6d8d57.zip CMake-a175613a561d50dc1b2d39d052e11563cd6d8d57.tar.gz CMake-a175613a561d50dc1b2d39d052e11563cd6d8d57.tar.bz2 |
BUG: better passing of global TIMEOUT to internal ctest invocaitons
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestBuildAndTestHandler.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx index 83ccb19..2855cae 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.cxx +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -218,8 +218,8 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) { this->BuildTargets.push_back(""); } - for ( tarIt = this->BuildTargets.begin(); tarIt != this->BuildTargets.end(); - ++ tarIt ) + for ( tarIt = this->BuildTargets.begin(); + tarIt != this->BuildTargets.end(); ++ tarIt ) { double remainingTime = 0; if (this->Timeout) @@ -332,19 +332,19 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) out << "\n"; // how much time is remaining - double remainingTime = 0; - if (this->Timeout) + double remainingTime = 0; + if (this->Timeout) + { + remainingTime = this->Timeout - cmSystemTools::GetTime() + clock_start; + if (remainingTime <= 0) { - remainingTime = this->Timeout - cmSystemTools::GetTime() + clock_start; - if (remainingTime <= 0) + if(outstring) { - if(outstring) - { - *outstring = "--build-and-test timeout exceeded. "; - } - return 1; + *outstring = "--build-and-test timeout exceeded. "; } + return 1; } + } int runTestRes = this->CTest->RunTest(testCommand, &outs, &retval, 0, remainingTime); |