Usage
ctest [options]
Options
--preset <preset>, --preset=<preset>
= Read arguments from a test preset.
--presets-file <file>, --presets-file=<file>
= Load test presets from the given file.
--list-presets = List available test presets.
-C <cfg>, --build-config <cfg>
= Choose configuration to test.
--progress = Enable short progress output from tests.
-V,--verbose = Enable verbose output from tests.
-VV,--extra-verbose = Enable more verbose output from tests.
--debug = Displaying more verbose internals of CTest.
--output-on-failure = Output anything outputted by the test
program if the test should fail.
--stop-on-failure = Stop running the tests after one has failed.
--test-output-size-passed <size>
= Limit the output for passed tests to <size>
bytes
--test-output-size-failed <size>
= Limit the output for failed tests to <size>
bytes
--test-output-truncation <mode>
= Truncate 'tail' (default), 'middle' or
'head' of test output once maximum output
size is reached
-F = Enable failover.
-j [<level>], --parallel [<level>]
= Run tests in parallel, optionally limited to
a given level of parallelism.
-Q,--quiet = Make ctest quiet.
-O <file>, --output-log <file>
= Output to log file
--output-junit <file> = Output test results to JUnit XML file.
-N,--show-only[=format] = Disable actual execution of tests. The
optional 'format' defines the format of the
test information and can be 'human' for the
current text format or 'json-v1' for json
format. Defaults to 'human'.
-L <regex>, --label-regex <regex>
= Run tests with labels matching regular
expression. With multiple -L, run tests
where each regular expression matches at
least one label.
-R <regex>, --tests-regex <regex>
= Run tests matching regular expression.
-E <regex>, --exclude-regex <regex>
= Exclude tests matching regular expression.
-LE <regex>, --label-exclude <regex>
= Exclude tests with labels matching regular
expression. With multiple -LE, exclude
tests where each regular expression matches
at least one label.
-FA <regex>, --fixture-exclude-any <regex>
= Do not automatically add any tests for
fixtures matching regular expression.
-FS <regex>, --fixture-exclude-setup <regex>
= Do not automatically add setup tests for
fixtures matching regular expression.
-FC <regex>, --fixture-exclude-cleanup <regex>
= Do not automatically add cleanup tests for
fixtures matching regular expression.
-D <dashboard>, --dashboard <dashboard>
= Execute dashboard test
-D <var>:<type>=<value> = Define a variable for script mode
-M <model>, --test-model <model>
= Sets the model for a dashboard
-T <action>, --test-action <action>
= Sets the dashboard action to perform
--source-dir <path-to-source>= Specify the project source directory. When
combined with -T Configure, this allows
CTest to perform an initial configure step
for an empty binary directory.
--build-dir <path-to-build> = Alias for --test-dir. Provided as a more
intuitive name when using -T Configure to
bootstrap a build directory.
--group <group> = Specify what build group on the dashboard
you'd like to submit results to.
-S <script>, --script <script>
= Execute a dashboard for a configuration
-SP <script>, --script-new-process <script>
= Execute a dashboard for a configuration
-A <file>, --add-notes <file>= Add a notes file with submission
-I [Start,End,Stride,test#,test#|Test file], --tests-information
= Run a specific number of tests by number.
-U, --union = Take the Union of -I and -R
--rerun-failed = Run only the tests that failed previously
--tests-from-file <file> = Run the tests listed in the given file
--exclude-from-file <file> = Run tests except those listed in the given
file
--repeat until-fail:<n>, --repeat-until-fail <n>
= Require each test to run <n> times without
failing in order to pass
--repeat until-pass:<n> = Allow each test to run up to <n> times in
order to pass
--repeat after-timeout:<n> = Allow each test to run up to <n> times if it
times out
--max-width <width> = Set the max width for a test name to output
--interactive-debug-mode [0|1]
= Set the interactive mode to 0 or 1.
--resource-spec-file <file> = Set the resource spec file to use.
--no-label-summary = Disable timing summary information for
labels.
--no-subproject-summary = Disable timing summary information for
subprojects.
--test-dir <path-to-build> = Specify the directory in which to look for
tests.
--build-and-test <path-to-source> <path-to-build>
= Configure, build and run a test.
--build-target <tgt> = Specify a specific target to build.
--build-nocmake = Run the build without running cmake first.
--build-run-dir <dir> = Specify directory to run programs from.
--build-two-config = Run CMake twice
--build-exe-dir <dir> = Specify the directory for the executable.
--build-generator <generator-name>
= Specify the generator to use.
--build-generator-platform <platform-name>
= Specify the generator-specific platform.
--build-generator-toolset <toolset-name>
= Specify the generator-specific toolset.
--build-project <project-name>
= Specify the name of the project to build.
--build-makeprogram <program-name>
= Specify the make program to use.
--build-noclean = Skip the make clean step.
--build-config-sample <exe-name>
= A sample executable to use to determine the
configuration.
--build-options [<options>...]
= Add extra options to the build step.
--test-command <command> = The test to run with the --build-and-test
option.
--test-timeout <timeout> = The time limit in seconds, internal use
only.
--test-load <level> = CPU load threshold for starting new parallel
tests.
--tomorrow-tag = Nightly or experimental starts with next day
tag.
--overwrite <option-name> = Overwrite CTest configuration option.
--extra-submit <file>[;<file>]
= Submit extra files to the dashboard.
--http-header <header> = Append HTTP header when submitting
--schedule-random = Use a random order for scheduling tests
--schedule-random-seed <seed>= Override seed for random order of tests
--submit-index <index> = Submit individual dashboard tests with
specific index
--timeout <seconds> = Set the default test timeout.
--stop-time <time> = Set a time at which all tests should stop
running.
--http1.0 = Submit using HTTP 1.0.
--no-compress-output = Do not compress test output when submitting.
--print-labels = Print all available test labels.
--no-tests=<[error|ignore]> = Regard no tests found either as 'error' or
'ignore' it.
--collect-instrumentation <build>
= Manually collect instrumentation data from
the specified build directory.
-- = Forward extra arguments to test executables.
-h,-H,--help,-help,-usage,/? = Print usage information and exit.
--version[=json-v1],-version[=json-v1],/V[=json-v1],/version[=json-v1] [<file>]
= Print version number and exit.
--help <keyword> [<file>] = Print help for one keyword and exit.
--help-full [<file>] = Print all help manuals and exit.
--help-manual <man> [<file>] = Print one help manual and exit.
--help-manual-list [<file>] = List help manuals available and exit.
--help-command <cmd> [<file>]= Print help for one command and exit.
--help-command-list [<file>] = List commands with help available and exit.
--help-commands [<file>] = Print cmake-commands manual and exit.
--help-diagnostic <diag> [<file>]
= Print help for one diagnostic and exit.
--help-diagnostic-list [<file>]
= List diagnostics with help available and
exit.
--help-diagnostics [<file>] = Print cmake-diagnostics manual and exit.
--help-module <mod> [<file>] = Print help for one module and exit.
--help-module-list [<file>] = List modules with help available and exit.
--help-modules [<file>] = Print cmake-modules manual and exit.
--help-policy <cmp> [<file>] = Print help for one policy and exit.
--help-policy-list [<file>] = List policies with help available and exit.
--help-policies [<file>] = Print cmake-policies manual and exit.
--help-property <prop> [<file>]
= Print help for one property and exit.
--help-property-list [<file>]= List properties with help available and
exit.
--help-properties [<file>] = Print cmake-properties manual and exit.
--help-variable var [<file>] = Print help for one variable and exit.
--help-variable-list [<file>]= List variables with help available and exit.
--help-variables [<file>] = Print cmake-variables manual and exit.
Options (73)
| Option | Description | Source |
|---|---|---|
--preset, --preset preset | = Read arguments from a test preset. | help |
--presets-file, --presets-file file | = Load test presets from the given file. | help |
--list-presets | = List available test presets. | help |
--progress | = Enable short progress output from tests. | help |
-V, --verbose | = Enable verbose output from tests. | help |
-VV, --extra-verbose | = Enable more verbose output from tests. | help |
--debug | = Displaying more verbose internals of CTest. | help |
--output-on-failure | = Output anything outputted by the test program if the test should fail. | help |
--stop-on-failure | = Stop running the tests after one has failed. | help |
--test-output-size-passed size | = Limit the output for passed tests to <size> bytes | help |
--test-output-size-failed size | = Limit the output for failed tests to <size> bytes | help |
--test-output-truncation mode | = Truncate 'tail' (default), 'middle' or 'head' of test output once maximum output size is reached | help |
-F | = Enable failover. | help |
-Q, --quiet | = Make ctest quiet. | help |
--output-junit file | = Output test results to JUnit XML file. | help |
-N, --show-only format | = Disable actual execution of tests. | help |
-D var>:<type>=<value | = Define a variable for script mode | help |
--source-dir path-to-source | When combined with -T Configure, this allows CTest to perform an initial configure step for an empty binary directory. | help |
--build-dir path-to-build | = Alias for --test-dir. | help |
--group group | = Specify what build group on the dashboard you'd like to submit results to. | help |
-U, --union | = Take the Union of -I and -R | help |
--rerun-failed | = Run only the tests that failed previously | help |
--tests-from-file file | = Run the tests listed in the given file | help |
--exclude-from-file file | = Run tests except those listed in the given file | help |
--repeat until-pass:<n | = Allow each test to run up to <n> times in order to pass | help |
--max-width width | = Set the max width for a test name to output | help |
--interactive-debug-mode 0|1 | = Set the interactive mode to 0 or 1. | help |
--resource-spec-file file | = Set the resource spec file to use. | help |
--no-label-summary | = Disable timing summary information for labels. | help |
--no-subproject-summary | = Disable timing summary information for subprojects. | help |
--test-dir path-to-build | = Specify the directory in which to look for tests. | help |
--build-target tgt | = Specify a specific target to build. | help |
--build-nocmake | = Run the build without running cmake first. | help |
--build-run-dir dir | = Specify directory to run programs from. | help |
--build-two-config | = Run CMake twice | help |
--build-exe-dir dir | = Specify the directory for the executable. | help |
--build-generator generator-name | = Specify the generator to use. | help |
--build-generator-platform platform-name | = Specify the generator-specific platform. | help |
--build-generator-toolset toolset-name | = Specify the generator-specific toolset. | help |
--build-project project-name | = Specify the name of the project to build. | help |
--build-makeprogram program-name | = Specify the make program to use. | help |
--build-noclean | = Skip the make clean step. | help |
--build-config-sample exe-name | = A sample executable to use to determine the configuration. | help |
--build-options options>... | = Add extra options to the build step. | help |
--test-command command | = The test to run with the --build-and-test option. | help |
--test-timeout timeout | = The time limit in seconds, internal use only. | help |
--test-load level | = CPU load threshold for starting new parallel tests. | help |
--tomorrow-tag | = Nightly or experimental starts with next day tag. | help |
--overwrite option-name | = Overwrite CTest configuration option. | help |
--extra-submit file>[;<file | = Submit extra files to the dashboard. | help |
--http-header header | = Append HTTP header when submitting | help |
--schedule-random | = Use a random order for scheduling tests | help |
--submit-index index | = Submit individual dashboard tests with specific index | help |
--timeout seconds | = Set the default test timeout. | help |
--stop-time time | = Set a time at which all tests should stop running. | help |
--http1.0 | = Submit using HTTP 1.0. | help |
--no-compress-output | = Do not compress test output when submitting. | help |
--print-labels | = Print all available test labels. | help |
--no-tests error|ignore | = Regard no tests found either as 'error' or 'ignore' it. | help |
--collect-instrumentation build | = Manually collect instrumentation data from the specified build directory. | help |
--version, -version json-v1 | = Print version number and exit. | help |
--help keyword | = Print help for one keyword and exit. | help |
--help-full file | = Print all help manuals and exit. | help |
--help-manual-list file | = List help manuals available and exit. | help |
--help-commands file | = Print cmake-commands manual and exit. | help |
--help-diagnostic-list file | = List diagnostics with help available and exit. | help |
--help-diagnostics file | = Print cmake-diagnostics manual and exit. | help |
--help-module-list file | = List modules with help available and exit. | help |
--help-modules file | = Print cmake-modules manual and exit. | help |
--help-policy-list file | = List policies with help available and exit. | help |
--help-policies file | = Print cmake-policies manual and exit. | help |
--help-properties file | = Print cmake-properties manual and exit. | help |
--help-variables file | = Print cmake-variables manual and exit. | help |