Bläddra i källkod

CTest: Only apply the secondary test timeout once

This commit fixes a bug in the implementation of the test property
TIMEOUT_AFTER_MATCH.  The new timeout value was being applied
every time a line was output by the test after the match had been
encountered.  Now the new timeout value is only set once.

This commit also improves some output formatting related to this
property.
Zack Galbreath 9 år sedan
förälder
incheckning
06b7f5d2ca
1 ändrade filer med 2 tillägg och 0 borttagningar
  1. 2 0
      Source/CTest/cmCTestRunTest.cxx

+ 2 - 0
Source/CTest/cmCTestRunTest.cxx

@@ -77,11 +77,13 @@ bool cmCTestRunTest::CheckOutput()
           if ( regIt->first.find(this->ProcessOutput.c_str()) )
           if ( regIt->first.find(this->ProcessOutput.c_str()) )
             {
             {
             cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
             cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+                       this->GetIndex() << ": " <<
                        "Test timeout changed to " <<
                        "Test timeout changed to " <<
                        this->TestProperties->AlternateTimeout << std::endl);
                        this->TestProperties->AlternateTimeout << std::endl);
             this->TestProcess->ResetStartTime();
             this->TestProcess->ResetStartTime();
             this->TestProcess->ChangeTimeout(
             this->TestProcess->ChangeTimeout(
               this->TestProperties->AlternateTimeout);
               this->TestProperties->AlternateTimeout);
+            this->TestProperties->TimeoutRegularExpressions.clear();
             break;
             break;
             }
             }
           }
           }