| 562 | } |
| 563 | |
| 564 | void cmCTestMultiProcessHandler::StartTest(int test) |
| 565 | { |
| 566 | if (this->JobServerClient) { |
| 567 | // There is a job server. Request a token and queue the test to run |
| 568 | // when a token is received. Note that if we do not get a token right |
| 569 | // away it's possible that the system load will be higher when the |
| 570 | // token is received and we may violate the test-load limit. However, |
| 571 | // this is unlikely because if we do not get a token right away, some |
| 572 | // other job that's currently running must finish before we get one. |
| 573 | this->JobServerClient->RequestToken(); |
| 574 | this->JobServerQueuedTests.emplace_back(test); |
| 575 | } else { |
| 576 | // There is no job server. Start the test now. |
| 577 | this->StartTestProcess(test); |
| 578 | } |
| 579 | } |
| 580 | |
| 581 | void cmCTestMultiProcessHandler::JobServerReceivedToken() |
| 582 | { |
no test coverage detected