diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2023-07-20 20:57:02 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2023-08-10 20:47:51 (GMT) |
commit | c8c1dd0d9540acbe6172afe192c149fe04d0625b (patch) | |
tree | dfbd13051070176f318fcdb1fb0ae10f1e7912e1 /Source/CTest/cmCTestMultiProcessHandler.h | |
parent | 3f5a5a5856790107bba5cad6d9d45d1170b986f1 (diff) | |
download | CMake-c8c1dd0d9540acbe6172afe192c149fe04d0625b.zip CMake-c8c1dd0d9540acbe6172afe192c149fe04d0625b.tar.gz CMake-c8c1dd0d9540acbe6172afe192c149fe04d0625b.tar.bz2 |
CTest: Add ability to dynamically generate resource spec file
Issue: #25106
Diffstat (limited to 'Source/CTest/cmCTestMultiProcessHandler.h')
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h index 2f5ad40..3b4e9c5 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.h +++ b/Source/CTest/cmCTestMultiProcessHandler.h @@ -11,15 +11,17 @@ #include <string> #include <vector> +#include <cm/optional> + #include <cm3p/uv.h> #include "cmCTest.h" #include "cmCTestResourceAllocator.h" +#include "cmCTestResourceSpec.h" #include "cmCTestTestHandler.h" #include "cmUVHandlePtr.h" struct cmCTestBinPackerAllocation; -class cmCTestResourceSpec; class cmCTestRunTest; /** \class cmCTestMultiProcessHandler @@ -90,13 +92,13 @@ public: this->RepeatCount = count; } - void SetQuiet(bool b) { this->Quiet = b; } - - void InitResourceAllocator(const cmCTestResourceSpec& spec) + void SetResourceSpecFile(const std::string& resourceSpecFile) { - this->ResourceAllocator.InitializeFromResourceSpec(spec); + this->ResourceSpecFile = resourceSpecFile; } + void SetQuiet(bool b) { this->Quiet = b; } + void CheckResourcesAvailable(); protected: @@ -158,6 +160,15 @@ protected: std::map<std::string, ResourceAllocationError>* errors = nullptr); void DeallocateResources(int index); bool AllResourcesAvailable(); + bool InitResourceAllocator(std::string& error); + bool CheckGeneratedResourceSpec(); + + bool UseResourceSpec = false; + cmCTestResourceSpec ResourceSpec; + std::string ResourceSpecFile; + std::string ResourceSpecSetupFixture; + cm::optional<std::size_t> ResourceSpecSetupTest; + bool HasInvalidGeneratedResourceSpec; // map from test number to set of depend tests TestMap Tests; |