some fixes to test harnes
This commit is contained in:
parent
cee49e74cf
commit
10f88cd333
|
@ -2574,6 +2574,14 @@ int cmCTest::RunConfigurationScript()
|
||||||
// read in the list file to fill the cache
|
// read in the list file to fill the cache
|
||||||
cmLocalGenerator *lg = gg.CreateLocalGenerator();
|
cmLocalGenerator *lg = gg.CreateLocalGenerator();
|
||||||
lg->SetGlobalGenerator(&gg);
|
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()))
|
if (!lg->GetMakefile()->ReadListFile(0, m_ConfigurationScript.c_str()))
|
||||||
{
|
{
|
||||||
return -2;
|
return -2;
|
||||||
|
@ -2658,9 +2666,10 @@ int cmCTest::RunConfigurationScript()
|
||||||
if (cmakeCmd)
|
if (cmakeCmd)
|
||||||
{
|
{
|
||||||
command = cmakeCmd;
|
command = cmakeCmd;
|
||||||
command += " ";
|
command += " \"";
|
||||||
command += srcDir;
|
command += srcDir;
|
||||||
output.empty();
|
output.empty();
|
||||||
|
command += "\"";
|
||||||
retVal = 0;
|
retVal = 0;
|
||||||
res = cmSystemTools::RunSingleCommand(command.c_str(), &output,
|
res = cmSystemTools::RunSingleCommand(command.c_str(), &output,
|
||||||
&retVal, binDir,
|
&retVal, binDir,
|
||||||
|
@ -2679,7 +2688,9 @@ int cmCTest::RunConfigurationScript()
|
||||||
res = cmSystemTools::RunSingleCommand(command.c_str(), &output,
|
res = cmSystemTools::RunSingleCommand(command.c_str(), &output,
|
||||||
&retVal, binDir,
|
&retVal, binDir,
|
||||||
m_Verbose, 0 /*m_TimeOut*/);
|
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");
|
cmSystemTools::Error("Unable to run ctest");
|
||||||
return -6;
|
return -6;
|
||||||
|
|
Loading…
Reference in New Issue