How To Install Ctest In Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?
Install ctest
-
Debian
apt-get install cmakeClick to copy -
Ubuntu
apt-get install cmakeClick to copy -
Alpine OS
apk add cmakeClick to copy -
Arch Linux
pacman -S cmakeClick to copy -
Kali Linux
apt-get install cmakeClick to copy -
CentOS
yum install cmakeClick to copy -
Fedora
dnf install cmakeClick to copy -
Raspbian
apt-get install cmakeClick to copy -
macOS
brew install cmakeClick to copy
CMake test driver program.
How to use ctest?
Below are few example commands for ctest that you can use in the terminal.
Run all tests defined in the CMake project, executing 4 jobs at a time in parallel:ctest -j4 --output-on-failureClick to copyShow a list of available tests:ctest -NClick to copyRun a single test based on its name, or filter on a regular expression:ctest --output-on-failure -R '^test_name$'Click to copy
Installing ctest command is simple. just copy one of the above commands for your operating system and paste it into terminal. This command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS operating systems. Once you run the command it will install the latest version of ctest 2026 package in your OS.




