ctest

CMake test driver program. More information: <https://gitlab.kitware.com/cmake/community/wikis/doc/ctest/Testing-With-CTest>.

Install

All systems
curl cmd.cat/ctest.sh
Debian Debian
apt-get install cmake
Ubuntu
apt-get install cmake
Alpine
apk add cmake
Arch Arch Linux
pacman -S cmake
image/svg+xml Kali Linux
apt-get install cmake
CentOS
yum install cmake
Fedora
dnf install cmake
Windows (WSL2)
sudo apt-get update sudo apt-get install cmake
OS X
brew install cmake
Raspbian
apt-get install cmake
Docker
docker run cmd.cat/ctest ctest powered by Commando

CMake test driver program. More information: <https://gitlab.kitware.com/cmake/community/wikis/doc/ctest/Testing-With-CTest>.

  • Run all tests defined in the CMake project, executing 4 jobs at a time in parallel:
    ctest -j4 --output-on-failure
  • Show a list of available tests:
    ctest -N
  • Run a single test based on its name, or filter on a regular expression:
    ctest --output-on-failure -R '^test_name$'

© tl;dr; authors and contributors