diff options
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"); |