summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorBetsy McPhail <betsy.mcphail@kitware.com>2018-10-04 15:34:27 (GMT)
committerBrad King <brad.king@kitware.com>2018-10-10 10:55:59 (GMT)
commita6e0158712bd25256fb66cf21c047b81d65bc4fe (patch)
tree218ec6d34578bb6e61a28f10b5e5f51203ea880d /Source/CTest
parentf460bbd4c8afab56f93b9831f1f4d8336480fcc5 (diff)
downloadCMake-a6e0158712bd25256fb66cf21c047b81d65bc4fe.zip
CMake-a6e0158712bd25256fb66cf21c047b81d65bc4fe.tar.gz
CMake-a6e0158712bd25256fb66cf21c047b81d65bc4fe.tar.bz2
ctest_submit: Add support for a "Done" part
Teach CTest to submit Done.xml. Submission of this file indicates to CDash that a build is complete and no more files will be uploaded. It contains the build id returned by CDash and the current time. This file is submitted last for a given build when using the `ctest_submit()` command. If submitting by PARTS, use `ctest_submit(PARTS Done)`.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 38b5411..6ad0e03 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -56,6 +56,7 @@ public:
std::string Filename;
std::string MD5;
std::string Message;
+ std::string BuildID;
private:
std::vector<char> CurrentValue;
@@ -97,6 +98,8 @@ private:
this->MD5 = this->GetCurrentValue();
} else if (name == "message") {
this->Message = this->GetCurrentValue();
+ } else if (name == "buildId") {
+ this->BuildID = this->GetCurrentValue();
}
}
};
@@ -645,6 +648,7 @@ void cmCTestSubmitHandler::ParseResponse(
" Submission failed: " << parser.Message << std::endl);
return;
}
+ this->CTest->SetBuildID(parser.BuildID);
}
output = cmSystemTools::UpperCase(output);
if (output.find("WARNING") != std::string::npos) {
@@ -1414,6 +1418,12 @@ int cmCTestSubmitHandler::ProcessHandler()
files.erase(files.begin() + endPos, files.end());
}
+ // Submit Done.xml last
+ if (this->SubmitPart[cmCTest::PartDone]) {
+ this->CTest->GenerateDoneFile();
+ files.push_back("Done.xml");
+ }
+
if (ofs) {
ofs << "Upload files:" << std::endl;
int cnt = 0;