| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This commit introduces cmDuration as a typedef for
std::chrono::duration<double, std::ratio<1>>. It is less verbose and
provides for a point to put future common functionality for durations.
No functional change intended.
|
|
|
|
|
|
|
| |
The libuv documentation states that the stream read callback may
be called with `nread == 0` for EAGAIN. Handle this gracefully.
It also states that the callee is responsible for closing the
stream on error. Always close the stream for `nread < 0`.
|
|
|
|
|
|
| |
Use a single `cmProcessOutput` instance persistently to decode
all output of a test process so that partial character bytes
can be buffered.
|
|
|
|
| |
Co-Author: Brad King <brad.king@kitware.com>
|
|
|
|
| |
Translate the values from KWSys Process.
|
|
|
|
| |
Translate the values from KWSys Process.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Prior to 1.19, libuv does not use SA_RESTART in its signal handler.
Add a helper to cause libuv to install its handler and then revise
the handler's flags to add SA_RESTART.
|
|
|
|
|
|
|
|
| |
If `StartTestProcess` does not start a test, propagate this information
back up to the `StartNextTests` loop so that it can move on to another
candidate without allocating processors to a test that didn't run.
Otherwise we have to wait for the next time `RunTests` loops around and
calls `StartNextTests` again.
|
|
|
|
|
|
|
|
| |
Avoid creating a cmCTestRunTest instance if the stop time has been
reached. If the stop time occurs in the small time between creating an
instance and computing the child process timeout, we will simply compute
a zero timeout. This is already done for the case that we StartAgain
after the stop time.
|
| |
|
|
|
|
|
| |
Calculate the stop time up front instead of re-parsing its string for
every test.
|
|
|
|
|
|
|
| |
This member was added by commit v2.8.2~285 (Better detection of
stop_time being passed, 2010-03-19), but its logic has no effect.
The member is only used for comparison against a value to which
it was just assigned.
|
|
|
|
| |
Some are user-facing. Others are source comments.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ba6caafa CTest: Use integer-representable value for "infinite" timeout
548e8f6f CTest: Simplify std::chrono::duration<double> conversion to double
de0035fd cmCTestBuildAndTestHandler: Convert timeout to std::chrono::duration
687a26b7 CTest: Fix regression in build-and-test timeout forwarding
e770b1b8 CTest: Fix regression in build-and-test timeout compuatation
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: dublet <github@dublet.org>
Merge-request: !1574
|
| |
| |
| |
| |
| |
| |
| |
| | |
Refactoring in commit 66419bc046 (CTest: convert timeouts to
std::chrono::duration, 2017-11-20) changed out "infinite" timeout to a
value not representable by a 64-bit integer. This causes undefined
behavior when e.g. KWSys Process converts the duration to a `long` to
interact with system APIs. Use the old `1.0e7` maximum value.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The ratio of ticks to seconds for this type is 1, so we can just use its
`count()` directly. This also avoids converting through the integer
representation of `std::chrono::milliseconds`, which has a much smaller
allowed range.
Drop our `cmsysProcess_SetTimeout` wrapper as it is now very thin.
|
| | |
|
| |
| |
| |
| |
| | |
This was partially implemented by commit v2.8.0~154 (Added some ctest
batch capabilities, 2009-09-10) but never finished.
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
be470278 CTest: Fix regression in test timeout compuatation
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: dublet <github@dublet.org>
Merge-request: !1568
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Refactoring in commit 66419bc046 (CTest: convert timeouts to
std::chrono::duration, 2017-11-20) accidentally changed the logic used
to compute the timeout for a test when it starts. It incorrectly limits
the maximum possible timeout to 2 minutes rather than 2 minutes less
than the total allowed test time remaining. Update the new logic to
restore the original behavior.
Avoid subtracting 2 minutes from our "infinite" timeout value to avoid
creating very large timeouts that are not "infinite" and may exceed
integer type ranges.
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
66419bc0 CTest: convert timeouts to std::chrono::duration
923b8fad IWYU: Add mappings for std::enable_if on chrono durations
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1513
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit continues the refactoring of CTest to adopt std::chrono.
After the last sets of changes that introduced std::chrono::steady_clock
and std::chrono::system_clock respectively, it makes sense to have all
the timeouts be stored as std::chrono::duration.
No functional change intended.
|
| |
| |
| |
| |
| |
| |
| |
| | |
IWYU incorrectly classifies this internal STL type as not internal, and
suggests including `<type_traits>` for it. Work around the problem by
mapping the offending names to a file that we always include.
See include-what-you-use issue 434.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the refactor to make CTest use std::chrono::steady_clock for the
keeping of time for test duration, there are still references to
cmSystemTools::GetTime() left.
To further adopt std::chrono for time related activities, this commit
changes those remaining references to std::chrono::system_clock::now()
calls and alters the storage from either unsigned int or double to
std::chrono::system_clock::time_point.
For ease of conversion, a converter method is added to cmXMLWriter that
converts from a std::chrono::system_clock::time_point to the number of
seconds since the UN*X epoch as that is expected behaviour. This means
no more casts as required.
Functionally should be no difference as the system_clock is implemented
in the same terms.
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was reported in issue #17345 that CTest does not use monotonic time
to report test duration. Monotonic clocks are not affected by large NTP
adjustments or things like daylight savings time.
As CMake 3.10 requires C++11, which introduced std::chrono, this commit
moves the time keeping in CTest from cmSystemTools::GetTime() to
std::chrono::steady_clock.
Fixes: #17345
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some are user facing.
Found using
codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt`
whereby the whitelist contained:
ans
dum
helpfull
emmited
emmitted
buil
iff
isnt
nto
ot
pathes
substract
te
todays
upto
whitespaces
|
|
|
|
|
|
|
| |
Fix issues diagnosed by clang-tidy by pre-allocating the vector capacity
before the loop [performance-inefficient-vector-operation].
Signed-off-by: Matthias Maennich <matthias@maennich.net>
|
|
|
|
| |
Signed-off-by: Matthias Maennich <matthias@maennich.net>
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
062776e7 CTest: pass std::string to cmCTestCoverageHandler::ShouldIDoCoverage()
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1290
|
| |
| |
| |
| | |
Avoid needless conversion back and forth.
|
|\ \
| |/
|/|
| |
| |
| |
| | |
6db63012 CTest: fix crash if source file for coverage cannot be found
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1289
|
| |
| |
| |
| |
| |
| | |
The opened XML elements were not closed, so an assert was triggered when the
file was finally closed. If CMake is built with assertions disabled then an
invalid XML file will be produced.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
5db3aac1 Meta: replace empty-string assignments with `clear()`.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1276
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
67529aab Doc: document that CoverageExtraFlags will come first
69fac3c3 pass arguments as vector to cmCTest::RunCommand()
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1261
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
The only 2 callers took care to construct a properly escaped string, but not
using the documented way, and that string was passed only to be immediately
split into tokens again. Start with a vector and join it only for logging,
avoiding needless quotes during that.
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
We now require C++11 support including `override`. Drop use of
the old compatibility macro. Convert references as follows:
git grep -l CM_OVERRIDE -- '*.h' '*.hxx' '*.cxx' |
xargs sed -i 's/CM_OVERRIDE/override/g'
|
| |
| |
| |
| |
| |
| | |
Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
|
| |
| |
| |
| |
| |
| | |
This commit changes the times reported by labels and subprojects to be
weighted by the PROCESSORS property. It is reported with `sec*proc`
instead of just `sec`.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This commit splits out the reporting of labels and labels used for sub
projects. If a label is a sub project label it will not be included in
the label summary. To implement this the commit creates
PrintLabelOrSubprojectSummary which is able to do the work of both
PrintLabelSummary and PrintSubprojectSummary avoiding code duplication.
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
190e3825 Replace C-style casts
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1176
|