summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestMultiProcessHandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/cmCTestMultiProcessHandler.h')
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.h35
1 files changed, 15 insertions, 20 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h
index 02589ca..bbbfc7b 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.h
+++ b/Source/CTest/cmCTestMultiProcessHandler.h
@@ -58,7 +58,7 @@ public:
unsigned int Slots;
};
- cmCTestMultiProcessHandler();
+ cmCTestMultiProcessHandler(cmCTest* ctest, cmCTestTestHandler* handler);
virtual ~cmCTestMultiProcessHandler();
// Set the tests
void SetTests(TestMap tests, PropertiesMap properties);
@@ -81,13 +81,6 @@ public:
this->TestResults = r;
}
- void SetCTest(cmCTest* ctest) { this->CTest = ctest; }
-
- void SetTestHandler(cmCTestTestHandler* handler)
- {
- this->TestHandler = handler;
- }
-
cmCTestTestHandler* GetTestHandler() { return this->TestHandler; }
void SetRepeatMode(cmCTest::Repeat mode, int count)
@@ -171,22 +164,26 @@ protected:
bool InitResourceAllocator(std::string& error);
bool CheckGeneratedResourceSpec();
+private:
+ cmCTest* CTest;
+ cmCTestTestHandler* TestHandler;
+
bool UseResourceSpec = false;
cmCTestResourceSpec ResourceSpec;
std::string ResourceSpecFile;
std::string ResourceSpecSetupFixture;
cm::optional<std::size_t> ResourceSpecSetupTest;
- bool HasInvalidGeneratedResourceSpec;
+ bool HasInvalidGeneratedResourceSpec = false;
// Tests pending selection to start. They may have dependencies.
TestMap PendingTests;
// List of pending test indexes, ordered by cost.
std::list<int> OrderedTests;
// Total number of tests we'll be running
- size_t Total;
+ size_t Total = 0;
// Number of tests that are complete
- size_t Completed;
- size_t RunningCount;
+ size_t Completed = 0;
+ size_t RunningCount = 0;
std::set<size_t> ProcessorsAvailable;
size_t HaveAffinity;
bool StopTimePassed = false;
@@ -204,7 +201,7 @@ protected:
ResourceAvailabilityErrors;
cmCTestResourceAllocator ResourceAllocator;
std::vector<cmCTestTestHandler::cmCTestTestResult>* TestResults;
- size_t ParallelLevel; // max number of process that can be run at once
+ size_t ParallelLevel = 1; // max number of process that can be run at once
// 'make' jobserver client. If connected, we acquire a token
// for each test before running its process.
@@ -214,16 +211,14 @@ protected:
// Callback invoked when a token is received.
void JobServerReceivedToken();
- unsigned long TestLoad;
- unsigned long FakeLoadForTesting;
+ unsigned long TestLoad = 0;
+ unsigned long FakeLoadForTesting = 0;
cm::uv_loop_ptr Loop;
cm::uv_idle_ptr StartNextTestsOnIdle_;
cm::uv_timer_ptr StartNextTestsOnTimer_;
- cmCTestTestHandler* TestHandler;
- cmCTest* CTest;
- bool HasCycles;
+ bool HasCycles = false;
cmCTest::Repeat RepeatMode = cmCTest::Repeat::Never;
int RepeatCount = 1;
- bool Quiet;
- bool SerialTestRunning;
+ bool Quiet = false;
+ bool SerialTestRunning = false;
};