diff options
author | Wouter Klouwen <wouter.klouwen@youview.com> | 2017-11-09 13:31:07 (GMT) |
---|---|---|
committer | Wouter Klouwen <wouter.klouwen@youview.com> | 2017-11-09 13:53:50 (GMT) |
commit | ec2f901202fd2907b84ad5f0280a347a8bd9f751 (patch) | |
tree | abb244c0e27e50f3501a2b9a14d14f17e6ec4460 /Source | |
parent | 4eefad236aad84c1f4ca38fcd3533a0ec7401a3b (diff) | |
download | CMake-ec2f901202fd2907b84ad5f0280a347a8bd9f751.zip CMake-ec2f901202fd2907b84ad5f0280a347a8bd9f751.tar.gz CMake-ec2f901202fd2907b84ad5f0280a347a8bd9f751.tar.bz2 |
CTest: correct misleading warning message for RUN_SERIAL tests
As reported in issue 17167, when only RUN_SERIAL tests remain, CTest can
display a misleading message that it is waiting for the load to come
down when in fact, it cannot start any new tests.
This commit fixes that by determining whether this circumstance is
what's happening and adds an additional warning message in this case.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 6a7bdc0..ae07feb 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -326,10 +326,22 @@ void cmCTestMultiProcessHandler::StartNextTests() } if (allTestsFailedTestLoadCheck) { + // Find out whether there are any non RUN_SERIAL tests left, so that the + // correct warning may be displayed. + bool onlyRunSerialTestsLeft = true; + for (auto const& test : copy) { + if (!this->Properties[test]->RunSerial) { + onlyRunSerialTestsLeft = false; + } + } cmCTestLog(this->CTest, HANDLER_OUTPUT, "***** WAITING, "); + if (this->SerialTestRunning) { cmCTestLog(this->CTest, HANDLER_OUTPUT, "Waiting for RUN_SERIAL test to finish."); + } else if (onlyRunSerialTestsLeft) { + cmCTestLog(this->CTest, HANDLER_OUTPUT, + "Only RUN_SERIAL tests remain, awaiting available slot."); } else { /* clang-format off */ cmCTestLog(this->CTest, HANDLER_OUTPUT, |