test#

Build (if needed) and run tests via ctest.

clibra test --preset debug

Requires LIBRA_TESTS to be ON in the preset’s CMake cache. clibra test first builds the all-tests target, then runs ctest. Use --no-build to skip the build step and run ctest directly against already-built test binaries.

CMake equivalent#

cmake --build --preset <n> --target all-tests
ctest --preset <n>

Flag reference#

clibra test#

Build (if needed) and run tests via ctest. Requires LIBRA_TESTS=ON in the resolved preset’s CMake cache

Usage: clibra test [OPTIONS]

Options:#

  • --type <TYPE> — Filter by test type. Defaults to no filtering

    Default value: all

    Possible values: all, unit, integration, regression

  • --filter <FILTER> — Run only tests matching this regex (ctest –tests-regex)

  • --stop-on-failure — Stop at the first test failure

  • --rerun-failed — Rerun only failed tests

  • --parallel <PARALLEL> — Run N tests in parallel. Defaults to # of logical CPUs

    Default value: 4

  • --no-build — Skip the build step; run ctest directly

  • -D <VAR=VALUE> — Forward -DVAR=VALUE to the CMake configure step when active. Ignored (with a warning) if the build directory exists and neither –reconfigure nor –fresh is given

  • -r, --reconfigure — Force the configure step even if the build directory exists

  • -f, --fresh — Reconfigure with a –fresh cmake build directory

  • -v, --verbose — Run the build and/or tests in verbose mode, printing commands