Commit 909842ff authored by Zack Galbreath's avatar Zack Galbreath
Browse files

CTest: report time spent after matching output

When using the TIMEOUT_AFTER_MATCH test property, only report the
time spent by the test after the matching output was found.
parent 188c762f
......@@ -22,7 +22,9 @@ When the test outputs a line that matches ``regex`` its start time is
reset to the current time and its timeout duration is changed to
``seconds``. Prior to this, the timeout duration is determined by the
:prop_test:`TIMEOUT` property or the :variable:`CTEST_TEST_TIMEOUT`
variable if either of these are set.
variable if either of these are set. Because the test's start time is
reset, its execution time will not include any time that was spent
waiting for the matching output.
:prop_test:`TIMEOUT_AFTER_MATCH` is useful for avoiding spurious
timeouts when your test must wait for some system resource to become
......@@ -225,6 +225,7 @@ void cmProcess::ChangeTimeout(double t)
void cmProcess::ResetStartTime()
this->StartTime = cmSystemTools::GetTime();
int cmProcess::GetExitException()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment