diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2009-09-04 13:24:25 -0400 |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2009-09-04 13:24:25 -0400 |
commit | 7d190a65ca3fb717e4889de7604ac8ef3484c593 (patch) | |
tree | 6a372a8684754102c510bb5d59ae3f63d11c84f0 /Source/CTest/cmCTestScriptHandler.cxx | |
parent | 368a18b83c1a0885f477b4911d3f5224b4fd534e (diff) | |
download | cmake-7d190a65ca3fb717e4889de7604ac8ef3484c593.tar.gz |
Change run_ctest_script in ctest to not stop processing when there is an error in the script being run. Also, add a RETURN_VALUE option so that you can find out if the script failed
Diffstat (limited to 'Source/CTest/cmCTestScriptHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestScriptHandler.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 0890fd16a4..0c292e5f9a 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -445,6 +445,10 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg) cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read script: " << script.c_str() << std::endl); + // Reset the error flag so that it can run more than + // one script with an error when you + // use ctest_run_script + cmSystemTools::ResetErrorOccuredFlag(); return 2; } @@ -1030,12 +1034,16 @@ void cmCTestScriptHandler::RestoreBackupDirectories() } bool cmCTestScriptHandler::RunScript(cmCTest* ctest, const char *sname, - bool InProcess) + bool InProcess, int* returnValue) { cmCTestScriptHandler* sh = new cmCTestScriptHandler(); sh->SetCTestInstance(ctest); sh->AddConfigurationScript(sname,InProcess); - sh->ProcessHandler(); + int res = sh->ProcessHandler(); + if(returnValue) + { + *returnValue = res; + } delete sh; return true; } |