diff options
author | Ken Martin <ken.martin@kitware.com> | 2003-12-03 19:16:21 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2003-12-03 19:16:21 (GMT) |
commit | 10f88cd333b80a47165896dc20edd6da6f5b79e8 (patch) | |
tree | df1b3cc847081344a53a15ba014786d18a27ad0e | |
parent | cee49e74cf2e1fb4d83f0bd15a3e1ae4df0b0dcc (diff) | |
download | CMake-10f88cd333b80a47165896dc20edd6da6f5b79e8.zip CMake-10f88cd333b80a47165896dc20edd6da6f5b79e8.tar.gz CMake-10f88cd333b80a47165896dc20edd6da6f5b79e8.tar.bz2 |
some fixes to test harnes
-rw-r--r-- | Source/cmCTest.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index a411d97..0274e27 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2574,6 +2574,14 @@ int cmCTest::RunConfigurationScript() // read in the list file to fill the cache cmLocalGenerator *lg = gg.CreateLocalGenerator(); lg->SetGlobalGenerator(&gg); + + // set a variable with the path to the current script + lg->GetMakefile()->AddDefinition("CTEST_SCRIPT_DIRECTORY", + cmSystemTools::GetFilenamePath( + m_ConfigurationScript).c_str()); + lg->GetMakefile()->AddDefinition("CTEST_SCRIPT_NAME", + cmSystemTools::GetFilenameName( + m_ConfigurationScript).c_str()); if (!lg->GetMakefile()->ReadListFile(0, m_ConfigurationScript.c_str())) { return -2; @@ -2658,9 +2666,10 @@ int cmCTest::RunConfigurationScript() if (cmakeCmd) { command = cmakeCmd; - command += " "; + command += " \""; command += srcDir; output.empty(); + command += "\""; retVal = 0; res = cmSystemTools::RunSingleCommand(command.c_str(), &output, &retVal, binDir, @@ -2679,7 +2688,9 @@ int cmCTest::RunConfigurationScript() res = cmSystemTools::RunSingleCommand(command.c_str(), &output, &retVal, binDir, m_Verbose, 0 /*m_TimeOut*/); - if (!res || retVal != 0) + + // the main ctest return values need to be fixed + if (!res /* || retVal != 0 */) { cmSystemTools::Error("Unable to run ctest"); return -6; |