When `--schedule-random` is used in automated CI jobs, failures may
occur due to test order. We now log the seed. Provide a way for
developers to re-run the same order by specifying the seed.
Fixes: #26760
Co-authored-by: Brad King <brad.king@kitware.com>
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Issue: #26123
This behavior was removed when we switched to libuv in CMake 3.11.
After backporting new changes from libuv v2, we can restore the
behavior.
Fixes: #20115
Rename the current GetTestModelString to GetTestGroupString, because
that is what the function actually returns. Then add a new function
GetTestGroupString that actually returns the model.
In commit 2c2291bbe0 (ENH: add new feature to ctest so that it can
cmake, build and run a test executable, 2004-01-07, v2.4.0~3483) ctest
was taught to recognize tests that run ctest itself and run them
internally instead of spawning a new process. This optimization was
removed by commit b9daa192af (ENH: Refactored CTest test execution code
into an object, 2009-08-19, v2.8.0~276) `cmCTestRunTest` replaced
`cmCTestTestHandler::ProcessOneTest`, which was eventually removed by
commit 5a5cc52230 (Fixed conversion warning on 64 bit machines,
2009-08-31, v2.8.0~241). Since then the optimization was only left in
`--build-and-test` mode, likely by accident, where it makes little
difference. Remove it to simplify the code.
Also drop the `--force-new-ctest-process` option, originally added by
commit 9255e40d81 (ENH: Add a way to force ctest to be a new process,
2004-05-10, v2.4.0~3101), since it no longer does anything.
`cmCTest::RunTest` has been used only for `--build-and-test` mode since
commit b9daa192af (ENH: Refactored CTest test execution code into an
object, 2009-08-19, v2.8.0~276). Drop code needed only by its old role
of running tests.
774fcbe49c CTest: Base command line mode on top of scripting commands
5115c01e1f CTestCommandLine tests: Make sure to test successful run
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9881
Make sure that all CMake variables that are translated into
CTest options in `cmCTest*Command` implementations are translated
from CTest options into CMake variables before the functions are
called. This back-and-forth translation should be temporary.
It is a necessary prerequisite for refactoring `cmCTest*Handler`
implementations to operate on CMake variables directly rather
than CTest options.
Under job server integration, added by commit 80fe56c481 (ctest: Add
support for running under a make job server on POSIX systems,
2023-11-15, v3.29.0-rc1~324^2), use a very high default so that
parallelism is effectively limited only by available job server tokens.
Otherwise, choose a default limit based on the number of processors.
Also allow passing `0` to specify unbounded parallelism.
Fixes: #25739
Allow tests to specify files to upload at runtime. Previously this was
only possible to specify at configure time with the ATTACHED_FILES
test properties.
This commit also fixes a bug in how our test data tarballs were generated
by CTest. Previously, if you tried to attach a file outside of the binary
directory, CTest would generate a tar file with a relative path, and tar
would not allow you to extract it. We resolve this problem by creating
tar files with a flat directory structure instead.
Fixes: #22284