now can do extra updates

This commit is contained in:
Ken Martin 2003-12-12 08:09:05 -05:00
parent add1f25f58
commit 256947ed08

View File

@ -2666,15 +2666,33 @@ int cmCTest::RunConfigurationScript()
if (cvsCmd) if (cvsCmd)
{ {
command = cvsCmd; command = cvsCmd;
output.empty(); char updateVar[40];
retVal = 0; int i;
res = cmSystemTools::RunSingleCommand(command.c_str(), &output, for (i = 1; i < 10; ++i)
&retVal, binDir,
m_Verbose, 0 /*m_TimeOut*/);
if (!res || retVal != 0)
{ {
cmSystemTools::Error("Unable to perform cvs update"); sprintf(updateVar,"CTEST_EXTRA_UPDATES_%i",i);
return -5; const char *updateVal = mf->GetDefinition(updateVar);
if (updateVal)
{
std::vector<std::string> cvsArgs;
cmSystemTools::ExpandListArgument(updateVal,cvsArgs);
if (cvsArgs.size() == 2)
{
std::string fullCommand = command;
fullCommand += " update ";
fullCommand += cvsArgs[1];
output.empty();
retVal = 0;
res = cmSystemTools::RunSingleCommand(fullCommand.c_str(), &output,
&retVal, cvsArgs[0].c_str(),
m_Verbose, 0 /*m_TimeOut*/);
if (!res || retVal != 0)
{
cmSystemTools::Error("Unable to perform extra cvs updates");
return -5;
}
}
}
} }
} }