فهرست منبع

Merge topic 'ctest-warning'

ec2f9012 CTest: correct misleading warning message for RUN_SERIAL tests

Acked-by: Kitware Robot <[email protected]>
Reviewed-by: Zack Galbreath <[email protected]>
Merge-request: !1469
Brad King 8 سال پیش
والد
کامیت
b77501d4c7
1فایلهای تغییر یافته به همراه12 افزوده شده و 0 حذف شده
  1. 12 0
      Source/CTest/cmCTestMultiProcessHandler.cxx

+ 12 - 0
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,