summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestSubmitHandler.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-01-12 15:38:27 (GMT)
committerBrad King <brad.king@kitware.com>2009-01-12 15:38:27 (GMT)
commitd66c25c2f05ce57e879360f2db90a4f8ca4da330 (patch)
treed10fc9cb841476bce7719b39d4c2f1b12890ce9c /Source/CTest/cmCTestSubmitHandler.cxx
parent447f5b303eab1b076f49ed52af90e554160dddc6 (diff)
downloadCMake-d66c25c2f05ce57e879360f2db90a4f8ca4da330.zip
CMake-d66c25c2f05ce57e879360f2db90a4f8ca4da330.tar.gz
CMake-d66c25c2f05ce57e879360f2db90a4f8ca4da330.tar.bz2
ENH: Teach ctest_submit about parts
This adds a PARTS option to the ctest_submit command which tells it to submit only parts whose names are listed with the option.
Diffstat (limited to 'Source/CTest/cmCTestSubmitHandler.cxx')
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx25
1 files changed, 24 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 3e811d5..3a801b6 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -69,6 +69,13 @@ cmCTestSubmitHandler::cmCTestSubmitHandler() : HTTPProxy(), FTPProxy()
this->FTPProxy = "";
this->FTPProxyType = 0;
this->CDash = false;
+
+ // We submit all available parts by default.
+ for(cmCTest::Part p = cmCTest::PartStart;
+ p != cmCTest::PartCount; p = cmCTest::Part(p+1))
+ {
+ this->SubmitPart[p] = true;
+ }
}
//----------------------------------------------------------------------------
@@ -893,6 +900,13 @@ int cmCTestSubmitHandler::ProcessHandler()
for(cmCTest::Part p = cmCTest::PartStart;
p != cmCTest::PartCount; p = cmCTest::Part(p+1))
{
+ // Skip parts we are not submitting.
+ if(!this->SubmitPart[p])
+ {
+ continue;
+ }
+
+ // Submit files from this part.
std::vector<std::string> const& pfiles = this->CTest->GetSubmitFiles(p);
for(std::vector<std::string>::const_iterator pi = pfiles.begin();
pi != pfiles.end(); ++pi)
@@ -1107,4 +1121,13 @@ std::string cmCTestSubmitHandler::GetSubmitResultsPrefix()
return name;
}
-
+//----------------------------------------------------------------------------
+void cmCTestSubmitHandler::SelectParts(std::set<cmCTest::Part> const& parts)
+{
+ // Check whether each part is selected.
+ for(cmCTest::Part p = cmCTest::PartStart;
+ p != cmCTest::PartCount; p = cmCTest::Part(p+1))
+ {
+ this->SubmitPart[p] = (parts.find(p) != parts.end());
+ }
+}