Bläddra i källkod

CTest: break after first regex match on output

PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION both take a list of expressions.
Stop searching if the first of those has matched the output as the result will not
change anymore.
Rolf Eike Beer 12 år sedan
förälder
incheckning
12cf7bc507
1 ändrade filer med 2 tillägg och 0 borttagningar
  1. 2 0
      Source/CTest/cmCTestRunTest.cxx

+ 2 - 0
Source/CTest/cmCTestRunTest.cxx

@@ -166,6 +166,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
         {
         {
         found = true;
         found = true;
         reason = "Required regular expression found.";
         reason = "Required regular expression found.";
+        break;
         }
         }
       }
       }
     if ( !found )
     if ( !found )
@@ -196,6 +197,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
         reason += passIt->second;
         reason += passIt->second;
         reason += "]";
         reason += "]";
         forceFail = true;
         forceFail = true;
+        break;
         }
         }
       }
       }
     }
     }