summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestProcessesLexerHelper.cxx55
-rw-r--r--Source/CTest/cmCTestResourceGroupsLexerHelper.cxx55
-rw-r--r--Source/CTest/cmCTestResourceGroupsLexerHelper.h (renamed from Source/CTest/cmCTestProcessesLexerHelper.h)12
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx4
4 files changed, 63 insertions, 63 deletions
diff --git a/Source/CTest/cmCTestProcessesLexerHelper.cxx b/Source/CTest/cmCTestProcessesLexerHelper.cxx
deleted file mode 100644
index 797164b..0000000
--- a/Source/CTest/cmCTestProcessesLexerHelper.cxx
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
- file Copyright.txt or https://cmake.org/licensing for details. */
-#include "cmCTestProcessesLexerHelper.h"
-
-#include "cmCTestProcessesLexer.h"
-#include "cmCTestTestHandler.h"
-
-cmCTestProcessesLexerHelper::cmCTestProcessesLexerHelper(
- std::vector<std::vector<cmCTestTestHandler::cmCTestTestResourceRequirement>>&
- output)
- : Output(output)
-{
-}
-
-bool cmCTestProcessesLexerHelper::ParseString(const std::string& value)
-{
- yyscan_t lexer;
- cmCTestProcesses_yylex_init_extra(this, &lexer);
-
- auto state = cmCTestProcesses_yy_scan_string(value.c_str(), lexer);
- int retval = cmCTestProcesses_yylex(lexer);
- cmCTestProcesses_yy_delete_buffer(state, lexer);
-
- cmCTestProcesses_yylex_destroy(lexer);
- return retval == 0;
-}
-
-void cmCTestProcessesLexerHelper::SetProcessCount(unsigned int count)
-{
- this->ProcessCount = count;
-}
-
-void cmCTestProcessesLexerHelper::SetResourceType(const std::string& type)
-{
- this->ResourceType = type;
-}
-
-void cmCTestProcessesLexerHelper::SetNeededSlots(int count)
-{
- this->NeededSlots = count;
-}
-
-void cmCTestProcessesLexerHelper::WriteRequirement()
-{
- this->Process.push_back({ this->ResourceType, this->NeededSlots, 1 });
-}
-
-void cmCTestProcessesLexerHelper::WriteProcess()
-{
- for (unsigned int i = 0; i < this->ProcessCount; ++i) {
- this->Output.push_back(this->Process);
- }
- this->Process.clear();
- this->ProcessCount = 1;
-}
diff --git a/Source/CTest/cmCTestResourceGroupsLexerHelper.cxx b/Source/CTest/cmCTestResourceGroupsLexerHelper.cxx
new file mode 100644
index 0000000..072af42
--- /dev/null
+++ b/Source/CTest/cmCTestResourceGroupsLexerHelper.cxx
@@ -0,0 +1,55 @@
+/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+ file Copyright.txt or https://cmake.org/licensing for details. */
+#include "cmCTestResourceGroupsLexerHelper.h"
+
+#include "cmCTestResourceGroupsLexer.h"
+#include "cmCTestTestHandler.h"
+
+cmCTestResourceGroupsLexerHelper::cmCTestResourceGroupsLexerHelper(
+ std::vector<std::vector<cmCTestTestHandler::cmCTestTestResourceRequirement>>&
+ output)
+ : Output(output)
+{
+}
+
+bool cmCTestResourceGroupsLexerHelper::ParseString(const std::string& value)
+{
+ yyscan_t lexer;
+ cmCTestResourceGroups_yylex_init_extra(this, &lexer);
+
+ auto state = cmCTestResourceGroups_yy_scan_string(value.c_str(), lexer);
+ int retval = cmCTestResourceGroups_yylex(lexer);
+ cmCTestResourceGroups_yy_delete_buffer(state, lexer);
+
+ cmCTestResourceGroups_yylex_destroy(lexer);
+ return retval == 0;
+}
+
+void cmCTestResourceGroupsLexerHelper::SetProcessCount(unsigned int count)
+{
+ this->ProcessCount = count;
+}
+
+void cmCTestResourceGroupsLexerHelper::SetResourceType(const std::string& type)
+{
+ this->ResourceType = type;
+}
+
+void cmCTestResourceGroupsLexerHelper::SetNeededSlots(int count)
+{
+ this->NeededSlots = count;
+}
+
+void cmCTestResourceGroupsLexerHelper::WriteRequirement()
+{
+ this->Process.push_back({ this->ResourceType, this->NeededSlots, 1 });
+}
+
+void cmCTestResourceGroupsLexerHelper::WriteProcess()
+{
+ for (unsigned int i = 0; i < this->ProcessCount; ++i) {
+ this->Output.push_back(this->Process);
+ }
+ this->Process.clear();
+ this->ProcessCount = 1;
+}
diff --git a/Source/CTest/cmCTestProcessesLexerHelper.h b/Source/CTest/cmCTestResourceGroupsLexerHelper.h
index 6c9289f..2cb6cb1 100644
--- a/Source/CTest/cmCTestProcessesLexerHelper.h
+++ b/Source/CTest/cmCTestResourceGroupsLexerHelper.h
@@ -1,25 +1,25 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#ifndef cmCTestProcessesLexerHelper_h
-#define cmCTestProcessesLexerHelper_h
+#ifndef cmCTestResourceGroupsLexerHelper_h
+#define cmCTestResourceGroupsLexerHelper_h
#include <string>
#include <vector>
#include "cmCTestTestHandler.h"
-class cmCTestProcessesLexerHelper
+class cmCTestResourceGroupsLexerHelper
{
public:
struct ParserType
{
};
- cmCTestProcessesLexerHelper(
+ cmCTestResourceGroupsLexerHelper(
std::vector<
std::vector<cmCTestTestHandler::cmCTestTestResourceRequirement>>&
output);
- ~cmCTestProcessesLexerHelper() = default;
+ ~cmCTestResourceGroupsLexerHelper() = default;
bool ParseString(const std::string& value);
@@ -39,6 +39,6 @@ private:
std::vector<cmCTestTestHandler::cmCTestTestResourceRequirement> Process;
};
-#define YY_EXTRA_TYPE cmCTestProcessesLexerHelper*
+#define YY_EXTRA_TYPE cmCTestResourceGroupsLexerHelper*
#endif
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 0f21f91..ec5c4bc 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -29,7 +29,7 @@
#include "cmAlgorithms.h"
#include "cmCTest.h"
#include "cmCTestMultiProcessHandler.h"
-#include "cmCTestProcessesLexerHelper.h"
+#include "cmCTestResourceGroupsLexerHelper.h"
#include "cmDuration.h"
#include "cmExecutionStatus.h"
#include "cmGeneratedFileStream.h"
@@ -1630,7 +1630,7 @@ bool cmCTestTestHandler::ParseResourceGroupsProperty(
const std::string& val,
std::vector<std::vector<cmCTestTestResourceRequirement>>& resourceGroups)
{
- cmCTestProcessesLexerHelper lexer(resourceGroups);
+ cmCTestResourceGroupsLexerHelper lexer(resourceGroups);
return lexer.ParseString(val);
}