How To Install Ctest In Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

How To Install Ctest In Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

ctest

CMake test driver program.

Maintainer: Debian CMake Team



Section: devel

Install ctest

  • Debian apt-get install cmake Click to copy
  • Ubuntu apt-get install cmake Click to copy
  • Alpine OS apk add cmake Click to copy
  • Arch Linux pacman -S cmake Click to copy
  • Kali Linux apt-get install cmake Click to copy
  • CentOS yum install cmake Click to copy
  • Fedora dnf install cmake Click to copy
  • Raspbian apt-get install cmake Click to copy
  • macOS brew install cmake Click 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 copy
Show a list of available tests:
ctest -NClick to copy
Run 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.