cmCTestMultiProcessHandler: Start new tests asynchronously

When a test finishes, defer starting new tests until the next loop
iteration.  That way, if multiple tests finish in a single loop
iteration, we can free all of their resources first, and then start
a new batch of tests.
This commit is contained in:
Brad King
2023-11-20 18:49:50 -05:00
parent 9d8415c17b
commit e528cd795f
2 changed files with 17 additions and 2 deletions

View File

@@ -130,6 +130,7 @@ protected:
void ErasePendingTest(int index);
void FinishTestProcess(std::unique_ptr<cmCTestRunTest> runner, bool started);
void StartNextTestsOnIdle();
void StartNextTestsOnTimer();
void RemoveTest(int index);
@@ -207,6 +208,7 @@ protected:
unsigned long TestLoad;
unsigned long FakeLoadForTesting;
cm::uv_loop_ptr Loop;
cm::uv_idle_ptr StartNextTestsOnIdle_;
cm::uv_timer_ptr StartNextTestsOnTimer_;
cmCTestTestHandler* TestHandler;
cmCTest* CTest;