https://github.com/Kitware/CMake
Revision 292ec157b67b5570d5bc2e00bba554cc157d9dae authored by Brad King on 09 September 2018, 15:11:38 UTC, committed by Brad King on 10 September 2018, 11:32:16 UTC
The `ctest --test-load` option is implemented in `StartNextTests` by not
starting any tests when the load is too high and instead sleeping and
then returning.  Prior to commit v3.11.0-rc1~117^2 (CTest: Re-implement
test process handling using libuv, 2017-12-10) our outer loop in
`RunTests` would immediately call `StartNextTests` again.  However, now
the `uv_run` loop may simply terminate if there are no tests running
because no events are left pending.

Fix this by converting the sleep in `StartNextTests` into a libuv timer
that it starts instead.  This avoids leaving `uv_run` with no pending
events.  In the case that there are other running tests this also allows
CTest to detect when they finish even if it during the wait period where
we previously slept.

This regression was not caught by the test suite because it only
verified that we do not start new tests when the load was too high and
not that we proceed to start tests when the load drops.  Revise the test
suite to cover both.

Fixes: #18338
1 parent f478fa6
History
Tip revision: 292ec157b67b5570d5bc2e00bba554cc157d9dae authored by Brad King on 09 September 2018, 15:11:38 UTC
CTest: Fix --test-load regression
Tip revision: 292ec15
File Mode Size
.github
Auxiliary
Help
Licenses
Modules
Packaging
Source
Templates
Tests
Utilities
.clang-format -rw-r--r-- 551 bytes
.clang-tidy -rw-r--r-- 969 bytes
.gitattributes -rw-r--r-- 1.1 KB
.gitignore -rw-r--r-- 101 bytes
.hooks-config -rw-r--r-- 418 bytes
CMakeCPack.cmake -rw-r--r-- 9.8 KB
CMakeCPackOptions.cmake.in -rw-r--r-- 12.4 KB
CMakeGraphVizOptions.cmake -rw-r--r-- 153 bytes
CMakeLists.txt -rw-r--r-- 30.6 KB
CMakeLogo.gif -rw-r--r-- 4.4 KB
CONTRIBUTING.rst -rw-r--r-- 2.3 KB
CTestConfig.cmake -rw-r--r-- 440 bytes
CTestCustom.cmake.in -rw-r--r-- 6.1 KB
CompileFlags.cmake -rw-r--r-- 3.6 KB
Copyright.txt -rw-r--r-- 5.0 KB
DartConfig.cmake -rw-r--r-- 374 bytes
README.rst -rw-r--r-- 3.0 KB
bootstrap -rwxr-xr-x 48.8 KB
cmake_uninstall.cmake.in -rw-r--r-- 790 bytes
configure -rwxr-xr-x 99 bytes
doxygen.config -rw-r--r-- 27.4 KB

README.rst

back to top