Try to avoid cronic random failures on some Macs.

This commit is contained in:
Bill Hoffman 2009-10-04 09:32:48 -04:00
parent eddfb095f9
commit 78f68ef1b7
1 changed files with 15 additions and 2 deletions

View File

@ -149,8 +149,21 @@ int cmCPackOSXX11Generator::CompressFiles(const char* outFileName,
cmCPackLogger(cmCPackLog::LOG_VERBOSE, cmCPackLogger(cmCPackLog::LOG_VERBOSE,
"Compress disk image using command: " "Compress disk image using command: "
<< dmgCmd.str().c_str() << std::endl); << dmgCmd.str().c_str() << std::endl);
bool res = cmSystemTools::RunSingleCommand(dmgCmd.str().c_str(), &output, // since we get random dashboard failures with this one
&retVal, 0, this->GeneratorVerbose, 0); // try running it more than once
int numTries = 4;
bool res;
while(numTries > 0)
{
res = cmSystemTools::RunSingleCommand(dmgCmd.str().c_str(), &output,
&retVal, 0,
this->GeneratorVerbose, 0);
if(res && retVal)
{
numTries = -1;
}
numTries--;
}
if ( !res || retVal ) if ( !res || retVal )
{ {
cmGeneratedFileStream ofs(tmpFile.c_str()); cmGeneratedFileStream ofs(tmpFile.c_str());