2025-03-14 21:59:59 -06:00
|
|
|
# ctest
|
|
|
|
|
|
|
|
|
|
> CMake test driver program.
|
|
|
|
|
> More information: <https://gitlab.kitware.com/cmake/community/wikis/doc/ctest/Testing-With-CTest>.
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
- Run all tests defined in the CMake project, executing 4 [j]obs at a time in parallel:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`ctest {{[-j|--parallel]}} {{4}} --output-on-failure`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- List available tests:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`ctest {{[-N|--show-only]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Run a single test based on its name, or filter on a regular expression:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`ctest --output-on-failure {{[-R|--tests-regex]}} '^{{test_name}}$'`
|