2018-11-21 18:06:48 +01:00
|
|
|
# ctest
|
|
|
|
|
|
|
|
> CMake test driver program.
|
2019-06-09 00:05:32 +01:00
|
|
|
> More information: <https://gitlab.kitware.com/cmake/community/wikis/doc/ctest/Testing-With-CTest>.
|
2018-11-21 18:06:48 +01:00
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
- Run all tests defined in the CMake project, executing 4 [j]obs at a time in parallel:
|
2018-11-21 18:06:48 +01:00
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
`ctest {{[-j|--parallel]}} {{4}} --output-on-failure`
|
2018-11-21 18:06:48 +01:00
|
|
|
|
2024-01-31 00:55:19 -03:00
|
|
|
- List available tests:
|
2018-11-21 18:06:48 +01:00
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
`ctest {{[-N|--show-only]}}`
|
2018-11-21 18:06:48 +01:00
|
|
|
|
|
|
|
- Run a single test based on its name, or filter on a regular expression:
|
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
`ctest --output-on-failure {{[-R|--tests-regex]}} '^{{test_name}}$'`
|