summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestGIT.cxx3
-rw-r--r--Source/CTest/cmCTestP4.cxx4
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx7
-rw-r--r--Source/CTest/cmCTestSubmitCommand.cxx6
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx5
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx23
6 files changed, 26 insertions, 22 deletions
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index b2fb069..a6e7ac5 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -14,6 +14,7 @@
#include "cmCTest.h"
#include "cmCTestVC.h"
+#include "cmList.h"
#include "cmProcessOutput.h"
#include "cmProcessTools.h"
#include "cmStringAlgorithms.h"
@@ -215,7 +216,7 @@ bool cmCTestGIT::UpdateByFetchAndReset()
bool cmCTestGIT::UpdateByCustom(std::string const& custom)
{
- std::vector<std::string> git_custom_command = cmExpandedList(custom, true);
+ cmList git_custom_command{ custom, cmList::EmptyElements::Yes };
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 0e67c41..e22ec4b 100644
--- a/Source/CTest/cmCTestP4.cxx
+++ b/Source/CTest/cmCTestP4.cxx
@@ -13,9 +13,9 @@
#include "cmCTest.h"
#include "cmCTestVC.h"
+#include "cmList.h"
#include "cmProcessTools.h"
#include "cmRange.h"
-#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
cmCTestP4::cmCTestP4(cmCTest* ct, std::ostream& log)
@@ -460,7 +460,7 @@ bool cmCTestP4::LoadModifications()
bool cmCTestP4::UpdateCustom(const std::string& custom)
{
- std::vector<std::string> p4_custom_command = cmExpandedList(custom, true);
+ cmList p4_custom_command{ custom, cmList::EmptyElements::Yes };
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 ee06b29..461ad1a 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -33,6 +33,7 @@
#include "cmDuration.h"
#include "cmGeneratedFileStream.h"
#include "cmGlobalGenerator.h"
+#include "cmList.h"
#include "cmMakefile.h"
#include "cmState.h"
#include "cmStateDirectory.h"
@@ -521,7 +522,7 @@ int cmCTestScriptHandler::RunCurrentScript()
// set any environment variables
if (!this->CTestEnv.empty()) {
- std::vector<std::string> envArgs = cmExpandedList(this->CTestEnv);
+ cmList envArgs{ this->CTestEnv };
cmSystemTools::AppendEnv(envArgs);
}
@@ -625,7 +626,7 @@ int cmCTestScriptHandler::PerformExtraUpdates()
// do an initial cvs update as required
command = this->UpdateCmd;
for (std::string const& eu : this->ExtraUpdates) {
- std::vector<std::string> cvsArgs = cmExpandedList(eu);
+ cmList cvsArgs{ eu };
if (cvsArgs.size() == 2) {
std::string fullCommand = cmStrCat(command, " update ", cvsArgs[1]);
output.clear();
@@ -764,7 +765,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
}
// run ctest, it may be more than one command in here
- std::vector<std::string> ctestCommands = cmExpandedList(this->CTestCmd);
+ cmList ctestCommands{ this->CTestCmd };
// 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 a1933cc..a92f9f2 100644
--- a/Source/CTest/cmCTestSubmitCommand.cxx
+++ b/Source/CTest/cmCTestSubmitCommand.cxx
@@ -13,10 +13,10 @@
#include "cmCTest.h"
#include "cmCTestSubmitHandler.h"
#include "cmCommand.h"
+#include "cmList.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
#include "cmRange.h"
-#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmValue.h"
@@ -64,14 +64,14 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
cmValue notesFilesVariable =
this->Makefile->GetDefinition("CTEST_NOTES_FILES");
if (notesFilesVariable) {
- std::vector<std::string> notesFiles = cmExpandedList(*notesFilesVariable);
+ cmList notesFiles{ *notesFilesVariable };
this->CTest->GenerateNotesFile(notesFiles);
}
cmValue extraFilesVariable =
this->Makefile->GetDefinition("CTEST_EXTRA_SUBMIT_FILES");
if (extraFilesVariable) {
- std::vector<std::string> extraFiles = cmExpandedList(*extraFilesVariable);
+ cmList extraFiles{ *extraFilesVariable };
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 3ff8c8f..a095e5d 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -22,6 +22,7 @@
#include "cmCurl.h"
#include "cmDuration.h"
#include "cmGeneratedFileStream.h"
+#include "cmList.h"
#include "cmState.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
@@ -160,7 +161,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(
/* In windows, this will init the winsock stuff */
::curl_global_init(CURL_GLOBAL_ALL);
std::string curlopt(this->CTest->GetCTestConfiguration("CurlOptions"));
- std::vector<std::string> args = cmExpandedList(curlopt);
+ cmList args{ curlopt };
bool verifyPeerOff = false;
bool verifyHostOff = false;
for (std::string const& arg : args) {
@@ -499,7 +500,7 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
cmCTestCurl curl(this->CTest);
curl.SetQuiet(this->Quiet);
std::string curlopt(this->CTest->GetCTestConfiguration("CurlOptions"));
- std::vector<std::string> args = cmExpandedList(curlopt);
+ cmList args{ curlopt };
curl.SetCurlOptions(args);
auto submitInactivityTimeout = this->GetSubmitInactivityTimeout();
if (submitInactivityTimeout != 0) {
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index f693ace..3adf33e 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -38,6 +38,7 @@
#include "cmGeneratedFileStream.h"
#include "cmGlobalGenerator.h"
#include "cmJSONState.h"
+#include "cmList.h"
#include "cmMakefile.h"
#include "cmState.h"
#include "cmStateSnapshot.h"
@@ -2235,19 +2236,19 @@ bool cmCTestTestHandler::SetTestsProperties(
} else if (key == "ATTACHED_FILES_ON_FAIL"_s) {
cmExpandList(val, rt.AttachOnFail);
} else if (key == "RESOURCE_LOCK"_s) {
- std::vector<std::string> lval = cmExpandedList(val);
+ cmList lval{ val };
rt.LockedResources.insert(lval.begin(), lval.end());
} else if (key == "FIXTURES_SETUP"_s) {
- std::vector<std::string> lval = cmExpandedList(val);
+ cmList lval{ val };
rt.FixturesSetup.insert(lval.begin(), lval.end());
} else if (key == "FIXTURES_CLEANUP"_s) {
- std::vector<std::string> lval = cmExpandedList(val);
+ cmList lval{ val };
rt.FixturesCleanup.insert(lval.begin(), lval.end());
} else if (key == "FIXTURES_REQUIRED"_s) {
- std::vector<std::string> lval = cmExpandedList(val);
+ cmList lval{ val };
rt.FixturesRequired.insert(lval.begin(), lval.end());
} else if (key == "TIMEOUT"_s) {
@@ -2260,12 +2261,12 @@ bool cmCTestTestHandler::SetTestsProperties(
} else if (key == "RUN_SERIAL"_s) {
rt.RunSerial = cmIsOn(val);
} else if (key == "FAIL_REGULAR_EXPRESSION"_s) {
- std::vector<std::string> lval = cmExpandedList(val);
+ cmList lval{ val };
for (std::string const& cr : lval) {
rt.ErrorRegularExpressions.emplace_back(cr, cr);
}
} else if (key == "SKIP_REGULAR_EXPRESSION"_s) {
- std::vector<std::string> lval = cmExpandedList(val);
+ cmList lval{ val };
for (std::string const& cr : lval) {
rt.SkipRegularExpressions.emplace_back(cr, cr);
}
@@ -2292,7 +2293,7 @@ bool cmCTestTestHandler::SetTestsProperties(
} else if (key == "ENVIRONMENT_MODIFICATION"_s) {
cmExpandList(val, rt.EnvironmentModification);
} else if (key == "LABELS"_s) {
- std::vector<std::string> Labels = cmExpandedList(val);
+ cmList Labels{ val };
rt.Labels.insert(rt.Labels.end(), Labels.begin(), Labels.end());
// sort the array
std::sort(rt.Labels.begin(), rt.Labels.end());
@@ -2309,21 +2310,21 @@ bool cmCTestTestHandler::SetTestsProperties(
rt.Measurements[val] = "1";
}
} else if (key == "PASS_REGULAR_EXPRESSION"_s) {
- std::vector<std::string> lval = cmExpandedList(val);
+ cmList lval{ val };
for (std::string const& cr : lval) {
rt.RequiredRegularExpressions.emplace_back(cr, cr);
}
} else if (key == "WORKING_DIRECTORY"_s) {
rt.Directory = val;
} else if (key == "TIMEOUT_AFTER_MATCH"_s) {
- std::vector<std::string> propArgs = cmExpandedList(val);
+ cmList propArgs{ val };
if (propArgs.size() != 2) {
cmCTestLog(this->CTest, WARNING,
"TIMEOUT_AFTER_MATCH expects two arguments, found "
<< propArgs.size() << std::endl);
} else {
rt.AlternateTimeout = cmDuration(atof(propArgs[0].c_str()));
- std::vector<std::string> lval = cmExpandedList(propArgs[1]);
+ cmList lval{ propArgs[1] };
for (std::string const& cr : lval) {
rt.TimeoutRegularExpressions.emplace_back(cr, cr);
}
@@ -2365,7 +2366,7 @@ bool cmCTestTestHandler::SetDirectoryProperties(
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
if (cwd == rt.Directory) {
if (key == "LABELS"_s) {
- std::vector<std::string> DirectoryLabels = cmExpandedList(val);
+ cmList DirectoryLabels{ val };
rt.Labels.insert(rt.Labels.end(), DirectoryLabels.begin(),
DirectoryLabels.end());