summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-08-16 18:50:52 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-08-16 18:51:03 (GMT)
commit2beed5a4ef66f415f4efa327a8c479395d262e52 (patch)
tree48b1a8ad1a2fe87cb6a84de2b96379ebd7f78674 /Source/CTest
parentdcf2beb7dec757b7e28eba43fb7f2d5498bded39 (diff)
parent2f6495e24e57cd4a03f38e615cc60177e89afb96 (diff)
downloadCMake-2beed5a4ef66f415f4efa327a8c479395d262e52.zip
CMake-2beed5a4ef66f415f4efa327a8c479395d262e52.tar.gz
CMake-2beed5a4ef66f415f4efa327a8c479395d262e52.tar.bz2
Merge topic 'cmExpandList'
2f6495e24e cmSystemTools: Remove ExpandListArgument methods f4f3c68926 Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgument ff42dec891 cmStringAlgorithms: Add cmExpandList functions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3682
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx6
-rw-r--r--Source/CTest/cmCTestConfigureCommand.cxx3
-rw-r--r--Source/CTest/cmCTestGIT.cxx2
-rw-r--r--Source/CTest/cmCTestP4.cxx3
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx6
-rw-r--r--Source/CTest/cmCTestSubmitCommand.cxx5
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx4
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx34
8 files changed, 32 insertions, 31 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index b98a4e3..bc7c155 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -247,13 +247,11 @@ void cmCTestBuildHandler::PopulateCustomVectors(cmMakefile* mf)
// Record the user-specified custom warning rules.
if (const char* customWarningMatchers =
mf->GetDefinition("CTEST_CUSTOM_WARNING_MATCH")) {
- cmSystemTools::ExpandListArgument(customWarningMatchers,
- this->ReallyCustomWarningMatches);
+ cmExpandList(customWarningMatchers, this->ReallyCustomWarningMatches);
}
if (const char* customWarningExceptions =
mf->GetDefinition("CTEST_CUSTOM_WARNING_EXCEPTION")) {
- cmSystemTools::ExpandListArgument(customWarningExceptions,
- this->ReallyCustomWarningExceptions);
+ cmExpandList(customWarningExceptions, this->ReallyCustomWarningExceptions);
}
}
diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx
index 74a932a..eb7ecb5 100644
--- a/Source/CTest/cmCTestConfigureCommand.cxx
+++ b/Source/CTest/cmCTestConfigureCommand.cxx
@@ -6,6 +6,7 @@
#include "cmCTestConfigureHandler.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
+#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmake.h"
@@ -25,7 +26,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
std::vector<std::string> options;
if (this->Values[ctc_OPTIONS]) {
- cmSystemTools::ExpandListArgument(this->Values[ctc_OPTIONS], options);
+ cmExpandList(this->Values[ctc_OPTIONS], options);
}
if (this->CTest->GetCTestConfiguration("BuildDirectory").empty()) {
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index 093017c..e330e22 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -212,7 +212,7 @@ bool cmCTestGIT::UpdateByFetchAndReset()
bool cmCTestGIT::UpdateByCustom(std::string const& custom)
{
std::vector<std::string> git_custom_command;
- cmSystemTools::ExpandListArgument(custom, git_custom_command, true);
+ cmExpandList(custom, git_custom_command, true);
std::vector<char const*> git_custom;
git_custom.reserve(git_custom_command.size() + 1);
for (std::string const& i : git_custom_command) {
diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx
index 2eb8dba..80eb8d9 100644
--- a/Source/CTest/cmCTestP4.cxx
+++ b/Source/CTest/cmCTestP4.cxx
@@ -7,6 +7,7 @@
#include "cmCTestVC.h"
#include "cmProcessTools.h"
#include "cmRange.h"
+#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmsys/RegularExpression.hxx"
@@ -460,7 +461,7 @@ bool cmCTestP4::LoadModifications()
bool cmCTestP4::UpdateCustom(const std::string& custom)
{
std::vector<std::string> p4_custom_command;
- cmSystemTools::ExpandListArgument(custom, p4_custom_command, true);
+ cmExpandList(custom, p4_custom_command, true);
std::vector<char const*> p4_custom;
p4_custom.reserve(p4_custom_command.size() + 1);
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 58f88be..1c40a58 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -544,7 +544,7 @@ int cmCTestScriptHandler::RunCurrentScript()
// set any environment variables
if (!this->CTestEnv.empty()) {
std::vector<std::string> envArgs;
- cmSystemTools::ExpandListArgument(this->CTestEnv, envArgs);
+ cmExpandList(this->CTestEnv, envArgs);
cmSystemTools::AppendEnv(envArgs);
}
@@ -651,7 +651,7 @@ int cmCTestScriptHandler::PerformExtraUpdates()
command = this->UpdateCmd;
for (std::string const& eu : this->ExtraUpdates) {
std::vector<std::string> cvsArgs;
- cmSystemTools::ExpandListArgument(eu, cvsArgs);
+ cmExpandList(eu, cvsArgs);
if (cvsArgs.size() == 2) {
std::string fullCommand = command;
fullCommand += " update ";
@@ -795,7 +795,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
// run ctest, it may be more than one command in here
std::vector<std::string> ctestCommands;
- cmSystemTools::ExpandListArgument(this->CTestCmd, ctestCommands);
+ cmExpandList(this->CTestCmd, ctestCommands);
// for each variable/argument do a putenv
for (std::string const& ctestCommand : ctestCommands) {
command = ctestCommand;
diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx
index 58c0a1b..ec1e9bb 100644
--- a/Source/CTest/cmCTestSubmitCommand.cxx
+++ b/Source/CTest/cmCTestSubmitCommand.cxx
@@ -7,6 +7,7 @@
#include "cmCommand.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
+#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include <sstream>
@@ -68,7 +69,7 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
this->Makefile->GetDefinition("CTEST_NOTES_FILES");
if (notesFilesVariable) {
std::vector<std::string> notesFiles;
- cmSystemTools::ExpandListArgument(notesFilesVariable, notesFiles);
+ cmExpandList(notesFilesVariable, notesFiles);
this->CTest->GenerateNotesFile(notesFiles);
}
@@ -76,7 +77,7 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
this->Makefile->GetDefinition("CTEST_EXTRA_SUBMIT_FILES");
if (extraFilesVariable) {
std::vector<std::string> extraFiles;
- cmSystemTools::ExpandListArgument(extraFilesVariable, extraFiles);
+ cmExpandList(extraFilesVariable, extraFiles);
if (!this->CTest->SubmitExtraFiles(extraFiles)) {
this->SetError("problem submitting extra files.");
return nullptr;
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index f97d7eb..414a20d 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -156,7 +156,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(
::curl_global_init(CURL_GLOBAL_ALL);
std::string curlopt(this->CTest->GetCTestConfiguration("CurlOptions"));
std::vector<std::string> args;
- cmSystemTools::ExpandListArgument(curlopt, args);
+ cmExpandList(curlopt, args);
bool verifyPeerOff = false;
bool verifyHostOff = false;
for (std::string const& arg : args) {
@@ -500,7 +500,7 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
curl.SetQuiet(this->Quiet);
std::string curlopt(this->CTest->GetCTestConfiguration("CurlOptions"));
std::vector<std::string> args;
- cmSystemTools::ExpandListArgument(curlopt, args);
+ cmExpandList(curlopt, args);
curl.SetCurlOptions(args);
curl.SetTimeOutSeconds(SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT);
curl.SetHttpHeaders(this->HttpHeaders);
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 17e7822..a3c480a 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -2180,7 +2180,7 @@ bool cmCTestTestHandler::SetTestsProperties(
if (key == "_BACKTRACE_TRIPLES") {
std::vector<std::string> triples;
// allow empty args in the triples
- cmSystemTools::ExpandListArgument(val, triples, true);
+ cmExpandList(val, triples, true);
// Ensure we have complete triples otherwise the data is corrupt.
if (triples.size() % 3 == 0) {
@@ -2209,32 +2209,32 @@ bool cmCTestTestHandler::SetTestsProperties(
rt.Disabled = cmSystemTools::IsOn(val);
}
if (key == "ATTACHED_FILES") {
- cmSystemTools::ExpandListArgument(val, rt.AttachedFiles);
+ cmExpandList(val, rt.AttachedFiles);
}
if (key == "ATTACHED_FILES_ON_FAIL") {
- cmSystemTools::ExpandListArgument(val, rt.AttachOnFail);
+ cmExpandList(val, rt.AttachOnFail);
}
if (key == "RESOURCE_LOCK") {
std::vector<std::string> lval;
- cmSystemTools::ExpandListArgument(val, lval);
+ cmExpandList(val, lval);
rt.LockedResources.insert(lval.begin(), lval.end());
}
if (key == "FIXTURES_SETUP") {
std::vector<std::string> lval;
- cmSystemTools::ExpandListArgument(val, lval);
+ cmExpandList(val, lval);
rt.FixturesSetup.insert(lval.begin(), lval.end());
}
if (key == "FIXTURES_CLEANUP") {
std::vector<std::string> lval;
- cmSystemTools::ExpandListArgument(val, lval);
+ cmExpandList(val, lval);
rt.FixturesCleanup.insert(lval.begin(), lval.end());
}
if (key == "FIXTURES_REQUIRED") {
std::vector<std::string> lval;
- cmSystemTools::ExpandListArgument(val, lval);
+ cmExpandList(val, lval);
rt.FixturesRequired.insert(lval.begin(), lval.end());
}
@@ -2246,21 +2246,21 @@ bool cmCTestTestHandler::SetTestsProperties(
rt.Cost = static_cast<float>(atof(val.c_str()));
}
if (key == "REQUIRED_FILES") {
- cmSystemTools::ExpandListArgument(val, rt.RequiredFiles);
+ cmExpandList(val, rt.RequiredFiles);
}
if (key == "RUN_SERIAL") {
rt.RunSerial = cmSystemTools::IsOn(val);
}
if (key == "FAIL_REGULAR_EXPRESSION") {
std::vector<std::string> lval;
- cmSystemTools::ExpandListArgument(val, lval);
+ cmExpandList(val, lval);
for (std::string const& cr : lval) {
rt.ErrorRegularExpressions.emplace_back(cr, cr);
}
}
if (key == "SKIP_REGULAR_EXPRESSION") {
std::vector<std::string> lval;
- cmSystemTools::ExpandListArgument(val, lval);
+ cmExpandList(val, lval);
for (std::string const& cr : lval) {
rt.SkipRegularExpressions.emplace_back(cr, cr);
}
@@ -2281,14 +2281,14 @@ bool cmCTestTestHandler::SetTestsProperties(
}
}
if (key == "DEPENDS") {
- cmSystemTools::ExpandListArgument(val, rt.Depends);
+ cmExpandList(val, rt.Depends);
}
if (key == "ENVIRONMENT") {
- cmSystemTools::ExpandListArgument(val, rt.Environment);
+ cmExpandList(val, rt.Environment);
}
if (key == "LABELS") {
std::vector<std::string> Labels;
- cmSystemTools::ExpandListArgument(val, Labels);
+ cmExpandList(val, Labels);
rt.Labels.insert(rt.Labels.end(), Labels.begin(), Labels.end());
// sort the array
std::sort(rt.Labels.begin(), rt.Labels.end());
@@ -2309,7 +2309,7 @@ bool cmCTestTestHandler::SetTestsProperties(
}
if (key == "PASS_REGULAR_EXPRESSION") {
std::vector<std::string> lval;
- cmSystemTools::ExpandListArgument(val, lval);
+ cmExpandList(val, lval);
for (std::string const& cr : lval) {
rt.RequiredRegularExpressions.emplace_back(cr, cr);
}
@@ -2319,7 +2319,7 @@ bool cmCTestTestHandler::SetTestsProperties(
}
if (key == "TIMEOUT_AFTER_MATCH") {
std::vector<std::string> propArgs;
- cmSystemTools::ExpandListArgument(val, propArgs);
+ cmExpandList(val, propArgs);
if (propArgs.size() != 2) {
cmCTestLog(this->CTest, WARNING,
"TIMEOUT_AFTER_MATCH expects two arguments, found "
@@ -2327,7 +2327,7 @@ bool cmCTestTestHandler::SetTestsProperties(
} else {
rt.AlternateTimeout = cmDuration(atof(propArgs[0].c_str()));
std::vector<std::string> lval;
- cmSystemTools::ExpandListArgument(propArgs[1], lval);
+ cmExpandList(propArgs[1], lval);
for (std::string const& cr : lval) {
rt.TimeoutRegularExpressions.emplace_back(cr, cr);
}
@@ -2370,7 +2370,7 @@ bool cmCTestTestHandler::SetDirectoryProperties(
if (cwd == rt.Directory) {
if (key == "LABELS") {
std::vector<std::string> DirectoryLabels;
- cmSystemTools::ExpandListArgument(val, DirectoryLabels);
+ cmExpandList(val, DirectoryLabels);
rt.Labels.insert(rt.Labels.end(), DirectoryLabels.begin(),
DirectoryLabels.end());