diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2011-01-03 19:41:25 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2011-01-03 19:41:25 (GMT) |
commit | 51bb49357495ea2742858ffe9d76ab3f44efc06e (patch) | |
tree | f72a5b8ce58fc95f46d2b477196ded88e642cda8 /Source/CTest/cmCTestRunTest.cxx | |
parent | edff9207ed82d241077d66b20087657f74e8b5b9 (diff) | |
download | CMake-51bb49357495ea2742858ffe9d76ab3f44efc06e.zip CMake-51bb49357495ea2742858ffe9d76ab3f44efc06e.tar.gz CMake-51bb49357495ea2742858ffe9d76ab3f44efc06e.tar.bz2 |
Test TIMEOUT property explicitly set to zero should be honored
Diffstat (limited to 'Source/CTest/cmCTestRunTest.cxx')
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 76ff23a..42a4cff 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -455,7 +455,8 @@ bool cmCTestRunTest::StartTest(size_t total) { return false; } - return this->ForkProcess(timeout, &this->TestProperties->Environment); + return this->ForkProcess(timeout, this->TestProperties->ExplicitTimeout, + &this->TestProperties->Environment); } //---------------------------------------------------------------------- @@ -598,7 +599,7 @@ double cmCTestRunTest::ResolveTimeout() } //---------------------------------------------------------------------- -bool cmCTestRunTest::ForkProcess(double testTimeOut, +bool cmCTestRunTest::ForkProcess(double testTimeOut, bool explicitTimeout, std::vector<std::string>* environment) { this->TestProcess = new cmProcess; @@ -619,12 +620,16 @@ bool cmCTestRunTest::ForkProcess(double testTimeOut, { timeout = testTimeOut; } - // always have at least 1 second if we got to here if (timeout <= 0) { timeout = 1; } + // handle timeout explicitly set to 0 + if (testTimeOut == 0 && explicitTimeout) + { + timeout = 0; + } cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index << ": " << "Test timeout computed to be: " << timeout << "\n"); |