Commit 73a40b19 authored by Brad King's avatar Brad King
Browse files

CTest: Rename "Processes" lexer to "ResourceGroups"

The corresponding test property `PROCESSES` has been renamed to
`RESOURCE_GROUPS`.
parent af9ed543
...@@ -925,8 +925,8 @@ set(CTEST_SRCS cmCTest.cxx ...@@ -925,8 +925,8 @@ set(CTEST_SRCS cmCTest.cxx
CTest/cmCTestMemCheckCommand.cxx CTest/cmCTestMemCheckCommand.cxx
CTest/cmCTestMemCheckHandler.cxx CTest/cmCTestMemCheckHandler.cxx
CTest/cmCTestMultiProcessHandler.cxx CTest/cmCTestMultiProcessHandler.cxx
CTest/cmCTestProcessesLexerHelper.cxx
CTest/cmCTestReadCustomFilesCommand.cxx CTest/cmCTestReadCustomFilesCommand.cxx
CTest/cmCTestResourceGroupsLexerHelper.cxx
CTest/cmCTestRunScriptCommand.cxx CTest/cmCTestRunScriptCommand.cxx
CTest/cmCTestRunTest.cxx CTest/cmCTestRunTest.cxx
CTest/cmCTestScriptHandler.cxx CTest/cmCTestScriptHandler.cxx
...@@ -958,9 +958,9 @@ set(CTEST_SRCS cmCTest.cxx ...@@ -958,9 +958,9 @@ set(CTEST_SRCS cmCTest.cxx
CTest/cmCTestP4.cxx CTest/cmCTestP4.cxx
CTest/cmCTestP4.h CTest/cmCTestP4.h
LexerParser/cmCTestProcessesLexer.cxx LexerParser/cmCTestResourceGroupsLexer.cxx
LexerParser/cmCTestProcessesLexer.h LexerParser/cmCTestResourceGroupsLexer.h
LexerParser/cmCTestProcessesLexer.in.l LexerParser/cmCTestResourceGroupsLexer.in.l
) )
# Build CTestLib # Build CTestLib
......
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */ file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestProcessesLexerHelper.h" #include "cmCTestResourceGroupsLexerHelper.h"
#include "cmCTestProcessesLexer.h" #include "cmCTestResourceGroupsLexer.h"
#include "cmCTestTestHandler.h" #include "cmCTestTestHandler.h"
cmCTestProcessesLexerHelper::cmCTestProcessesLexerHelper( cmCTestResourceGroupsLexerHelper::cmCTestResourceGroupsLexerHelper(
std::vector<std::vector<cmCTestTestHandler::cmCTestTestResourceRequirement>>& std::vector<std::vector<cmCTestTestHandler::cmCTestTestResourceRequirement>>&
output) output)
: Output(output) : Output(output)
{ {
} }
bool cmCTestProcessesLexerHelper::ParseString(const std::string& value) bool cmCTestResourceGroupsLexerHelper::ParseString(const std::string& value)
{ {
yyscan_t lexer; yyscan_t lexer;
cmCTestProcesses_yylex_init_extra(this, &lexer); cmCTestResourceGroups_yylex_init_extra(this, &lexer);
auto state = cmCTestProcesses_yy_scan_string(value.c_str(), lexer); auto state = cmCTestResourceGroups_yy_scan_string(value.c_str(), lexer);
int retval = cmCTestProcesses_yylex(lexer); int retval = cmCTestResourceGroups_yylex(lexer);
cmCTestProcesses_yy_delete_buffer(state, lexer); cmCTestResourceGroups_yy_delete_buffer(state, lexer);
cmCTestProcesses_yylex_destroy(lexer); cmCTestResourceGroups_yylex_destroy(lexer);
return retval == 0; return retval == 0;
} }
void cmCTestProcessesLexerHelper::SetProcessCount(unsigned int count) void cmCTestResourceGroupsLexerHelper::SetProcessCount(unsigned int count)
{ {
this->ProcessCount = count; this->ProcessCount = count;
} }
void cmCTestProcessesLexerHelper::SetResourceType(const std::string& type) void cmCTestResourceGroupsLexerHelper::SetResourceType(const std::string& type)
{ {
this->ResourceType = type; this->ResourceType = type;
} }
void cmCTestProcessesLexerHelper::SetNeededSlots(int count) void cmCTestResourceGroupsLexerHelper::SetNeededSlots(int count)
{ {
this->NeededSlots = count; this->NeededSlots = count;
} }
void cmCTestProcessesLexerHelper::WriteRequirement() void cmCTestResourceGroupsLexerHelper::WriteRequirement()
{ {
this->Process.push_back({ this->ResourceType, this->NeededSlots, 1 }); this->Process.push_back({ this->ResourceType, this->NeededSlots, 1 });
} }
void cmCTestProcessesLexerHelper::WriteProcess() void cmCTestResourceGroupsLexerHelper::WriteProcess()
{ {
for (unsigned int i = 0; i < this->ProcessCount; ++i) { for (unsigned int i = 0; i < this->ProcessCount; ++i) {
this->Output.push_back(this->Process); this->Output.push_back(this->Process);
......
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */ file Copyright.txt or https://cmake.org/licensing for details. */
#ifndef cmCTestProcessesLexerHelper_h #ifndef cmCTestResourceGroupsLexerHelper_h
#define cmCTestProcessesLexerHelper_h #define cmCTestResourceGroupsLexerHelper_h
#include <string> #include <string>
#include <vector> #include <vector>
#include "cmCTestTestHandler.h" #include "cmCTestTestHandler.h"
class cmCTestProcessesLexerHelper class cmCTestResourceGroupsLexerHelper
{ {
public: public:
struct ParserType struct ParserType
{ {
}; };
cmCTestProcessesLexerHelper( cmCTestResourceGroupsLexerHelper(
std::vector< std::vector<
std::vector<cmCTestTestHandler::cmCTestTestResourceRequirement>>& std::vector<cmCTestTestHandler::cmCTestTestResourceRequirement>>&
output); output);
~cmCTestProcessesLexerHelper() = default; ~cmCTestResourceGroupsLexerHelper() = default;
bool ParseString(const std::string& value); bool ParseString(const std::string& value);
...@@ -39,6 +39,6 @@ private: ...@@ -39,6 +39,6 @@ private:
std::vector<cmCTestTestHandler::cmCTestTestResourceRequirement> Process; std::vector<cmCTestTestHandler::cmCTestTestResourceRequirement> Process;
}; };
#define YY_EXTRA_TYPE cmCTestProcessesLexerHelper* #define YY_EXTRA_TYPE cmCTestResourceGroupsLexerHelper*
#endif #endif
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "cmAlgorithms.h" #include "cmAlgorithms.h"
#include "cmCTest.h" #include "cmCTest.h"
#include "cmCTestMultiProcessHandler.h" #include "cmCTestMultiProcessHandler.h"
#include "cmCTestProcessesLexerHelper.h" #include "cmCTestResourceGroupsLexerHelper.h"
#include "cmDuration.h" #include "cmDuration.h"
#include "cmExecutionStatus.h" #include "cmExecutionStatus.h"
#include "cmGeneratedFileStream.h" #include "cmGeneratedFileStream.h"
...@@ -1630,7 +1630,7 @@ bool cmCTestTestHandler::ParseResourceGroupsProperty( ...@@ -1630,7 +1630,7 @@ bool cmCTestTestHandler::ParseResourceGroupsProperty(
const std::string& val, const std::string& val,
std::vector<std::vector<cmCTestTestResourceRequirement>>& resourceGroups) std::vector<std::vector<cmCTestTestResourceRequirement>>& resourceGroups)
{ {
cmCTestProcessesLexerHelper lexer(resourceGroups); cmCTestResourceGroupsLexerHelper lexer(resourceGroups);
return lexer.ParseString(val); return lexer.ParseString(val);
} }
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
/cmCommandArgumentLexer.h generated /cmCommandArgumentLexer.h generated
/cmCommandArgumentParser.cxx generated /cmCommandArgumentParser.cxx generated
/cmCommandArgumentParserTokens.h generated /cmCommandArgumentParserTokens.h generated
/cmCTestProcessesLexer.cxx generated /cmCTestResourceGroupsLexer.cxx generated
/cmCTestProcessesLexer.h generated /cmCTestResourceGroupsLexer.h generated
/cmDependsJavaLexer.cxx generated /cmDependsJavaLexer.cxx generated
/cmDependsJavaLexer.h generated /cmDependsJavaLexer.h generated
/cmDependsJavaParser.cxx generated /cmDependsJavaParser.cxx generated
......
...@@ -14,213 +14,213 @@ ...@@ -14,213 +14,213 @@
#endif #endif
#ifdef yy_create_buffer #ifdef yy_create_buffer
#define cmCTestProcesses_yy_create_buffer_ALREADY_DEFINED #define cmCTestResourceGroups_yy_create_buffer_ALREADY_DEFINED
#else #else
#define yy_create_buffer cmCTestProcesses_yy_create_buffer #define yy_create_buffer cmCTestResourceGroups_yy_create_buffer
#endif #endif
#ifdef yy_delete_buffer #ifdef yy_delete_buffer
#define cmCTestProcesses_yy_delete_buffer_ALREADY_DEFINED #define cmCTestResourceGroups_yy_delete_buffer_ALREADY_DEFINED
#else #else
#define yy_delete_buffer cmCTestProcesses_yy_delete_buffer #define yy_delete_buffer cmCTestResourceGroups_yy_delete_buffer
#endif #endif
#ifdef yy_scan_buffer #ifdef yy_scan_buffer
#define cmCTestProcesses_yy_scan_buffer_ALREADY_DEFINED #define cmCTestResourceGroups_yy_scan_buffer_ALREADY_DEFINED
#else #else
#define yy_scan_buffer cmCTestProcesses_yy_scan_buffer #define yy_scan_buffer cmCTestResourceGroups_yy_scan_buffer
#endif #endif
#ifdef yy_scan_string #ifdef yy_scan_string
#define cmCTestProcesses_yy_scan_string_ALREADY_DEFINED #define cmCTestResourceGroups_yy_scan_string_ALREADY_DEFINED
#else #else
#define yy_scan_string cmCTestProcesses_yy_scan_string #define yy_scan_string cmCTestResourceGroups_yy_scan_string
#endif #endif
#ifdef yy_scan_bytes #ifdef yy_scan_bytes
#define cmCTestProcesses_yy_scan_bytes_ALREADY_DEFINED #define cmCTestResourceGroups_yy_scan_bytes_ALREADY_DEFINED
#else #else
#define yy_scan_bytes cmCTestProcesses_yy_scan_bytes #define yy_scan_bytes cmCTestResourceGroups_yy_scan_bytes
#endif #endif
#ifdef yy_init_buffer #ifdef yy_init_buffer
#define cmCTestProcesses_yy_init_buffer_ALREADY_DEFINED #define cmCTestResourceGroups_yy_init_buffer_ALREADY_DEFINED
#else #else
#define yy_init_buffer cmCTestProcesses_yy_init_buffer #define yy_init_buffer cmCTestResourceGroups_yy_init_buffer
#endif #endif
#ifdef yy_flush_buffer #ifdef yy_flush_buffer
#define cmCTestProcesses_yy_flush_buffer_ALREADY_DEFINED #define cmCTestResourceGroups_yy_flush_buffer_ALREADY_DEFINED
#else #else
#define yy_flush_buffer cmCTestProcesses_yy_flush_buffer #define yy_flush_buffer cmCTestResourceGroups_yy_flush_buffer
#endif #endif
#ifdef yy_load_buffer_state #ifdef yy_load_buffer_state
#define cmCTestProcesses_yy_load_buffer_state_ALREADY_DEFINED #define cmCTestResourceGroups_yy_load_buffer_state_ALREADY_DEFINED
#else #else
#define yy_load_buffer_state cmCTestProcesses_yy_load_buffer_state #define yy_load_buffer_state cmCTestResourceGroups_yy_load_buffer_state
#endif #endif
#ifdef yy_switch_to_buffer #ifdef yy_switch_to_buffer
#define cmCTestProcesses_yy_switch_to_buffer_ALREADY_DEFINED #define cmCTestResourceGroups_yy_switch_to_buffer_ALREADY_DEFINED
#else #else
#define yy_switch_to_buffer cmCTestProcesses_yy_switch_to_buffer #define yy_switch_to_buffer cmCTestResourceGroups_yy_switch_to_buffer
#endif #endif
#ifdef yypush_buffer_state #ifdef yypush_buffer_state
#define cmCTestProcesses_yypush_buffer_state_ALREADY_DEFINED #define cmCTestResourceGroups_yypush_buffer_state_ALREADY_DEFINED
#else #else
#define yypush_buffer_state cmCTestProcesses_yypush_buffer_state #define yypush_buffer_state cmCTestResourceGroups_yypush_buffer_state
#endif #endif
#ifdef yypop_buffer_state #ifdef yypop_buffer_state
#define cmCTestProcesses_yypop_buffer_state_ALREADY_DEFINED #define cmCTestResourceGroups_yypop_buffer_state_ALREADY_DEFINED
#else #else
#define yypop_buffer_state cmCTestProcesses_yypop_buffer_state #define yypop_buffer_state cmCTestResourceGroups_yypop_buffer_state
#endif #endif
#ifdef yyensure_buffer_stack #ifdef yyensure_buffer_stack
#define cmCTestProcesses_yyensure_buffer_stack_ALREADY_DEFINED #define cmCTestResourceGroups_yyensure_buffer_stack_ALREADY_DEFINED
#else #else
#define yyensure_buffer_stack cmCTestProcesses_yyensure_buffer_stack #define yyensure_buffer_stack cmCTestResourceGroups_yyensure_buffer_stack
#endif #endif
#ifdef yylex #ifdef yylex
#define cmCTestProcesses_yylex_ALREADY_DEFINED #define cmCTestResourceGroups_yylex_ALREADY_DEFINED
#else #else
#define yylex cmCTestProcesses_yylex #define yylex cmCTestResourceGroups_yylex
#endif #endif
#ifdef yyrestart #ifdef yyrestart
#define cmCTestProcesses_yyrestart_ALREADY_DEFINED #define cmCTestResourceGroups_yyrestart_ALREADY_DEFINED
#else #else
#define yyrestart cmCTestProcesses_yyrestart #define yyrestart cmCTestResourceGroups_yyrestart
#endif #endif
#ifdef yylex_init #ifdef yylex_init
#define cmCTestProcesses_yylex_init_ALREADY_DEFINED #define cmCTestResourceGroups_yylex_init_ALREADY_DEFINED
#else #else
#define yylex_init cmCTestProcesses_yylex_init #define yylex_init cmCTestResourceGroups_yylex_init
#endif #endif
#ifdef yylex_init_extra #ifdef yylex_init_extra
#define cmCTestProcesses_yylex_init_extra_ALREADY_DEFINED #define cmCTestResourceGroups_yylex_init_extra_ALREADY_DEFINED
#else #else
#define yylex_init_extra cmCTestProcesses_yylex_init_extra #define yylex_init_extra cmCTestResourceGroups_yylex_init_extra
#endif #endif
#ifdef yylex_destroy #ifdef yylex_destroy
#define cmCTestProcesses_yylex_destroy_ALREADY_DEFINED #define cmCTestResourceGroups_yylex_destroy_ALREADY_DEFINED
#else #else
#define yylex_destroy cmCTestProcesses_yylex_destroy #define yylex_destroy cmCTestResourceGroups_yylex_destroy
#endif #endif
#ifdef yyget_debug #ifdef yyget_debug
#define cmCTestProcesses_yyget_debug_ALREADY_DEFINED #define cmCTestResourceGroups_yyget_debug_ALREADY_DEFINED
#else #else
#define yyget_debug cmCTestProcesses_yyget_debug #define yyget_debug cmCTestResourceGroups_yyget_debug
#endif #endif
#ifdef yyset_debug #ifdef yyset_debug
#define cmCTestProcesses_yyset_debug_ALREADY_DEFINED #define cmCTestResourceGroups_yyset_debug_ALREADY_DEFINED
#else #else
#define yyset_debug cmCTestProcesses_yyset_debug #define yyset_debug cmCTestResourceGroups_yyset_debug
#endif #endif
#ifdef yyget_extra #ifdef yyget_extra
#define cmCTestProcesses_yyget_extra_ALREADY_DEFINED #define cmCTestResourceGroups_yyget_extra_ALREADY_DEFINED
#else #else
#define yyget_extra cmCTestProcesses_yyget_extra #define yyget_extra cmCTestResourceGroups_yyget_extra
#endif #endif
#ifdef yyset_extra #ifdef yyset_extra
#define cmCTestProcesses_yyset_extra_ALREADY_DEFINED #define cmCTestResourceGroups_yyset_extra_ALREADY_DEFINED
#else #else
#define yyset_extra cmCTestProcesses_yyset_extra #define yyset_extra cmCTestResourceGroups_yyset_extra
#endif #endif
#ifdef yyget_in #ifdef yyget_in
#define cmCTestProcesses_yyget_in_ALREADY_DEFINED #define cmCTestResourceGroups_yyget_in_ALREADY_DEFINED
#else #else
#define yyget_in cmCTestProcesses_yyget_in #define yyget_in cmCTestResourceGroups_yyget_in
#endif #endif
#ifdef yyset_in #ifdef yyset_in
#define cmCTestProcesses_yyset_in_ALREADY_DEFINED #define cmCTestResourceGroups_yyset_in_ALREADY_DEFINED
#else #else
#define yyset_in cmCTestProcesses_yyset_in #define yyset_in cmCTestResourceGroups_yyset_in
#endif #endif
#ifdef yyget_out #ifdef yyget_out
#define cmCTestProcesses_yyget_out_ALREADY_DEFINED #define cmCTestResourceGroups_yyget_out_ALREADY_DEFINED
#else #else
#define yyget_out cmCTestProcesses_yyget_out #define yyget_out cmCTestResourceGroups_yyget_out
#endif #endif
#ifdef yyset_out #ifdef yyset_out
#define cmCTestProcesses_yyset_out_ALREADY_DEFINED #define cmCTestResourceGroups_yyset_out_ALREADY_DEFINED
#else #else
#define yyset_out cmCTestProcesses_yyset_out #define yyset_out cmCTestResourceGroups_yyset_out
#endif #endif
#ifdef yyget_leng #ifdef yyget_leng
#define cmCTestProcesses_yyget_leng_ALREADY_DEFINED #define cmCTestResourceGroups_yyget_leng_ALREADY_DEFINED
#else #else
#define yyget_leng cmCTestProcesses_yyget_leng #define yyget_leng cmCTestResourceGroups_yyget_leng
#endif #endif
#ifdef yyget_text #ifdef yyget_text
#define cmCTestProcesses_yyget_text_ALREADY_DEFINED #define cmCTestResourceGroups_yyget_text_ALREADY_DEFINED
#else #else
#define yyget_text cmCTestProcesses_yyget_text #define yyget_text cmCTestResourceGroups_yyget_text
#endif #endif
#ifdef yyget_lineno #ifdef yyget_lineno
#define cmCTestProcesses_yyget_lineno_ALREADY_DEFINED #define cmCTestResourceGroups_yyget_lineno_ALREADY_DEFINED
#else #else
#define yyget_lineno cmCTestProcesses_yyget_lineno #define yyget_lineno cmCTestResourceGroups_yyget_lineno
#endif #endif
#ifdef yyset_lineno #ifdef yyset_lineno
#define cmCTestProcesses_yyset_lineno_ALREADY_DEFINED #define cmCTestResourceGroups_yyset_lineno_ALREADY_DEFINED
#else #else
#define yyset_lineno cmCTestProcesses_yyset_lineno #define yyset_lineno cmCTestResourceGroups_yyset_lineno
#endif #endif
#ifdef yyget_column #ifdef yyget_column
#define cmCTestProcesses_yyget_column_ALREADY_DEFINED #define cmCTestResourceGroups_yyget_column_ALREADY_DEFINED
#else #else
#define yyget_column cmCTestProcesses_yyget_column #define yyget_column cmCTestResourceGroups_yyget_column
#endif #endif
#ifdef yyset_column #ifdef yyset_column
#define cmCTestProcesses_yyset_column_ALREADY_DEFINED #define cmCTestResourceGroups_yyset_column_ALREADY_DEFINED
#else #else
#define yyset_column cmCTestProcesses_yyset_column #define yyset_column cmCTestResourceGroups_yyset_column
#endif #endif
#ifdef yywrap #ifdef yywrap
#define cmCTestProcesses_yywrap_ALREADY_DEFINED #define cmCTestResourceGroups_yywrap_ALREADY_DEFINED
#else #else
#define yywrap cmCTestProcesses_yywrap #define yywrap cmCTestResourceGroups_yywrap
#endif #endif
#ifdef yyalloc #ifdef yyalloc
#define cmCTestProcesses_yyalloc_ALREADY_DEFINED #define cmCTestResourceGroups_yyalloc_ALREADY_DEFINED
#else #else
#define yyalloc cmCTestProcesses_yyalloc #define yyalloc cmCTestResourceGroups_yyalloc
#endif #endif
#ifdef yyrealloc #ifdef yyrealloc
#define cmCTestProcesses_yyrealloc_ALREADY_DEFINED #define cmCTestResourceGroups_yyrealloc_ALREADY_DEFINED
#else #else
#define yyrealloc cmCTestProcesses_yyrealloc #define yyrealloc cmCTestResourceGroups_yyrealloc
#endif #endif
#ifdef yyfree #ifdef yyfree
#define cmCTestProcesses_yyfree_ALREADY_DEFINED #define cmCTestResourceGroups_yyfree_ALREADY_DEFINED
#else #else
#define yyfree cmCTestProcesses_yyfree #define yyfree cmCTestResourceGroups_yyfree
#endif #endif
/* First, we deal with platform-specific or compiler-specific issues. */ /* First, we deal with platform-specific or compiler-specific issues. */
...@@ -526,7 +526,7 @@ void yyfree ( void * , yyscan_t yyscanner ); ...@@ -526,7 +526,7 @@ void yyfree ( void * , yyscan_t yyscanner );
/* Begin user sect3 */ /* Begin user sect3 */
#define cmCTestProcesses_yywrap(yyscanner) (/*CONSTCOND*/1)