Run a single test based on its name, or filter on a regular expression

ctest

  • CMake test driver program.
    More information: <https://gitlab.kitware.com/cmake/community/wikis/doc/ctest/Testing-With-CTest>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

ctest --output-on-failure -R '^{{test_name}}$'

click the source code to copy install ctest on any operating system with command-not-found.com