summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-26 14:33:16 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-08-26 14:34:55 (GMT)
commite7d7cd47ed85678f29c18d63ef723f1a923d5742 (patch)
tree665f844871f633c7d43e83fdde3d8e3ca9035e8c /Source
parent7d89c5bf77ab00273d30a7e88a9ea85d55e34854 (diff)
parent2a71a0390c6c1130c9b50f717a751dc815310073 (diff)
downloadCMake-e7d7cd47ed85678f29c18d63ef723f1a923d5742.zip
CMake-e7d7cd47ed85678f29c18d63ef723f1a923d5742.tar.gz
CMake-e7d7cd47ed85678f29c18d63ef723f1a923d5742.tar.bz2
Merge topic 'group_not_track'
2a71a0390c ctest: rename TRACK to GROUP Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Zack Galbreath <zack.galbreath@kitware.com> Merge-request: !3707
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestStartCommand.cxx14
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx11
-rw-r--r--Source/cmCTest.cxx48
-rw-r--r--Source/cmCTest.h6
-rw-r--r--Source/ctest.cxx4
5 files changed, 49 insertions, 34 deletions
diff --git a/Source/CTest/cmCTestStartCommand.cxx b/Source/CTest/cmCTestStartCommand.cxx
index 67ff2db..e4a1844 100644
--- a/Source/CTest/cmCTestStartCommand.cxx
+++ b/Source/CTest/cmCTestStartCommand.cxx
@@ -33,14 +33,16 @@ bool cmCTestStartCommand::InitialPass(std::vector<std::string> const& args,
const char* bld_dir = nullptr;
while (cnt < args.size()) {
- if (args[cnt] == "TRACK") {
+ if (args[cnt] == "GROUP" || args[cnt] == "TRACK") {
cnt++;
if (cnt >= args.size() || args[cnt] == "APPEND" ||
args[cnt] == "QUIET") {
- this->SetError("TRACK argument missing track name");
+ std::ostringstream e;
+ e << args[cnt - 1] << " argument missing group name";
+ this->SetError(e.str());
return false;
}
- this->CTest->SetSpecificTrack(args[cnt].c_str());
+ this->CTest->SetSpecificGroup(args[cnt].c_str());
cnt++;
} else if (args[cnt] == "APPEND") {
cnt++;
@@ -113,10 +115,10 @@ bool cmCTestStartCommand::InitialPass(std::vector<std::string> const& args,
<< " Build directory: " << bld_dir << std::endl,
this->Quiet);
}
- const char* track = this->CTest->GetSpecificTrack();
- if (track) {
+ const char* group = this->CTest->GetSpecificGroup();
+ if (group) {
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
- " Track: " << track << std::endl, this->Quiet);
+ " Group: " << group << std::endl, this->Quiet);
}
// Log startup actions.
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index a30999b..4ebb1c8 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -569,6 +569,11 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
<< curl.Escape(this->CTest->GetCTestConfiguration("BuildName")) << "&"
<< "site=" << curl.Escape(this->CTest->GetCTestConfiguration("Site"))
<< "&"
+ << "group=" << curl.Escape(this->CTest->GetTestModelString())
+ << "&"
+ // For now, we send both "track" and "group" to CDash in case we're
+ // submitting to an older instance that still expects the prior
+ // terminology.
<< "track=" << curl.Escape(this->CTest->GetTestModelString()) << "&"
<< "starttime=" << timeNow << "&"
<< "endtime=" << timeNow << "&"
@@ -837,10 +842,10 @@ int cmCTestSubmitHandler::ProcessHandler()
}
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "Submit files\n",
this->Quiet);
- const char* specificTrack = this->CTest->GetSpecificTrack();
- if (specificTrack) {
+ const char* specificGroup = this->CTest->GetSpecificGroup();
+ if (specificGroup) {
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
- " Send to track: " << specificTrack << std::endl,
+ " Send to group: " << specificGroup << std::endl,
this->Quiet);
}
this->SetLogFile(&ofs);
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 866d262..e654e74 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -155,7 +155,7 @@ struct cmCTest::Private
bool TomorrowTag = false;
int TestModel = cmCTest::EXPERIMENTAL;
- std::string SpecificTrack;
+ std::string SpecificGroup;
cmDuration TimeOut = cmDuration::zero();
@@ -508,10 +508,10 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
day != lctime->tm_mday) {
tag.clear();
}
- std::string track;
- if (cmSystemTools::GetLineFromStream(tfin, track) &&
+ std::string group;
+ if (cmSystemTools::GetLineFromStream(tfin, group) &&
!this->Impl->Parts[PartStart] && !command) {
- this->Impl->SpecificTrack = track;
+ this->Impl->SpecificGroup = group;
}
std::string model;
if (cmSystemTools::GetLineFromStream(tfin, model) &&
@@ -564,13 +564,13 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
}
}
} else {
- std::string track;
+ std::string group;
std::string modelStr;
int model = cmCTest::UNKNOWN;
if (tfin) {
cmSystemTools::GetLineFromStream(tfin, tag);
- cmSystemTools::GetLineFromStream(tfin, track);
+ cmSystemTools::GetLineFromStream(tfin, group);
if (cmSystemTools::GetLineFromStream(tfin, modelStr)) {
model = GetTestModelFromString(modelStr.c_str());
}
@@ -605,15 +605,15 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
quiet);
}
- if (!this->Impl->SpecificTrack.empty() &&
- track != this->Impl->SpecificTrack) {
+ if (!this->Impl->SpecificGroup.empty() &&
+ group != this->Impl->SpecificGroup) {
cmCTestOptionalLog(this, WARNING,
- "Track given in TAG does not match "
- "track given in ctest_start()"
+ "Group given in TAG does not match "
+ "group given in ctest_start()"
<< std::endl,
quiet);
} else {
- this->Impl->SpecificTrack = track;
+ this->Impl->SpecificGroup = group;
}
cmCTestOptionalLog(this, OUTPUT,
@@ -1017,8 +1017,8 @@ int cmCTest::ProcessSteps()
std::string cmCTest::GetTestModelString()
{
- if (!this->Impl->SpecificTrack.empty()) {
- return this->Impl->SpecificTrack;
+ if (!this->Impl->SpecificGroup.empty()) {
+ return this->Impl->SpecificGroup;
}
switch (this->Impl->TestModel) {
case cmCTest::NIGHTLY:
@@ -1904,9 +1904,15 @@ bool cmCTest::HandleCommandLineArguments(size_t& i,
this->Impl->Debug = true;
this->Impl->ShowLineNumbers = true;
}
+ if (this->CheckArgument(arg, "--group") && i < args.size() - 1) {
+ i++;
+ this->Impl->SpecificGroup = args[i];
+ }
+ // This is an undocumented / deprecated option.
+ // "Track" has been renamed to "Group".
if (this->CheckArgument(arg, "--track") && i < args.size() - 1) {
i++;
- this->Impl->SpecificTrack = args[i];
+ this->Impl->SpecificGroup = args[i];
}
if (this->CheckArgument(arg, "--show-line-numbers")) {
this->Impl->ShowLineNumbers = true;
@@ -2762,21 +2768,21 @@ std::vector<std::string>& cmCTest::GetInitialCommandLineArguments()
return this->Impl->InitialCommandLineArguments;
}
-const char* cmCTest::GetSpecificTrack()
+const char* cmCTest::GetSpecificGroup()
{
- if (this->Impl->SpecificTrack.empty()) {
+ if (this->Impl->SpecificGroup.empty()) {
return nullptr;
}
- return this->Impl->SpecificTrack.c_str();
+ return this->Impl->SpecificGroup.c_str();
}
-void cmCTest::SetSpecificTrack(const char* track)
+void cmCTest::SetSpecificGroup(const char* group)
{
- if (!track) {
- this->Impl->SpecificTrack.clear();
+ if (!group) {
+ this->Impl->SpecificGroup.clear();
return;
}
- this->Impl->SpecificTrack = track;
+ this->Impl->SpecificGroup = group;
}
void cmCTest::SetFailover(bool failover)
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index 7f66378..7fe3455 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -404,9 +404,9 @@ public:
std::vector<std::string>& GetInitialCommandLineArguments();
- /** Set the track to submit to */
- void SetSpecificTrack(const char* track);
- const char* GetSpecificTrack();
+ /** Set the group to submit to */
+ void SetSpecificGroup(const char* group);
+ const char* GetSpecificGroup();
void SetFailover(bool failover);
bool GetFailover() const;
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index 77a84fd..a69ba15 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -83,7 +83,9 @@ static const char* cmDocumentationOptions[][2] = {
{ "-T <action>, --test-action <action>",
"Sets the dashboard action to "
"perform" },
- { "--track <track>", "Specify the track to submit dashboard to" },
+ { "--group <group>",
+ "Specify what build group on the dashboard you'd like to "
+ "submit results to." },
{ "-S <script>, --script <script>",
"Execute a dashboard for a "
"configuration" },