diff options
author | Brad King <brad.king@kitware.com> | 2009-01-12 15:37:55 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-01-12 15:37:55 (GMT) |
commit | 447f5b303eab1b076f49ed52af90e554160dddc6 (patch) | |
tree | 6e27fdd66c1b7d39440d94681457c2765a957a99 /Source/CTest/cmCTestSubmitHandler.cxx | |
parent | 4b97fab34d07afe05b057dbb6b2c64f4f0d24f40 (diff) | |
download | CMake-447f5b303eab1b076f49ed52af90e554160dddc6.zip CMake-447f5b303eab1b076f49ed52af90e554160dddc6.tar.gz CMake-447f5b303eab1b076f49ed52af90e554160dddc6.tar.bz2 |
ENH: Divide CTest file submission list by part
This splits the list of files for CTest to submit into those belonging
to each part. The set is recombined just before submission. Later this
will allow piecewise submissions.
Diffstat (limited to 'Source/CTest/cmCTestSubmitHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestSubmitHandler.cxx | 37 |
1 files changed, 21 insertions, 16 deletions
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; |