diff options
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestBuildHandler.cxx | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestConfigureHandler.cxx | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 7 | ||||
-rw-r--r-- | Source/CTest/cmCTestGenericHandler.cxx | 7 | ||||
-rw-r--r-- | Source/CTest/cmCTestGenericHandler.h | 5 | ||||
-rw-r--r-- | Source/CTest/cmCTestSubmitHandler.cxx | 37 | ||||
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 1 | ||||
-rw-r--r-- | Source/CTest/cmCTestUpdateHandler.cxx | 2 |
8 files changed, 36 insertions, 27 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index 989f938..ca7061b 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -467,7 +467,7 @@ int cmCTestBuildHandler::ProcessHandler() // Generate XML output cmGeneratedFileStream xofs; - if( !this->StartResultingXML("Build", xofs)) + if(!this->StartResultingXML(cmCTest::PartBuild, "Build", xofs)) { cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create build XML file" << std::endl); diff --git a/Source/CTest/cmCTestConfigureHandler.cxx b/Source/CTest/cmCTestConfigureHandler.cxx index 42b7c71..6004508 100644 --- a/Source/CTest/cmCTestConfigureHandler.cxx +++ b/Source/CTest/cmCTestConfigureHandler.cxx @@ -67,7 +67,7 @@ int cmCTestConfigureHandler::ProcessHandler() if ( !this->CTest->GetShowOnly() ) { cmGeneratedFileStream os; - if ( !this->StartResultingXML("Configure", os) ) + if(!this->StartResultingXML(cmCTest::PartConfigure, "Configure", os)) { cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open configure file" << std::endl); diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 0b11018..a248bc6 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -162,7 +162,8 @@ bool cmCTestCoverageHandler::StartCoverageLogFile( sprintf(covLogFilename, "CoverageLog-%d", logFileCount); cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Open file: " << covLogFilename << std::endl); - if (!this->StartResultingXML(covLogFilename, covLogFile) ) + if(!this->StartResultingXML(cmCTest::PartCoverage, + covLogFilename, covLogFile)) { cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open log file: " << covLogFilename << std::endl); @@ -381,7 +382,7 @@ int cmCTestCoverageHandler::ProcessHandler() cmGeneratedFileStream covSumFile; cmGeneratedFileStream covLogFile; - if (!this->StartResultingXML("Coverage", covSumFile)) + if(!this->StartResultingXML(cmCTest::PartCoverage, "Coverage", covSumFile)) { cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open coverage summary file." << std::endl); @@ -1434,7 +1435,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary( std::ostream& tmpLog = *cont->OFS; // copen the Coverage.xml file in the Testing directory cmGeneratedFileStream covSumFile; - if (!this->StartResultingXML("Coverage", covSumFile)) + if(!this->StartResultingXML(cmCTest::PartCoverage, "Coverage", covSumFile)) { cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open coverage summary file." << std::endl); diff --git a/Source/CTest/cmCTestGenericHandler.cxx b/Source/CTest/cmCTestGenericHandler.cxx index 5060774..4e7dd56 100644 --- a/Source/CTest/cmCTestGenericHandler.cxx +++ b/Source/CTest/cmCTestGenericHandler.cxx @@ -104,8 +104,9 @@ const char* cmCTestGenericHandler::GetOption(const char* op) } //---------------------------------------------------------------------- -bool cmCTestGenericHandler::StartResultingXML(const char* name, - cmGeneratedFileStream& xofs) +bool cmCTestGenericHandler::StartResultingXML(cmCTest::Part part, + const char* name, + cmGeneratedFileStream& xofs) { if ( !name ) { @@ -139,7 +140,7 @@ bool cmCTestGenericHandler::StartResultingXML(const char* name, << std::endl); return false; } - this->CTest->AddSubmitFile(ostr.str().c_str()); + this->CTest->AddSubmitFile(part, ostr.str().c_str()); return true; } diff --git a/Source/CTest/cmCTestGenericHandler.h b/Source/CTest/cmCTestGenericHandler.h index 69bfb7f..da404c4 100644 --- a/Source/CTest/cmCTestGenericHandler.h +++ b/Source/CTest/cmCTestGenericHandler.h @@ -20,8 +20,8 @@ #include "cmObject.h" +#include "cmCTest.h" -class cmCTest; class cmMakefile; class cmCTestCommand; class cmGeneratedFileStream; @@ -91,7 +91,8 @@ public: void SetAppendXML(bool b) { this->AppendXML = b; } protected: - bool StartResultingXML(const char* name, cmGeneratedFileStream& xofs); + bool StartResultingXML(cmCTest::Part part, + const char* name, cmGeneratedFileStream& xofs); bool StartLogFile(const char* name, cmGeneratedFileStream& xofs); bool AppendXML; diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index dbc9124..3e811d5 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -852,15 +852,14 @@ int cmCTestSubmitHandler::ProcessHandler() cmGeneratedFileStream ofs; this->StartLogFile("Submit", ofs); - cmCTest::SetOfStrings files; std::string prefix = this->GetSubmitResultsPrefix(); // TODO: // Check if test is enabled - this->CTest->AddIfExists(files, "Update.xml"); - this->CTest->AddIfExists(files, "Configure.xml"); - this->CTest->AddIfExists(files, "Build.xml"); - this->CTest->AddIfExists(files, "Test.xml"); - if ( this->CTest->AddIfExists(files, "Coverage.xml") ) + this->CTest->AddIfExists(cmCTest::PartUpdate, "Update.xml"); + this->CTest->AddIfExists(cmCTest::PartConfigure, "Configure.xml"); + this->CTest->AddIfExists(cmCTest::PartBuild, "Build.xml"); + this->CTest->AddIfExists(cmCTest::PartTest, "Test.xml"); + if(this->CTest->AddIfExists(cmCTest::PartCoverage, "Coverage.xml")) { cmCTest::VectorOfStrings gfiles; std::string gpath @@ -877,7 +876,7 @@ int cmCTestSubmitHandler::ProcessHandler() gfiles[cc] = gfiles[cc].substr(glen); cmCTestLog(this->CTest, DEBUG, "Glob file: " << gfiles[cc].c_str() << std::endl); - files.insert(gfiles[cc]); + this->CTest->AddSubmitFile(cmCTest::PartCoverage, gfiles[cc].c_str()); } } else @@ -885,22 +884,28 @@ int cmCTestSubmitHandler::ProcessHandler() cmCTestLog(this->CTest, ERROR_MESSAGE, "Problem globbing" << std::endl); } } - this->CTest->AddIfExists(files, "DynamicAnalysis.xml"); - this->CTest->AddIfExists(files, "Purify.xml"); - this->CTest->AddIfExists(files, "Notes.xml"); - - cmCTest::SetOfStrings::iterator it; - for ( it = this->CTest->GetSubmitFiles()->begin(); - it != this->CTest->GetSubmitFiles()->end(); - ++ it ) + this->CTest->AddIfExists(cmCTest::PartMemCheck, "DynamicAnalysis.xml"); + this->CTest->AddIfExists(cmCTest::PartMemCheck, "Purify.xml"); + this->CTest->AddIfExists(cmCTest::PartNotes, "Notes.xml"); + + // Query parts for files to submit. + cmCTest::SetOfStrings files; + for(cmCTest::Part p = cmCTest::PartStart; + p != cmCTest::PartCount; p = cmCTest::Part(p+1)) { - files.insert(files.end(), *it); + std::vector<std::string> const& pfiles = this->CTest->GetSubmitFiles(p); + for(std::vector<std::string>::const_iterator pi = pfiles.begin(); + pi != pfiles.end(); ++pi) + { + files.insert(*pi); + } } if ( ofs ) { ofs << "Upload files:" << std::endl; int cnt = 0; + cmCTest::SetOfStrings::iterator it; for ( it = files.begin(); it != files.end(); ++ it ) { ofs << cnt << "\t" << it->c_str() << std::endl; diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 52b23d5..cc2a2b0 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -592,6 +592,7 @@ int cmCTestTestHandler::ProcessHandler() { cmGeneratedFileStream xmlfile; if( !this->StartResultingXML( + (this->MemCheck ? cmCTest::PartMemCheck : cmCTest::PartTest), (this->MemCheck ? "DynamicAnalysis" : "Test"), xmlfile) ) { cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create " diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx index 67ae202..e1eeeb1 100644 --- a/Source/CTest/cmCTestUpdateHandler.cxx +++ b/Source/CTest/cmCTestUpdateHandler.cxx @@ -578,7 +578,7 @@ int cmCTestUpdateHandler::ProcessHandler() // Now update repository and remember what files were updated // cmGeneratedFileStream os; - if ( !this->StartResultingXML("Update", os) ) + if(!this->StartResultingXML(cmCTest::PartUpdate, "Update", os)) { cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open log file" << std::endl); |