STYLE: Fix some style issues
This commit is contained in:
parent
cb95c0a5bc
commit
26e1fea95b
@ -81,7 +81,8 @@ struct tm* cmCTest::GetNightlyTime(std::string str,
|
|||||||
// time of the current open dashboard
|
// time of the current open dashboard
|
||||||
ntime -= dayLength;
|
ntime -= dayLength;
|
||||||
cmCTestLog(this, DEBUG, "Pick yesterday" << std::endl);
|
cmCTestLog(this, DEBUG, "Pick yesterday" << std::endl);
|
||||||
cmCTestLog(this, DEBUG, " Future time, subtract day: " << ntime << std::endl);
|
cmCTestLog(this, DEBUG, " Future time, subtract day: " << ntime
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
while ( tctime > (ntime + dayLength) )
|
while ( tctime > (ntime + dayLength) )
|
||||||
{
|
{
|
||||||
@ -145,7 +146,8 @@ std::string cmCTest::MakeXMLSafe(const std::string& str)
|
|||||||
for ( ;*pos; ++pos)
|
for ( ;*pos; ++pos)
|
||||||
{
|
{
|
||||||
char ch = *pos;
|
char ch = *pos;
|
||||||
if ( (ch > 126 || ch < 32) && ch != 9 && ch != 10 && ch != 13 && ch != '\r' )
|
if ( (ch > 126 || ch < 32) && ch != 9 &&
|
||||||
|
ch != 10 && ch != 13 && ch != '\r' )
|
||||||
{
|
{
|
||||||
char buffer[33];
|
char buffer[33];
|
||||||
sprintf(buffer, "<%d>", (int)ch);
|
sprintf(buffer, "<%d>", (int)ch);
|
||||||
@ -277,7 +279,8 @@ cmCTest::~cmCTest()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
int cmCTest::Initialize(const char* binary_dir, bool new_tag, bool verbose_tag)
|
int cmCTest::Initialize(const char* binary_dir, bool new_tag,
|
||||||
|
bool verbose_tag)
|
||||||
{
|
{
|
||||||
cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
|
cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
|
||||||
if(!m_InteractiveDebugMode)
|
if(!m_InteractiveDebugMode)
|
||||||
@ -296,8 +299,8 @@ int cmCTest::Initialize(const char* binary_dir, bool new_tag, bool verbose_tag)
|
|||||||
cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
|
cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
|
||||||
cmCTestLog(this, OUTPUT,
|
cmCTestLog(this, OUTPUT,
|
||||||
" Site: " << this->GetCTestConfiguration("Site") << std::endl
|
" Site: " << this->GetCTestConfiguration("Site") << std::endl
|
||||||
<< " Build name: " << this->GetCTestConfiguration("BuildName") << std::endl
|
<< " Build name: " << this->GetCTestConfiguration("BuildName")
|
||||||
);
|
<< std::endl);
|
||||||
cmCTestLog(this, DEBUG, "Produce XML is on" << std::endl);
|
cmCTestLog(this, DEBUG, "Produce XML is on" << std::endl);
|
||||||
if ( this->GetCTestConfiguration("NightlyStartTime").empty() )
|
if ( this->GetCTestConfiguration("NightlyStartTime").empty() )
|
||||||
{
|
{
|
||||||
@ -309,7 +312,8 @@ int cmCTest::Initialize(const char* binary_dir, bool new_tag, bool verbose_tag)
|
|||||||
|
|
||||||
if ( !this->ReadCustomConfigurationFileTree(m_BinaryDir.c_str()) )
|
if ( !this->ReadCustomConfigurationFileTree(m_BinaryDir.c_str()) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, DEBUG, "Cannot find custom configuration file tree" << std::endl);
|
cmCTestLog(this, DEBUG, "Cannot find custom configuration file tree"
|
||||||
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,8 +324,8 @@ int cmCTest::Initialize(const char* binary_dir, bool new_tag, bool verbose_tag)
|
|||||||
{
|
{
|
||||||
if ( !cmSystemTools::FileIsDirectory(testingDir.c_str()) )
|
if ( !cmSystemTools::FileIsDirectory(testingDir.c_str()) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "File " << testingDir << " is in the place of the testing directory"
|
cmCTestLog(this, ERROR_MESSAGE, "File " << testingDir
|
||||||
<< std::endl);
|
<< " is in the place of the testing directory" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -329,8 +333,8 @@ int cmCTest::Initialize(const char* binary_dir, bool new_tag, bool verbose_tag)
|
|||||||
{
|
{
|
||||||
if ( !cmSystemTools::MakeDirectory(testingDir.c_str()) )
|
if ( !cmSystemTools::MakeDirectory(testingDir.c_str()) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot create directory " << testingDir
|
cmCTestLog(this, ERROR_MESSAGE, "Cannot create directory "
|
||||||
<< std::endl);
|
<< testingDir << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -361,20 +365,24 @@ int cmCTest::Initialize(const char* binary_dir, bool new_tag, bool verbose_tag)
|
|||||||
std::string tagmode;
|
std::string tagmode;
|
||||||
if ( cmSystemTools::GetLineFromStream(tfin, tagmode) )
|
if ( cmSystemTools::GetLineFromStream(tfin, tagmode) )
|
||||||
{
|
{
|
||||||
if ( tagmode.size() > 4 && !( m_Tests[cmCTest::START_TEST] || m_Tests[ALL_TEST] ))
|
if ( tagmode.size() > 4 && !( m_Tests[cmCTest::START_TEST] ||
|
||||||
|
m_Tests[ALL_TEST] ))
|
||||||
{
|
{
|
||||||
m_TestModel = cmCTest::GetTestModelFromString(tagmode.c_str());
|
m_TestModel = cmCTest::GetTestModelFromString(tagmode.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tfin.close();
|
tfin.close();
|
||||||
}
|
}
|
||||||
if ( tag.size() == 0 || new_tag || m_Tests[cmCTest::START_TEST] || m_Tests[ALL_TEST])
|
if ( tag.size() == 0 || new_tag || m_Tests[cmCTest::START_TEST] ||
|
||||||
|
m_Tests[ALL_TEST])
|
||||||
{
|
{
|
||||||
cmCTestLog(this, DEBUG, "TestModel: " << this->GetTestModelString() << std::endl);
|
cmCTestLog(this, DEBUG, "TestModel: " << this->GetTestModelString()
|
||||||
|
<< std::endl);
|
||||||
cmCTestLog(this, DEBUG, "TestModel: " << m_TestModel << std::endl);
|
cmCTestLog(this, DEBUG, "TestModel: " << m_TestModel << std::endl);
|
||||||
if ( m_TestModel == cmCTest::NIGHTLY )
|
if ( m_TestModel == cmCTest::NIGHTLY )
|
||||||
{
|
{
|
||||||
lctime = this->GetNightlyTime(this->GetCTestConfiguration("NightlyStartTime"), m_TomorrowTag);
|
lctime = this->GetNightlyTime(
|
||||||
|
this->GetCTestConfiguration("NightlyStartTime"), m_TomorrowTag);
|
||||||
}
|
}
|
||||||
char datestring[100];
|
char datestring[100];
|
||||||
sprintf(datestring, "%04d%02d%02d-%02d%02d",
|
sprintf(datestring, "%04d%02d%02d-%02d%02d",
|
||||||
@ -410,7 +418,8 @@ bool cmCTest::InitializeFromCommand(cmCTestCommand* command, bool first)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string src_dir = this->GetCTestConfiguration("SourceDirectory").c_str();
|
std::string src_dir
|
||||||
|
= this->GetCTestConfiguration("SourceDirectory").c_str();
|
||||||
std::string bld_dir = this->GetCTestConfiguration("BuildDirectory").c_str();
|
std::string bld_dir = this->GetCTestConfiguration("BuildDirectory").c_str();
|
||||||
m_DartVersion = 1;
|
m_DartVersion = 1;
|
||||||
m_SubmitFiles.clear();
|
m_SubmitFiles.clear();
|
||||||
@ -421,7 +430,8 @@ bool cmCTest::InitializeFromCommand(cmCTestCommand* command, bool first)
|
|||||||
cmSystemTools::ConvertToUnixSlashes(fname);
|
cmSystemTools::ConvertToUnixSlashes(fname);
|
||||||
if ( cmSystemTools::FileExists(fname.c_str()) )
|
if ( cmSystemTools::FileExists(fname.c_str()) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, OUTPUT, " Reading ctest configuration file: " << fname.c_str() << std::endl);
|
cmCTestLog(this, OUTPUT, " Reading ctest configuration file: "
|
||||||
|
<< fname.c_str() << std::endl);
|
||||||
bool readit = mf->ReadListFile(mf->GetCurrentListFile(),
|
bool readit = mf->ReadListFile(mf->GetCurrentListFile(),
|
||||||
fname.c_str() );
|
fname.c_str() );
|
||||||
if(!readit)
|
if(!readit)
|
||||||
@ -434,24 +444,30 @@ bool cmCTest::InitializeFromCommand(cmCTestCommand* command, bool first)
|
|||||||
}
|
}
|
||||||
else if ( !first )
|
else if ( !first )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, WARNING, "Cannot locate CTest configuration: " << fname.c_str() << std::endl);
|
cmCTestLog(this, WARNING, "Cannot locate CTest configuration: "
|
||||||
|
<< fname.c_str() << std::endl);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmCTestLog(this, HANDLER_OUTPUT, " Cannot locate CTest configuration: " << fname.c_str() << std::endl
|
cmCTestLog(this, HANDLER_OUTPUT, " Cannot locate CTest configuration: "
|
||||||
|
<< fname.c_str() << std::endl
|
||||||
<< " Delay the initialization of CTest" << std::endl);
|
<< " Delay the initialization of CTest" << std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->SetCTestConfigurationFromCMakeVariable(mf, "NightlyStartTime", "CTEST_NIGHTLY_START_TIME");
|
this->SetCTestConfigurationFromCMakeVariable(mf, "NightlyStartTime",
|
||||||
|
"CTEST_NIGHTLY_START_TIME");
|
||||||
this->SetCTestConfigurationFromCMakeVariable(mf, "Site", "CTEST_SITE");
|
this->SetCTestConfigurationFromCMakeVariable(mf, "Site", "CTEST_SITE");
|
||||||
this->SetCTestConfigurationFromCMakeVariable(mf, "BuildName", "CTEST_BUILD_NAME");
|
this->SetCTestConfigurationFromCMakeVariable(mf, "BuildName",
|
||||||
|
"CTEST_BUILD_NAME");
|
||||||
const char* dartVersion = mf->GetDefinition("CTEST_DART_SERVER_VERSION");
|
const char* dartVersion = mf->GetDefinition("CTEST_DART_SERVER_VERSION");
|
||||||
if ( dartVersion )
|
if ( dartVersion )
|
||||||
{
|
{
|
||||||
m_DartVersion = atoi(dartVersion);
|
m_DartVersion = atoi(dartVersion);
|
||||||
if ( m_DartVersion < 0 )
|
if ( m_DartVersion < 0 )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Invalid Dart server version: " << dartVersion << ". Please specify the version number." << std::endl);
|
cmCTestLog(this, ERROR_MESSAGE, "Invalid Dart server version: "
|
||||||
|
<< dartVersion << ". Please specify the version number."
|
||||||
|
<< std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -464,7 +480,8 @@ bool cmCTest::InitializeFromCommand(cmCTestCommand* command, bool first)
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
cmCTestLog(this, OUTPUT, " Use " << this->GetTestModelString() << " tag: " << this->GetCurrentTag() << std::endl);
|
cmCTestLog(this, OUTPUT, " Use " << this->GetTestModelString()
|
||||||
|
<< " tag: " << this->GetCurrentTag() << std::endl);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -490,7 +507,8 @@ bool cmCTest::UpdateCTestConfiguration()
|
|||||||
// No need to exit if we are not producing XML
|
// No need to exit if we are not producing XML
|
||||||
if ( m_ProduceXML )
|
if ( m_ProduceXML )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot find file: " << fileName.c_str() << std::endl);
|
cmCTestLog(this, ERROR_MESSAGE, "Cannot find file: " << fileName.c_str()
|
||||||
|
<< std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -532,7 +550,8 @@ bool cmCTest::UpdateCTestConfiguration()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
std::string key = line.substr(0, cpos);
|
std::string key = line.substr(0, cpos);
|
||||||
std::string value = cmCTest::CleanString(line.substr(cpos+1, line.npos));
|
std::string value
|
||||||
|
= cmCTest::CleanString(line.substr(cpos+1, line.npos));
|
||||||
m_CTestConfiguration[key] = value;
|
m_CTestConfiguration[key] = value;
|
||||||
}
|
}
|
||||||
fin.close();
|
fin.close();
|
||||||
@ -540,7 +559,8 @@ bool cmCTest::UpdateCTestConfiguration()
|
|||||||
m_TimeOut = atoi(this->GetCTestConfiguration("TimeOut").c_str());
|
m_TimeOut = atoi(this->GetCTestConfiguration("TimeOut").c_str());
|
||||||
if ( m_ProduceXML )
|
if ( m_ProduceXML )
|
||||||
{
|
{
|
||||||
m_CompressXMLFiles = cmSystemTools::IsOn(this->GetCTestConfiguration("CompressSubmission").c_str());
|
m_CompressXMLFiles = cmSystemTools::IsOn(
|
||||||
|
this->GetCTestConfiguration("CompressSubmission").c_str());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -609,7 +629,8 @@ bool cmCTest::SetTest(const char* ttype, bool report)
|
|||||||
{
|
{
|
||||||
if ( report )
|
if ( report )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Don't know about test \"" << ttype << "\" yet..." << std::endl);
|
cmCTestLog(this, ERROR_MESSAGE, "Don't know about test \"" << ttype
|
||||||
|
<< "\" yet..." << std::endl);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -654,7 +675,8 @@ bool cmCTest::OpenOutputFile(const std::string& path,
|
|||||||
stream.Open(filename.c_str());
|
stream.Open(filename.c_str());
|
||||||
if( !stream )
|
if( !stream )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Problem opening file: " << filename << std::endl);
|
cmCTestLog(this, ERROR_MESSAGE, "Problem opening file: " << filename
|
||||||
|
<< std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ( compress )
|
if ( compress )
|
||||||
@ -754,7 +776,8 @@ int cmCTest::ProcessTests()
|
|||||||
if ( m_Tests[UPDATE_TEST] || m_Tests[ALL_TEST] )
|
if ( m_Tests[UPDATE_TEST] || m_Tests[ALL_TEST] )
|
||||||
{
|
{
|
||||||
cmCTestGenericHandler* uphandler = this->GetHandler("update");
|
cmCTestGenericHandler* uphandler = this->GetHandler("update");
|
||||||
uphandler->SetOption("SourceDirectory", this->GetCTestConfiguration("SourceDirectory").c_str());
|
uphandler->SetOption("SourceDirectory",
|
||||||
|
this->GetCTestConfiguration("SourceDirectory").c_str());
|
||||||
update_count = uphandler->ProcessHandler();
|
update_count = uphandler->ProcessHandler();
|
||||||
if ( update_count < 0 )
|
if ( update_count < 0 )
|
||||||
{
|
{
|
||||||
@ -847,7 +870,8 @@ int cmCTest::ProcessTests()
|
|||||||
}
|
}
|
||||||
if ( res != 0 )
|
if ( res != 0 )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Errors while running CTest" << std::endl);
|
cmCTestLog(this, ERROR_MESSAGE, "Errors while running CTest"
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -981,12 +1005,14 @@ int cmCTest::RunMakeCommand(const char* command, std::string* output,
|
|||||||
if(result == cmsysProcess_State_Exited)
|
if(result == cmsysProcess_State_Exited)
|
||||||
{
|
{
|
||||||
*retVal = cmsysProcess_GetExitValue(cp);
|
*retVal = cmsysProcess_GetExitValue(cp);
|
||||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Command exited with the value: " << *retVal << std::endl);
|
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Command exited with the value: "
|
||||||
|
<< *retVal << std::endl);
|
||||||
}
|
}
|
||||||
else if(result == cmsysProcess_State_Exception)
|
else if(result == cmsysProcess_State_Exception)
|
||||||
{
|
{
|
||||||
*retVal = cmsysProcess_GetExitException(cp);
|
*retVal = cmsysProcess_GetExitException(cp);
|
||||||
cmCTestLog(this, WARNING, "There was an exception: " << *retVal << std::endl);
|
cmCTestLog(this, WARNING, "There was an exception: " << *retVal
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
else if(result == cmsysProcess_State_Expired)
|
else if(result == cmsysProcess_State_Expired)
|
||||||
{
|
{
|
||||||
@ -996,7 +1022,8 @@ int cmCTest::RunMakeCommand(const char* command, std::string* output,
|
|||||||
{
|
{
|
||||||
*output += "\n*** ERROR executing: ";
|
*output += "\n*** ERROR executing: ";
|
||||||
*output += cmsysProcess_GetErrorString(cp);
|
*output += cmsysProcess_GetErrorString(cp);
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "There was an error: " << cmsysProcess_GetErrorString(cp) << std::endl);
|
cmCTestLog(this, ERROR_MESSAGE, "There was an error: "
|
||||||
|
<< cmsysProcess_GetErrorString(cp) << std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmsysProcess_Delete(cp);
|
cmsysProcess_Delete(cp);
|
||||||
@ -1041,7 +1068,8 @@ int cmCTest::RunTest(std::vector<const char*> argv,
|
|||||||
}
|
}
|
||||||
cmSystemTools::ChangeDirectory(oldpath.c_str());
|
cmSystemTools::ChangeDirectory(oldpath.c_str());
|
||||||
|
|
||||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Internal cmCTest object used to run test." << std::endl
|
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
|
||||||
|
"Internal cmCTest object used to run test." << std::endl
|
||||||
<< *output << std::endl);
|
<< *output << std::endl);
|
||||||
return cmsysProcess_State_Exited;
|
return cmsysProcess_State_Exited;
|
||||||
}
|
}
|
||||||
@ -1081,7 +1109,8 @@ int cmCTest::RunTest(std::vector<const char*> argv,
|
|||||||
{
|
{
|
||||||
output->append(&*tempOutput.begin(), tempOutput.size());
|
output->append(&*tempOutput.begin(), tempOutput.size());
|
||||||
}
|
}
|
||||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "-- Process completed" << std::endl);
|
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "-- Process completed"
|
||||||
|
<< std::endl);
|
||||||
|
|
||||||
int result = cmsysProcess_GetState(cp);
|
int result = cmsysProcess_GetState(cp);
|
||||||
|
|
||||||
@ -1095,14 +1124,16 @@ int cmCTest::RunTest(std::vector<const char*> argv,
|
|||||||
std::string outerr = "\n*** Exception executing: ";
|
std::string outerr = "\n*** Exception executing: ";
|
||||||
outerr += cmsysProcess_GetExceptionString(cp);
|
outerr += cmsysProcess_GetExceptionString(cp);
|
||||||
*output += outerr;
|
*output += outerr;
|
||||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, outerr.c_str() << std::endl << std::flush);
|
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, outerr.c_str() << std::endl
|
||||||
|
<< std::flush);
|
||||||
}
|
}
|
||||||
else if(result == cmsysProcess_State_Error)
|
else if(result == cmsysProcess_State_Error)
|
||||||
{
|
{
|
||||||
std::string outerr = "\n*** ERROR executing: ";
|
std::string outerr = "\n*** ERROR executing: ";
|
||||||
outerr += cmsysProcess_GetErrorString(cp);
|
outerr += cmsysProcess_GetErrorString(cp);
|
||||||
*output += outerr;
|
*output += outerr;
|
||||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, outerr.c_str() << std::endl << std::flush);
|
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, outerr.c_str() << std::endl
|
||||||
|
<< std::flush);
|
||||||
}
|
}
|
||||||
cmsysProcess_Delete(cp);
|
cmsysProcess_Delete(cp);
|
||||||
|
|
||||||
@ -1128,12 +1159,16 @@ void cmCTest::EndXML(std::ostream& ostr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
int cmCTest::GenerateCTestNotesOutput(std::ostream& os, const cmCTest::tm_VectorOfStrings& files)
|
int cmCTest::GenerateCTestNotesOutput(std::ostream& os,
|
||||||
|
const cmCTest::tm_VectorOfStrings& files)
|
||||||
{
|
{
|
||||||
cmCTest::tm_VectorOfStrings::const_iterator it;
|
cmCTest::tm_VectorOfStrings::const_iterator it;
|
||||||
os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||||
<< "<?xml-stylesheet type=\"text/xsl\" href=\"Dart/Source/Server/XSL/Build.xsl <file:///Dart/Source/Server/XSL/Build.xsl> \"?>\n"
|
<< "<?xml-stylesheet type=\"text/xsl\" "
|
||||||
<< "<Site BuildName=\"" << this->GetCTestConfiguration("BuildName") << "\" BuildStamp=\""
|
"href=\"Dart/Source/Server/XSL/Build.xsl "
|
||||||
|
"<file:///Dart/Source/Server/XSL/Build.xsl> \"?>\n"
|
||||||
|
<< "<Site BuildName=\"" << this->GetCTestConfiguration("BuildName")
|
||||||
|
<< "\" BuildStamp=\""
|
||||||
<< m_CurrentTag << "-" << this->GetTestModelString() << "\" Name=\""
|
<< m_CurrentTag << "-" << this->GetTestModelString() << "\" Name=\""
|
||||||
<< this->GetCTestConfiguration("Site") << "\" Generator=\"ctest"
|
<< this->GetCTestConfiguration("Site") << "\" Generator=\"ctest"
|
||||||
<< cmVersion::GetCMakeVersion()
|
<< cmVersion::GetCMakeVersion()
|
||||||
@ -1160,7 +1195,8 @@ int cmCTest::GenerateCTestNotesOutput(std::ostream& os, const cmCTest::tm_Vector
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
os << "Problem reading file: " << it->c_str() << std::endl;
|
os << "Problem reading file: " << it->c_str() << std::endl;
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Problem reading file: " << it->c_str() << " while creating notes" << std::endl);
|
cmCTestLog(this, ERROR_MESSAGE, "Problem reading file: " << it->c_str()
|
||||||
|
<< " while creating notes" << std::endl);
|
||||||
}
|
}
|
||||||
os << "</Text>\n"
|
os << "</Text>\n"
|
||||||
<< "</Note>" << std::endl;
|
<< "</Note>" << std::endl;
|
||||||
@ -1215,7 +1251,8 @@ bool cmCTest::SubmitExtraFiles(const std::vector<cmStdString> &files)
|
|||||||
{
|
{
|
||||||
if ( !cmSystemTools::FileExists(it->c_str()) )
|
if ( !cmSystemTools::FileExists(it->c_str()) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot find extra file: " << it->c_str() << " to submit."
|
cmCTestLog(this, ERROR_MESSAGE, "Cannot find extra file: "
|
||||||
|
<< it->c_str() << " to submit."
|
||||||
<< std::endl;);
|
<< std::endl;);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1246,7 +1283,8 @@ bool cmCTest::SubmitExtraFiles(const char* cfiles)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
bool cmCTest::CheckArgument(const std::string& arg, const char* varg1, const char* varg2)
|
bool cmCTest::CheckArgument(const std::string& arg, const char* varg1,
|
||||||
|
const char* varg2)
|
||||||
{
|
{
|
||||||
if ( varg1 && arg == varg1 || varg2 && arg == varg2 )
|
if ( varg1 && arg == varg1 || varg2 && arg == varg2 )
|
||||||
{
|
{
|
||||||
@ -1271,7 +1309,8 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
|
|||||||
this->m_CTestConfigFile= args[i];
|
this->m_CTestConfigFile= args[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this->CheckArgument(arg, "-C", "--build-config") && i < args.size() - 1)
|
if(this->CheckArgument(arg, "-C", "--build-config") &&
|
||||||
|
i < args.size() - 1)
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
this->m_ConfigType = args[i];
|
this->m_ConfigType = args[i];
|
||||||
@ -1309,7 +1348,8 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
|
|||||||
{
|
{
|
||||||
this->m_RunConfigurationScript = true;
|
this->m_RunConfigurationScript = true;
|
||||||
i++;
|
i++;
|
||||||
cmCTestScriptHandler* ch = static_cast<cmCTestScriptHandler*>(this->GetHandler("script"));
|
cmCTestScriptHandler* ch
|
||||||
|
= static_cast<cmCTestScriptHandler*>(this->GetHandler("script"));
|
||||||
ch->AddConfigurationScript(args[i].c_str());
|
ch->AddConfigurationScript(args[i].c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1327,7 +1367,8 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
|
|||||||
{
|
{
|
||||||
m_ForceNewCTestProcess = true;
|
m_ForceNewCTestProcess = true;
|
||||||
}
|
}
|
||||||
if(this->CheckArgument(arg, "--interactive-debug-mode") && i < args.size() - 1 )
|
if(this->CheckArgument(arg, "--interactive-debug-mode") &&
|
||||||
|
i < args.size() - 1 )
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
m_InteractiveDebugMode = cmSystemTools::IsOn(args[i].c_str());
|
m_InteractiveDebugMode = cmSystemTools::IsOn(args[i].c_str());
|
||||||
@ -1525,29 +1566,38 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
performSomeTest = false;
|
performSomeTest = false;
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "CTest -D called with incorrect option: " << targ << std::endl);
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
|
"CTest -D called with incorrect option: " << targ << std::endl);
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl
|
cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl
|
||||||
<< " " << ctestExec << " -D Continuous" << std::endl
|
<< " " << ctestExec << " -D Continuous" << std::endl
|
||||||
<< " " << ctestExec << " -D Continuous(Start|Update|Configure|Build)" << std::endl
|
<< " " << ctestExec
|
||||||
<< " " << ctestExec << " -D Continuous(Test|Coverage|MemCheck|Submit)" << std::endl
|
<< " -D Continuous(Start|Update|Configure|Build)" << std::endl
|
||||||
|
<< " " << ctestExec
|
||||||
|
<< " -D Continuous(Test|Coverage|MemCheck|Submit)" << std::endl
|
||||||
<< " " << ctestExec << " -D Experimental" << std::endl
|
<< " " << ctestExec << " -D Experimental" << std::endl
|
||||||
<< " " << ctestExec << " -D Experimental(Start|Update|Configure|Build)" << std::endl
|
<< " " << ctestExec
|
||||||
<< " " << ctestExec << " -D Experimental(Test|Coverage|MemCheck|Submit)" << std::endl
|
<< " -D Experimental(Start|Update|Configure|Build)" << std::endl
|
||||||
|
<< " " << ctestExec
|
||||||
|
<< " -D Experimental(Test|Coverage|MemCheck|Submit)" << std::endl
|
||||||
<< " " << ctestExec << " -D Nightly" << std::endl
|
<< " " << ctestExec << " -D Nightly" << std::endl
|
||||||
<< " " << ctestExec << " -D Nightly(Start|Update|Configure|Build)" << std::endl
|
<< " " << ctestExec
|
||||||
<< " " << ctestExec << " -D Nightly(Test|Coverage|MemCheck|Submit)" << std::endl
|
<< " -D Nightly(Start|Update|Configure|Build)" << std::endl
|
||||||
|
<< " " << ctestExec
|
||||||
|
<< " -D Nightly(Test|Coverage|MemCheck|Submit)" << std::endl
|
||||||
<< " " << ctestExec << " -D NightlyMemoryCheck" << std::endl);
|
<< " " << ctestExec << " -D NightlyMemoryCheck" << std::endl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this->CheckArgument(arg, "-T", "--test-action") && (i < args.size() -1) )
|
if(this->CheckArgument(arg, "-T", "--test-action") &&
|
||||||
|
(i < args.size() -1) )
|
||||||
{
|
{
|
||||||
this->m_ProduceXML = true;
|
this->m_ProduceXML = true;
|
||||||
i++;
|
i++;
|
||||||
if ( !this->SetTest(args[i].c_str(), false) )
|
if ( !this->SetTest(args[i].c_str(), false) )
|
||||||
{
|
{
|
||||||
performSomeTest = false;
|
performSomeTest = false;
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "CTest -T called with incorrect option: "
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
|
"CTest -T called with incorrect option: "
|
||||||
<< args[i].c_str() << std::endl);
|
<< args[i].c_str() << std::endl);
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl
|
cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl
|
||||||
<< " " << ctestExec << " -T all" << std::endl
|
<< " " << ctestExec << " -T all" << std::endl
|
||||||
@ -1563,7 +1613,8 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this->CheckArgument(arg, "-M", "--test-model") && (i < args.size() -1) )
|
if(this->CheckArgument(arg, "-M", "--test-model") &&
|
||||||
|
(i < args.size() -1) )
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
std::string const& str = args[i];
|
std::string const& str = args[i];
|
||||||
@ -1582,7 +1633,9 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
performSomeTest = false;
|
performSomeTest = false;
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "CTest -M called with incorrect option: " << str.c_str() << std::endl);
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
|
"CTest -M called with incorrect option: " << str.c_str()
|
||||||
|
<< std::endl);
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl
|
cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl
|
||||||
<< " " << ctestExec << " -M Continuous" << std::endl
|
<< " " << ctestExec << " -M Continuous" << std::endl
|
||||||
<< " " << ctestExec << " -M Experimental" << std::endl
|
<< " " << ctestExec << " -M Experimental" << std::endl
|
||||||
@ -1590,10 +1643,12 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this->CheckArgument(arg, "-I", "--tests-information") && i < args.size() - 1)
|
if(this->CheckArgument(arg, "-I", "--tests-information") &&
|
||||||
|
i < args.size() - 1)
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
this->GetHandler("test")->SetOption("TestsToRunInformation", args[i].c_str());
|
this->GetHandler("test")->SetOption("TestsToRunInformation",
|
||||||
|
args[i].c_str());
|
||||||
}
|
}
|
||||||
if(this->CheckArgument(arg, "-U", "--union"))
|
if(this->CheckArgument(arg, "-U", "--union"))
|
||||||
{
|
{
|
||||||
@ -1602,13 +1657,16 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
|
|||||||
if(this->CheckArgument(arg, "-R", "--tests-regex") && i < args.size() - 1)
|
if(this->CheckArgument(arg, "-R", "--tests-regex") && i < args.size() - 1)
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
this->GetHandler("test")->SetOption("IncludeRegularExpression", args[i].c_str());
|
this->GetHandler("test")->SetOption("IncludeRegularExpression",
|
||||||
|
args[i].c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this->CheckArgument(arg, "-E", "--exclude-regex") && i < args.size() - 1)
|
if(this->CheckArgument(arg, "-E", "--exclude-regex") &&
|
||||||
|
i < args.size() - 1)
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
this->GetHandler("test")->SetOption("ExcludeRegularExpression", args[i].c_str());
|
this->GetHandler("test")->SetOption("ExcludeRegularExpression",
|
||||||
|
args[i].c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this->CheckArgument(arg, "--overwrite") && i < args.size() - 1)
|
if(this->CheckArgument(arg, "--overwrite") && i < args.size() - 1)
|
||||||
@ -1639,11 +1697,14 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
|
|||||||
cmakeAndTest = true;
|
cmakeAndTest = true;
|
||||||
}
|
}
|
||||||
cmCTest::t_TestingHandlers::iterator it;
|
cmCTest::t_TestingHandlers::iterator it;
|
||||||
for ( it = m_TestingHandlers.begin(); it != m_TestingHandlers.end(); ++ it )
|
for ( it = m_TestingHandlers.begin();
|
||||||
|
it != m_TestingHandlers.end();
|
||||||
|
++ it )
|
||||||
{
|
{
|
||||||
if ( !it->second->ProcessCommandLineArguments(arg, i, args) )
|
if ( !it->second->ProcessCommandLineArguments(arg, i, args) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Problem parsing command line arguments within a handler");
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
|
"Problem parsing command line arguments within a handler");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1681,7 +1742,9 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
|
|||||||
cmCTestLog(this, OUTPUT, "* Extra verbosity turned on" << std::endl);
|
cmCTestLog(this, OUTPUT, "* Extra verbosity turned on" << std::endl);
|
||||||
}
|
}
|
||||||
cmCTest::t_TestingHandlers::iterator it;
|
cmCTest::t_TestingHandlers::iterator it;
|
||||||
for ( it = m_TestingHandlers.begin(); it != m_TestingHandlers.end(); ++ it )
|
for ( it = m_TestingHandlers.begin();
|
||||||
|
it != m_TestingHandlers.end();
|
||||||
|
++ it )
|
||||||
{
|
{
|
||||||
it->second->SetVerbose(this->m_ExtraVerbose);
|
it->second->SetVerbose(this->m_ExtraVerbose);
|
||||||
it->second->SetSubmitIndex(m_SubmitIndex);
|
it->second->SetSubmitIndex(m_SubmitIndex);
|
||||||
@ -1694,17 +1757,21 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
|
|||||||
m_ExtraVerbose = m_Verbose;
|
m_ExtraVerbose = m_Verbose;
|
||||||
m_Verbose = true;
|
m_Verbose = true;
|
||||||
cmCTest::t_TestingHandlers::iterator it;
|
cmCTest::t_TestingHandlers::iterator it;
|
||||||
for ( it = m_TestingHandlers.begin(); it != m_TestingHandlers.end(); ++ it )
|
for ( it = m_TestingHandlers.begin();
|
||||||
|
it != m_TestingHandlers.end();
|
||||||
|
++ it )
|
||||||
{
|
{
|
||||||
it->second->SetVerbose(this->m_Verbose);
|
it->second->SetVerbose(this->m_Verbose);
|
||||||
it->second->SetSubmitIndex(m_SubmitIndex);
|
it->second->SetSubmitIndex(m_SubmitIndex);
|
||||||
}
|
}
|
||||||
cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
|
cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
|
||||||
if ( !this->Initialize(cmSystemTools::GetCurrentWorkingDirectory().c_str()) )
|
if ( !this->Initialize(
|
||||||
|
cmSystemTools::GetCurrentWorkingDirectory().c_str()) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
|
cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
|
||||||
res = 12;
|
res = 12;
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Problem initializing the dashboard." << std::endl);
|
cmCTestLog(this, ERROR_MESSAGE, "Problem initializing the dashboard."
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1817,11 +1884,13 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir)
|
|||||||
for ( fileIt = files.begin(); fileIt != files.end();
|
for ( fileIt = files.begin(); fileIt != files.end();
|
||||||
++ fileIt )
|
++ fileIt )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: " << fileIt->c_str() << std::endl);
|
cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: "
|
||||||
|
<< fileIt->c_str() << std::endl);
|
||||||
if ( !lg->GetMakefile()->ReadListFile(0, fileIt->c_str()) ||
|
if ( !lg->GetMakefile()->ReadListFile(0, fileIt->c_str()) ||
|
||||||
cmSystemTools::GetErrorOccuredFlag() )
|
cmSystemTools::GetErrorOccuredFlag() )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Problem reading custom configuration: " << fileIt->c_str() << std::endl);
|
cmCTestLog(this, ERROR_MESSAGE, "Problem reading custom configuration: "
|
||||||
|
<< fileIt->c_str() << std::endl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1835,7 +1904,8 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void cmCTest::PopulateCustomVector(cmMakefile* mf, const char* def, tm_VectorOfStrings& vec)
|
void cmCTest::PopulateCustomVector(cmMakefile* mf, const char* def,
|
||||||
|
tm_VectorOfStrings& vec)
|
||||||
{
|
{
|
||||||
if ( !def)
|
if ( !def)
|
||||||
{
|
{
|
||||||
@ -1874,7 +1944,8 @@ void cmCTest::PopulateCustomInteger(cmMakefile* mf, const char* def, int& val)
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
std::string cmCTest::GetShortPathToFile(const char* cfname)
|
std::string cmCTest::GetShortPathToFile(const char* cfname)
|
||||||
{
|
{
|
||||||
const std::string& sourceDir = this->GetCTestConfiguration("SourceDirectory");
|
const std::string& sourceDir
|
||||||
|
= this->GetCTestConfiguration("SourceDirectory");
|
||||||
const std::string& buildDir = this->GetCTestConfiguration("BuildDirectory");
|
const std::string& buildDir = this->GetCTestConfiguration("BuildDirectory");
|
||||||
std::string fname = cmSystemTools::CollapseFullPath(cfname);
|
std::string fname = cmSystemTools::CollapseFullPath(cfname);
|
||||||
|
|
||||||
@ -1928,7 +1999,8 @@ std::string cmCTest::GetShortPathToFile(const char* cfname)
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
std::string cmCTest::GetCTestConfiguration(const char *name)
|
std::string cmCTest::GetCTestConfiguration(const char *name)
|
||||||
{
|
{
|
||||||
if ( m_CTestConfigurationOverwrites.find(name) != m_CTestConfigurationOverwrites.end() )
|
if ( m_CTestConfigurationOverwrites.find(name) !=
|
||||||
|
m_CTestConfigurationOverwrites.end() )
|
||||||
{
|
{
|
||||||
return m_CTestConfigurationOverwrites[name];
|
return m_CTestConfigurationOverwrites[name];
|
||||||
}
|
}
|
||||||
@ -2007,7 +2079,8 @@ void cmCTest::AddCTestConfigurationOverwrite(const char* encstr)
|
|||||||
if ( epos == overStr.npos )
|
if ( epos == overStr.npos )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, ERROR_MESSAGE,
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
"CTest configuration overwrite specified in the wrong format." << std::endl
|
"CTest configuration overwrite specified in the wrong format."
|
||||||
|
<< std::endl
|
||||||
<< "Valid format is: --overwrite key=value" << std::endl
|
<< "Valid format is: --overwrite key=value" << std::endl
|
||||||
<< "The specified was: --overwrite " << overStr.c_str() << std::endl);
|
<< "The specified was: --overwrite " << overStr.c_str() << std::endl);
|
||||||
return;
|
return;
|
||||||
@ -2018,7 +2091,8 @@ void cmCTest::AddCTestConfigurationOverwrite(const char* encstr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
bool cmCTest::SetCTestConfigurationFromCMakeVariable(cmMakefile* mf, const char* dconfig, const char* cmake_var)
|
bool cmCTest::SetCTestConfigurationFromCMakeVariable(cmMakefile* mf,
|
||||||
|
const char* dconfig, const char* cmake_var)
|
||||||
{
|
{
|
||||||
const char* ctvar;
|
const char* ctvar;
|
||||||
ctvar = mf->GetDefinition(cmake_var);
|
ctvar = mf->GetDefinition(cmake_var);
|
||||||
@ -2086,7 +2160,8 @@ bool cmCTest::RunCommand(
|
|||||||
default:
|
default:
|
||||||
done = true;
|
done = true;
|
||||||
}
|
}
|
||||||
if ( (res == cmsysProcess_Pipe_STDOUT || res == cmsysProcess_Pipe_STDERR) && m_ExtraVerbose )
|
if ( (res == cmsysProcess_Pipe_STDOUT ||
|
||||||
|
res == cmsysProcess_Pipe_STDERR) && m_ExtraVerbose )
|
||||||
{
|
{
|
||||||
cmSystemTools::Stdout(data, length);
|
cmSystemTools::Stdout(data, length);
|
||||||
}
|
}
|
||||||
@ -2187,7 +2262,8 @@ void cmCTest::Log(int logType, const char* file, int line, const char* msg)
|
|||||||
{
|
{
|
||||||
bool display = true;
|
bool display = true;
|
||||||
if ( logType == cmCTest::DEBUG && !m_Debug ) { display = false; }
|
if ( logType == cmCTest::DEBUG && !m_Debug ) { display = false; }
|
||||||
if ( logType == cmCTest::HANDLER_VERBOSE_OUTPUT && !m_Debug && !m_ExtraVerbose ) { display = false; }
|
if ( logType == cmCTest::HANDLER_VERBOSE_OUTPUT && !m_Debug &&
|
||||||
|
!m_ExtraVerbose ) { display = false; }
|
||||||
if ( display )
|
if ( display )
|
||||||
{
|
{
|
||||||
cmCTestLogOutputFileLine(*m_OutputLogFile);
|
cmCTestLogOutputFileLine(*m_OutputLogFile);
|
||||||
|
@ -32,7 +32,8 @@ class cmCTestCommand;
|
|||||||
do { \
|
do { \
|
||||||
cmOStringStream cmCTestLog_msg; \
|
cmOStringStream cmCTestLog_msg; \
|
||||||
cmCTestLog_msg << msg; \
|
cmCTestLog_msg << msg; \
|
||||||
(ctSelf)->Log(cmCTest::logType, __FILE__, __LINE__, cmCTestLog_msg.str().c_str());\
|
(ctSelf)->Log(cmCTest::logType, __FILE__, __LINE__,\
|
||||||
|
cmCTestLog_msg.str().c_str());\
|
||||||
} while ( 0 )
|
} while ( 0 )
|
||||||
|
|
||||||
#ifdef cerr
|
#ifdef cerr
|
||||||
@ -57,7 +58,8 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Initialize and finalize testing
|
* Initialize and finalize testing
|
||||||
*/
|
*/
|
||||||
int Initialize(const char* binary_dir, bool new_tag = false, bool verbose_tag = true);
|
int Initialize(const char* binary_dir, bool new_tag = false,
|
||||||
|
bool verbose_tag = true);
|
||||||
bool InitializeFromCommand(cmCTestCommand* command, bool first = false);
|
bool InitializeFromCommand(cmCTestCommand* command, bool first = false);
|
||||||
void Finalize();
|
void Finalize();
|
||||||
|
|
||||||
@ -129,7 +131,8 @@ public:
|
|||||||
|
|
||||||
static void PopulateCustomVector(cmMakefile* mf, const char* definition,
|
static void PopulateCustomVector(cmMakefile* mf, const char* definition,
|
||||||
tm_VectorOfStrings& vec);
|
tm_VectorOfStrings& vec);
|
||||||
static void PopulateCustomInteger(cmMakefile* mf, const char* def, int& val);
|
static void PopulateCustomInteger(cmMakefile* mf, const char* def,
|
||||||
|
int& val);
|
||||||
|
|
||||||
///! Get the current time as string
|
///! Get the current time as string
|
||||||
std::string CurrentTime();
|
std::string CurrentTime();
|
||||||
@ -225,7 +228,8 @@ public:
|
|||||||
std::ostream* logfile);
|
std::ostream* logfile);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute handler and return its result. If the handler fails, it returns negative value.
|
* Execute handler and return its result. If the handler fails, it returns
|
||||||
|
* negative value.
|
||||||
*/
|
*/
|
||||||
int ExecuteHandler(const char* handler);
|
int ExecuteHandler(const char* handler);
|
||||||
|
|
||||||
@ -238,13 +242,14 @@ public:
|
|||||||
/*
|
/*
|
||||||
* Set the CTest variable from CMake variable
|
* Set the CTest variable from CMake variable
|
||||||
*/
|
*/
|
||||||
bool SetCTestConfigurationFromCMakeVariable(cmMakefile* mf, const char* dconfig, const char* cmake_var);
|
bool SetCTestConfigurationFromCMakeVariable(cmMakefile* mf,
|
||||||
|
const char* dconfig, const char* cmake_var);
|
||||||
|
|
||||||
//! Make string safe to be send as an URL
|
//! Make string safe to be send as an URL
|
||||||
static std::string MakeURLSafe(const std::string&);
|
static std::string MakeURLSafe(const std::string&);
|
||||||
|
|
||||||
//! Should ctect configuration be updated. When using new style ctest script,
|
//! Should ctect configuration be updated. When using new style ctest
|
||||||
// this should be true.
|
// script, this should be true.
|
||||||
void SetSuppressUpdatingCTestConfiguration(bool val)
|
void SetSuppressUpdatingCTestConfiguration(bool val)
|
||||||
{
|
{
|
||||||
m_SuppressUpdatingCTestConfiguration = val;
|
m_SuppressUpdatingCTestConfiguration = val;
|
||||||
@ -358,13 +363,15 @@ private:
|
|||||||
bool UpdateCTestConfiguration();
|
bool UpdateCTestConfiguration();
|
||||||
|
|
||||||
//! Create not from files.
|
//! Create not from files.
|
||||||
int GenerateCTestNotesOutput(std::ostream& os, const tm_VectorOfStrings& files);
|
int GenerateCTestNotesOutput(std::ostream& os,
|
||||||
|
const tm_VectorOfStrings& files);
|
||||||
|
|
||||||
///! Find the running cmake
|
///! Find the running cmake
|
||||||
void FindRunningCMake(const char* arg0);
|
void FindRunningCMake(const char* arg0);
|
||||||
|
|
||||||
//! Check if the argument is the one specified
|
//! Check if the argument is the one specified
|
||||||
bool CheckArgument(const std::string& arg, const char* varg1, const char* varg2 = 0);
|
bool CheckArgument(const std::string& arg, const char* varg1,
|
||||||
|
const char* varg2 = 0);
|
||||||
|
|
||||||
bool m_SuppressUpdatingCTestConfiguration;
|
bool m_SuppressUpdatingCTestConfiguration;
|
||||||
|
|
||||||
@ -385,7 +392,8 @@ private:
|
|||||||
class cmCTestLogWrite
|
class cmCTestLogWrite
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmCTestLogWrite(const char* data, size_t length) : Data(data), Length(length) {}
|
cmCTestLogWrite(const char* data, size_t length)
|
||||||
|
: Data(data), Length(length) {}
|
||||||
|
|
||||||
const char* Data;
|
const char* Data;
|
||||||
size_t Length;
|
size_t Length;
|
||||||
|
@ -62,44 +62,50 @@ static const cmDocumentationEntry cmDocumentationOptions[] =
|
|||||||
"Test output is normally suppressed and only summary information is "
|
"Test output is normally suppressed and only summary information is "
|
||||||
"displayed. This option will show even more test output."},
|
"displayed. This option will show even more test output."},
|
||||||
{"--debug", "Displaying more verbose internals of CTest.",
|
{"--debug", "Displaying more verbose internals of CTest.",
|
||||||
"This feature will result in large number of output that is mostly useful "
|
"This feature will result in large number of output that is mostly "
|
||||||
"for debugging dashboard problems."},
|
"useful for debugging dashboard problems."},
|
||||||
{"-Q,--quiet", "Make ctest quiet.",
|
{"-Q,--quiet", "Make ctest quiet.",
|
||||||
"This option will suppress all the output. The output log file will still be "
|
"This option will suppress all the output. The output log file will "
|
||||||
"generated if the --output-log is specified. Options such as --verbose, "
|
"still be generated if the --output-log is specified. Options such "
|
||||||
"--extra-verbose, and --debug are ignored if --quiet is specified."},
|
"as --verbose, --extra-verbose, and --debug are ignored if --quiet is "
|
||||||
|
"specified."},
|
||||||
{"-O <file>, --output-log <file>", "Output to log file",
|
{"-O <file>, --output-log <file>", "Output to log file",
|
||||||
"This option tells ctest to write all its output to a log file."},
|
"This option tells ctest to write all its output to a log file."},
|
||||||
{"-N,--show-only", "Disable actual execution of tests.",
|
{"-N,--show-only", "Disable actual execution of tests.",
|
||||||
"This option tells ctest to list the tests that would be run but not "
|
"This option tells ctest to list the tests that would be run but not "
|
||||||
"actually run them. Useful in conjunction with the -R and -E options."},
|
"actually run them. Useful in conjunction with the -R and -E options."},
|
||||||
{"-R <regex>, --tests-regex <regex>", "Run tests matching regular expression.",
|
{"-R <regex>, --tests-regex <regex>", "Run tests matching regular "
|
||||||
|
"expression.",
|
||||||
"This option tells ctest to run only the tests whose names match the "
|
"This option tells ctest to run only the tests whose names match the "
|
||||||
"given regular expression."},
|
"given regular expression."},
|
||||||
{"-E <regex>, --exclude-regex <regex>", "Exclude tests matching regular expression.",
|
{"-E <regex>, --exclude-regex <regex>", "Exclude tests matching regular "
|
||||||
|
"expression.",
|
||||||
"This option tells ctest to NOT run the tests whose names match the "
|
"This option tells ctest to NOT run the tests whose names match the "
|
||||||
"given regular expression."},
|
"given regular expression."},
|
||||||
{"-D <dashboard>, --dashboard <dashboard>", "Execute dashboard test",
|
{"-D <dashboard>, --dashboard <dashboard>", "Execute dashboard test",
|
||||||
"This option tells ctest to perform act as a Dart client and perform "
|
"This option tells ctest to perform act as a Dart client and perform "
|
||||||
"a dashboard test. All tests are <Mode><Test>, where Mode can be Experimental, "
|
"a dashboard test. All tests are <Mode><Test>, where Mode can be "
|
||||||
"Nightly, and Continuous, and Test can be Start, Update, Configure, "
|
"Experimental, Nightly, and Continuous, and Test can be Start, Update, "
|
||||||
"Build, Test, Coverage, and Submit."},
|
"Configure, Build, Test, Coverage, and Submit."},
|
||||||
{"-M <model>, --test-model <model>", "Sets the model for a dashboard",
|
{"-M <model>, --test-model <model>", "Sets the model for a dashboard",
|
||||||
"This option tells ctest to act as a Dart client "
|
"This option tells ctest to act as a Dart client "
|
||||||
"where the TestModel can be Experimental, "
|
"where the TestModel can be Experimental, "
|
||||||
"Nightly, and Continuous. Combining -M and -T is similar to -D"},
|
"Nightly, and Continuous. Combining -M and -T is similar to -D"},
|
||||||
{"-T <action>, --test-action <action>", "Sets the dashboard action to perform",
|
{"-T <action>, --test-action <action>", "Sets the dashboard action to "
|
||||||
|
"perform",
|
||||||
"This option tells ctest to act as a Dart client "
|
"This option tells ctest to act as a Dart client "
|
||||||
"and perform some action such as start, build, test etc. "
|
"and perform some action such as start, build, test etc. "
|
||||||
"Combining -M and -T is similar to -D"},
|
"Combining -M and -T is similar to -D"},
|
||||||
{"-S <script>, --script <script>", "Execute a dashboard for a configuration",
|
{"-S <script>, --script <script>", "Execute a dashboard for a "
|
||||||
|
"configuration",
|
||||||
"This option tells ctest to load in a configuration script which sets "
|
"This option tells ctest to load in a configuration script which sets "
|
||||||
"a number of parameters such as the binary and source directories. Then "
|
"a number of parameters such as the binary and source directories. Then "
|
||||||
"ctest will do what is required to create and run a dashboard. This "
|
"ctest will do what is required to create and run a dashboard. This "
|
||||||
"option basically sets up a dashboard and then runs ctest -D with the "
|
"option basically sets up a dashboard and then runs ctest -D with the "
|
||||||
"appropriate options."},
|
"appropriate options."},
|
||||||
{"-A <file>, --add-notes <file>", "Add a notes file with submission",
|
{"-A <file>, --add-notes <file>", "Add a notes file with submission",
|
||||||
"This option tells ctest to include a notes file when submitting dashboard. "},
|
"This option tells ctest to include a notes file when submitting "
|
||||||
|
"dashboard. "},
|
||||||
{"-I [Start,End,Stride,test#,test#|Test file], --tests-information",
|
{"-I [Start,End,Stride,test#,test#|Test file], --tests-information",
|
||||||
"Run a specific number of tests by number.",
|
"Run a specific number of tests by number.",
|
||||||
"This option causes ctest to run tests starting at number Start, ending "
|
"This option causes ctest to run tests starting at number Start, ending "
|
||||||
@ -132,7 +138,8 @@ static const cmDocumentationEntry cmDocumentationOptions[] =
|
|||||||
"--build-two-config, --build-exe-dir, --build-project,"
|
"--build-two-config, --build-exe-dir, --build-project,"
|
||||||
"--build-noclean, --build-options"},
|
"--build-noclean, --build-options"},
|
||||||
{"--build-target", "Specify a specific target to build.",
|
{"--build-target", "Specify a specific target to build.",
|
||||||
"This option goes with the --build-and-test option, if left out the all target is built." },
|
"This option goes with the --build-and-test option, if left out the all "
|
||||||
|
"target is built." },
|
||||||
{"--build-nocmake", "Run the build without running cmake first.",
|
{"--build-nocmake", "Run the build without running cmake first.",
|
||||||
"Skip the cmake step." },
|
"Skip the cmake step." },
|
||||||
{"--build-run-dir", "Specify directory to run programs from.",
|
{"--build-run-dir", "Specify directory to run programs from.",
|
||||||
@ -144,15 +151,18 @@ static const cmDocumentationEntry cmDocumentationOptions[] =
|
|||||||
{"--build-makeprogram", "Specify the make program to use.", "" },
|
{"--build-makeprogram", "Specify the make program to use.", "" },
|
||||||
{"--build-noclean", "Skip the make clean step.", "" },
|
{"--build-noclean", "Skip the make clean step.", "" },
|
||||||
{"--build-options", "Add extra options to the build step.",
|
{"--build-options", "Add extra options to the build step.",
|
||||||
"This option must be the last option with the exception of --test-command" },
|
"This option must be the last option with the exception of --test-command"
|
||||||
|
},
|
||||||
|
|
||||||
{"--test-command", "The test to run with the --build-and-test option.", "" },
|
{"--test-command", "The test to run with the --build-and-test option.", ""
|
||||||
|
},
|
||||||
{"--tomorrow-tag", "Nightly or experimental starts with next day tag.",
|
{"--tomorrow-tag", "Nightly or experimental starts with next day tag.",
|
||||||
"This is useful if the build will not finish in one day." },
|
"This is useful if the build will not finish in one day." },
|
||||||
{"--ctest-config", "The configuration file used to initialize CTest state when submitting dashboards.",
|
{"--ctest-config", "The configuration file used to initialize CTest state "
|
||||||
|
"when submitting dashboards.",
|
||||||
"This option tells CTest to use different initialization file instead of "
|
"This option tells CTest to use different initialization file instead of "
|
||||||
"DartConfiguration.tcl. This way multiple initialization files can be used "
|
"DartConfiguration.tcl. This way multiple initialization files can be "
|
||||||
"for example to submit to multiple dashboards." },
|
"used for example to submit to multiple dashboards." },
|
||||||
{"--overwrite", "Overwrite CTest configuration option.",
|
{"--overwrite", "Overwrite CTest configuration option.",
|
||||||
"By default ctest uses configuration options from configuration file. "
|
"By default ctest uses configuration options from configuration file. "
|
||||||
"This option will overwrite the configuration option." },
|
"This option will overwrite the configuration option." },
|
||||||
@ -160,12 +170,12 @@ static const cmDocumentationEntry cmDocumentationOptions[] =
|
|||||||
"This option will submit extra files to the dashboard." },
|
"This option will submit extra files to the dashboard." },
|
||||||
{"--force-new-ctest-process", "Run child CTest instances as new processes",
|
{"--force-new-ctest-process", "Run child CTest instances as new processes",
|
||||||
"By default CTest will run child CTest instances within the same process. "
|
"By default CTest will run child CTest instances within the same process. "
|
||||||
"If this behavior is not desired, this argument will enforce new processes "
|
"If this behavior is not desired, this argument will enforce new "
|
||||||
"for child CTest processes." },
|
"processes for child CTest processes." },
|
||||||
{"--submit-index", "Submit individual dashboard tests with specific index",
|
{"--submit-index", "Submit individual dashboard tests with specific index",
|
||||||
"This option allows performing the same CTest action (such as test) multiple "
|
"This option allows performing the same CTest action (such as test) "
|
||||||
"times and submit all stages to the same dashboard (Dart2 required). "
|
"multiple times and submit all stages to the same dashboard (Dart2 "
|
||||||
"Each execution requires different index." },
|
"required). Each execution requires different index." },
|
||||||
{0,0,0}
|
{0,0,0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -186,7 +196,8 @@ int main (int argc, char *argv[])
|
|||||||
|
|
||||||
if ( cmSystemTools::GetCurrentWorkingDirectory().size() == 0 )
|
if ( cmSystemTools::GetCurrentWorkingDirectory().size() == 0 )
|
||||||
{
|
{
|
||||||
cmCTestLog(&inst, ERROR_MESSAGE, "Current working directory cannot be established." << std::endl);
|
cmCTestLog(&inst, ERROR_MESSAGE,
|
||||||
|
"Current working directory cannot be established." << std::endl);
|
||||||
nocwd = 1;
|
nocwd = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,7 +211,8 @@ int main (int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
if(argc == 1)
|
if(argc == 1)
|
||||||
{
|
{
|
||||||
cmCTestLog(&inst, ERROR_MESSAGE, "*********************************" << std::endl
|
cmCTestLog(&inst, ERROR_MESSAGE, "*********************************"
|
||||||
|
<< std::endl
|
||||||
<< "No test configuration file found!" << std::endl
|
<< "No test configuration file found!" << std::endl
|
||||||
<< "*********************************" << std::endl);
|
<< "*********************************" << std::endl);
|
||||||
}
|
}
|
||||||
@ -222,7 +234,6 @@ int main (int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
std::string comspec = "cmw9xcom.exe";
|
std::string comspec = "cmw9xcom.exe";
|
||||||
cmSystemTools::SetWindows9xComspecSubstitute(comspec.c_str());
|
cmSystemTools::SetWindows9xComspecSubstitute(comspec.c_str());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user