Commit Graph

2011 Commits

Author SHA1 Message Date
John Parent c6763bb021 ctest: support a new --objects-dir argument
When shorter object directories are used, CTest needs to know where to
look for artifacts.
2025-07-28 12:01:28 -04:00
Brad King 0a385b880a Merge topic 'ctest-safe-build-id'
2aa2c9af97 ctest: Don't modify build and site names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10911
2025-07-02 08:03:33 -04:00
Brad King 363cb28cfe Merge topic 'ctest-fix-relative-paths'
f98732bea8 ctest_configure: Restore handling of relative CTEST_BINARY_DIRECTORY
5a1d5fd9be ctest_start: Restore log file location for relative CTEST_BINARY_DIRECTORY

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10912
2025-07-01 11:04:04 -04:00
Daniel Pfeifer f98732bea8 ctest_configure: Restore handling of relative CTEST_BINARY_DIRECTORY
In commit e52eada2c2 (cmCTestConfigureCommand: Refactor command line
construction, 2025-01-28, v4.0.0-rc1~60^2~2) we switched from the
`BuildDirectory` setting, which was always an absolute path, to
`CTEST_BINARY_DIRECTORY`.  Convert it to an absolute path too.

Fixes: #27026
2025-06-30 11:06:14 -04:00
Daniel Pfeifer 5a1d5fd9be ctest_start: Restore log file location for relative CTEST_BINARY_DIRECTORY
Extend commit 3c321b6571 (cmCTestStartCommand: Inline
InitializeFromCommand function, 2024-10-17, v4.0.0-rc1~605^2~6) to
initialize BinaryDir as an absolute path.

Issue: #27026
2025-06-30 11:03:53 -04:00
Daniel Pfeifer 2aa2c9af97 ctest: Don't modify build and site names
CTest currently removes non-filename characters from CTEST_SITE and
CTEST_BUILDNAME in an inconsistent way, which leads to unconnected
information on CDash.  Non-filename characters actually don't cause
any issue in CDash at all, nor are they invalid XML.  The only place
where removing them may be needed is when an actual filename is
constructed.

Remove the filtering from the SafeBuildIdField function and place
it where a filename is constructed.
2025-06-28 11:39:42 +02:00
Brad King afd6c2966e cmCTestSubmitHandler: Move internal helpers to anonymous namespace 2025-05-22 14:30:38 -04:00
Brad King 78f0b2aeed cmCTestSubmitHandler: Make internal method private 2025-05-22 14:30:38 -04:00
Brad King 2a9cfc2da3 cmCTestSubmitHandler: Remove unnecessary type alias 2025-05-22 14:30:37 -04:00
Brad King 8f698e1708 cmCTestSubmitHandler: Open log file earlier 2025-05-22 14:30:37 -04:00
Brad King 7475921ff8 cmCTestSubmitHandler: Inline and remove method called only once 2025-05-22 14:30:37 -04:00
Ben Boeckel 557c44b93e cmStrCat: use character literals where possible
Found and replaced using the `cmstrcat-to-char-literal` rule for
`ast-grep`.
2025-05-15 19:12:04 +02:00
Brad King f70aed86f1 Merge topic 'macos-curl-backend' into release-4.0
1e1129c6fe macOS: Reliably apply workaround for system curl 8.{3,4,5} LibreSSL backend

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10724
2025-04-30 09:39:48 -04:00
Brad King 5d3f931956 Merge branch 'backport-macos-curl-backend' into macos-curl-backend 2025-04-29 11:50:17 -04:00
Gregor Jasny 1e1129c6fe macOS: Reliably apply workaround for system curl 8.{3,4,5} LibreSSL backend
In commit f2596dfa0e (macOS: Work around bug in system curl 8.{3,4,5}
LibreSSL backend, 2024-07-16, v3.30.1~2^2) we tried to prefer
`secure-transport` on problematic versions of curl.  However, the
`curl_global_sslset` setting must be applied before every
`curl_global_init` call, not just the first one.  Otherwise a
second (or subsequent) download won't apply the work-around.
2025-04-29 11:49:49 -04:00
Brad King 16455374cf Source: Suppress gcc 15 -Wmaybe-uninitialized in std::function
The warning is in the `std::function` implementation.
2025-04-24 07:56:39 -04:00
Brad King b1c22bdc38 Source: Fix -Wformat warnings 2025-04-24 07:56:39 -04:00
Brad King 8a3860379d Merge topic 'normalize-input-paths'
5805461074 cmSystemTools: Simplify call to FindProgram for our own executable
db0e2574cb cmSystemTools: Restore FindProgram look-up of on-disk case on Windows
5d700abda4 Source: Simplify FindProgram calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10620
2025-04-08 10:45:46 -04:00
Brad King 5d700abda4 Source: Simplify FindProgram calls
Remove defaulted arguments.  Remove unnecessary `.c_str()`.
2025-04-07 19:55:30 -04:00
Daniel Pfeifer 46a0c04284 CTest: Allow setting exit code in ctest scripts 2025-03-20 16:31:49 +01:00
Daniel Goldberg d3455f38de ctest: Add option to specify the --schedule-random seed
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>
2025-03-18 14:17:59 -04:00
Daniel Goldberg 3dc8e59bdc ctest: Record --schedule-random seed in test log
Issue: #26760
Signed-off-by: Daniel Goldberg <daniel.goldberg@nextsilicon.com>
2025-03-18 13:45:41 -04:00
Brad King 2604f5d8b3 Merge topic 'json-errors-filename'
f134468a98 JSON: Improve JSON error message formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10463
2025-03-14 12:17:02 -04:00
Martin Duffy f134468a98 JSON: Improve JSON error message formatting
This improves the output of JSON-related error messages. It adds the filename to
the output and excludes the column number.

This is particularly useful when there are multiple JSON files being read that
could be responsible for an error, ie CMakePresets.json and
CMakeUserPresets.json, or multiple instrumentation queries.

Issue: #26717
2025-03-13 10:44:31 -04:00
Daniel Pfeifer e47dc29967 cmCTestStartCommand: Remove unnecessary code
We called `UpdateCTestConfiguration` but set an internal option
that made it a no-op.  Instead, just do not call it.
2025-03-06 09:43:22 -05:00
Kitware Robot de273b2e11 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 09:56:07 -05:00
Martin Duffy 99cd4d979b CTest: Fix startTime in test snippets when using instrumentation
Initialize SystemStartTime for TestProcess.
2025-02-24 11:50:11 -05:00
Zack Galbreath a6d4a9a2ae ctest: Include cmake instrumentation data in XML files 2025-02-15 06:25:12 -05:00
Zack Galbreath 85a63143ed instrument: don't report target=TARGET_NAME
Remove the erroneous default target name when instrumenting
custom commands.
2025-02-15 06:21:58 -05:00
Martin Duffy 9689155a05 instrumentation: Add Config value to snippet data 2025-02-09 12:29:09 -05:00
Brad King 7065e7a555 Merge topic 'instrumentation-build-hooks'
2680f30caf instrumentation: Allow multiple CALLBACK arguments
fc1d55f6a5 instrumentation: Add preBuild and postBuild hooks for ninja
f62a4ab2ee instrumentation: Refactor cmInstrumentation constructor and usage
c57d1752d4 cmUVProcessChain: Add Detached option for spawning daemons

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10230
2025-02-05 09:08:33 -05:00
Brad King 5723863444 Merge topic 'ctest-configure-refactoring'
b0e92f4a70 cmCTestConfigureCommand: Remove handler usage
c78d714ecc cmCTestConfigureCommand: Refactor command execution
e52eada2c2 cmCTestConfigureCommand: Refactor command line construction
fda055c260 cmCTestConfigureHandler: Move class into cmCTestConfigureCommand.cxx
509b2cca66 cmCTest: Extract utility functions from cmCTestGenericHandler
8d4743b9e9 cmCTestBuildHandler: Store path of temporary log file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10253
2025-02-05 09:05:23 -05:00
Brad King bc093eefab Merge topic 'ctest-subprocess'
cb5f136c66 ctest: Prevent infinite loop in ctest_run_script(NEW_PROCESS)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10286
2025-02-05 09:03:08 -05:00
Nikita Nemkin cb5f136c66 ctest: Prevent infinite loop in ctest_run_script(NEW_PROCESS)
ctest passes an internal -SR argument to inform a subprocess which
script to run. Because all arguments are propagated to the subprocess,
nested subprocess receives multiple -SR arguments and re-runs
the parent script in addition to its own, leading to a loop.

Ignore redundant -SR arguments on input and also filter out parent's
-SR argument when constructing a child process.

Fixes: #8837
2025-02-04 20:19:10 +05:00
Daniel Pfeifer b0e92f4a70 cmCTestConfigureCommand: Remove handler usage 2025-02-04 15:59:50 +01:00
Daniel Pfeifer c78d714ecc cmCTestConfigureCommand: Refactor command execution 2025-02-04 15:59:50 +01:00
Daniel Pfeifer e52eada2c2 cmCTestConfigureCommand: Refactor command line construction 2025-02-04 15:59:50 +01:00
Daniel Pfeifer fda055c260 cmCTestConfigureHandler: Move class into cmCTestConfigureCommand.cxx
Place declaration and definitions into places where following
refactoring will cause minimal deltas.
2025-02-04 15:57:39 +01:00
Daniel Pfeifer 509b2cca66 cmCTest: Extract utility functions from cmCTestGenericHandler 2025-02-04 15:57:38 +01:00
Daniel Pfeifer 8d4743b9e9 cmCTestBuildHandler: Store path of temporary log file 2025-02-04 15:57:38 +01:00
Brad King 568a9795a6 Merge topic 'ci-fedora41-dnf-cache'
f398a517be ci: Update to rebuilt Fedora base images
e9fb64f3b7 Source: Drop incorrect class documentation that had typos
2844296c7b FindMPI: Fix typo in comment
72cce810ce ci(fedora41-hip): update the image in sync w/ `fedora41`
fa08bd803d ci(fedora41): refactor tests removal from Python packages
0e5159656a ci(fedora41): split install prerequisites and build for Rust packages
88c5cf809a ci(fedora41): split install prerequisites and build RBEnv into separate phases
86e96322eb ci(fedora41): tune RVM build to speedup and minimize the final image
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10283
2025-02-04 09:00:59 -05:00
Brad King e9fb64f3b7 Source: Drop incorrect class documentation that had typos 2025-02-03 12:03:07 -05:00
Martin Duffy f62a4ab2ee instrumentation: Refactor cmInstrumentation constructor and usage
Creates a global cmInstrumentation pointer on the CMake Instance to
prevent creating multiple instrumentation objects.
2025-02-03 10:10:06 -05:00
Martin Duffy d2a3d596d6 instrumentation: Fix expected location of Labels when using CTest launchers 2025-01-30 14:07:49 -05:00
Alex Turbov d34971f455 Refactor: Eliminate redundant std::to_string as arg of cmStrCat
Plus optimize some other string operations in the modified files.
2025-01-26 04:03:38 +04:00
Kitware Robot 0b96ae1f6a Revise C++ coding style using clang-format with "east const"
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
2025-01-23 13:09:50 -05:00
Kitware Robot b2ba64add9 Revise C++ coding style using clang-format-18
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`.  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.

Fixes: #26123
2025-01-23 11:43:06 -05:00
Brad King 1d4d4362d9 Merge topic 'remove-old-compatibility'
77f71ad4e2 Remove compatibility with CMake versions older than 3.5
fb1bd1d330 CMP0065: Remove support for OLD behavior
d9dd38cccf CMP0064: Remove support for OLD behavior
d88047c329 Remove compatibility with CMake versions older than 3.3
ac1a9cb160 CMP0063: Remove support for OLD behavior
36fffb673a CMP0062: Remove support for OLD behavior
789a7d73d4 CMP0061: Remove support for OLD behavior
3dc19e24cb CMP0060: Remove support for OLD behavior
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10210
2025-01-23 09:36:59 -05:00
Brad King 789a7d73d4 CMP0061: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
Alex Turbov c3777c1536 ci: Extend spellcheck job with 'typos' tool
Unlike the `codespell`, `typos` is capable of finding typos
in combined identifiers (`CamelCase` or `snake_case`).
2025-01-22 08:51:45 -05:00