diff options
author | Brad King <brad.king@kitware.com> | 2004-07-02 20:29:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2004-07-02 20:29:15 (GMT) |
commit | 0b7ab2a4aab13abc0fb223a0ce41dacb67fa870b (patch) | |
tree | a350f1375e23eeb0b584847011057b0f116a7273 /Source | |
parent | 40a5bad9167dc9aca99a203aa0af4d2f41452de3 (diff) | |
download | CMake-0b7ab2a4aab13abc0fb223a0ce41dacb67fa870b.zip CMake-0b7ab2a4aab13abc0fb223a0ce41dacb67fa870b.tar.gz CMake-0b7ab2a4aab13abc0fb223a0ce41dacb67fa870b.tar.bz2 |
BUG#969: Partially fixed by at least using the timeout for the individual calls to RunSingleCommand from within the inner ctest instance. This should be modified to incrementally adjust remaining time.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCTest.cxx | 8 | ||||
-rw-r--r-- | Source/cmCTest.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 9b4cba0..1c94a6d 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -3354,6 +3354,7 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output, int *re { cmCTest inst; inst.m_ConfigType = m_ConfigType; + inst.m_TimeOut = m_TimeOut; std::vector<std::string> args; for(unsigned int i =0; i < argv.size(); ++i) { @@ -4671,6 +4672,7 @@ int cmCTest::RunCMakeAndTest(std::string* outstring) cmSystemTools::SetStdoutCallback(CMakeStdoutCallback, &cmakeOutString); cmOStringStream out; cmake cm; + double timeout = m_TimeOut; // default to the build type of ctest itself if(m_ConfigType.size() == 0) { @@ -4822,7 +4824,8 @@ int cmCTest::RunCMakeAndTest(std::string* outstring) out << "Running make clean command: " << cleanCommand.c_str() << " ...\n"; retVal = 0; std::string output; - if (!cmSystemTools::RunSingleCommand(cleanCommand.c_str(), &output, &retVal) || + if (!cmSystemTools::RunSingleCommand(cleanCommand.c_str(), &output, &retVal, 0, + false, timeout) || retVal) { out << "Error: " << cleanCommand.c_str() << " execution failed\n"; @@ -4855,7 +4858,7 @@ int cmCTest::RunCMakeAndTest(std::string* outstring) out << "Running make command: " << makeCommand.c_str() << "\n"; retVal = 0; std::string output; - if (!cmSystemTools::RunSingleCommand(makeCommand.c_str(), &output, &retVal, 0, false)) + if (!cmSystemTools::RunSingleCommand(makeCommand.c_str(), &output, &retVal, 0, false, timeout)) { out << "Error: " << makeCommand.c_str() << " execution failed\n"; out << output.c_str() << "\n"; @@ -5035,6 +5038,7 @@ int cmCTest::RunCMakeAndTest(std::string* outstring) out << m_TestCommandArgs[k] << " "; } out << "\n"; + m_TimeOut = timeout; int runTestRes = this->RunTest(testCommand, &outs, &retval, 0); if(runTestRes != cmsysProcess_State_Exited || retval != 0) { diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 25b025c..15d0471 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -310,7 +310,7 @@ private: int m_TestModel; - int m_TimeOut; + double m_TimeOut; std::string m_MemoryTester; std::string m_MemoryTesterOptions; |