.. cmake-manual-description: CTest Command-Line Reference
ctest(1)
********
.. contents::
Synopsis
========
.. parsed-literal::
`Run Tests`_
ctest [<options>]
`Build and Test Mode`_
ctest --build-and-test <path-to-source> <path-to-build>
--build-generator <generator> [<options>...]
[--build-options <opts>...]
[--test-command <command> [<args>...]]
`Dashboard Client`_
ctest -D <dashboard> [-- <dashboard-options>...]
ctest -M <model> -T <action> [-- <dashboard-options>...]
ctest -S <script> [-- <dashboard-options>...]
ctest -SP <script> [-- <dashboard-options>...]
`View Help`_
ctest --help[-<topic>]
Description
===========
The :program:`ctest` executable is the CMake test driver program.
CMake-generated build trees created for projects that use the
:command:`enable_testing` and :command:`add_test` commands have testing support.
This program will run the tests and report results.
.. _`Run Tests`:
Run Tests
=========
.. program:: ctest
.. option:: --preset <preset>, --preset=<preset>
Use a test preset to specify test options. The project binary directory
is inferred from the ``configurePreset`` key. The current working directory
must contain CMake preset files.
See :manual:`preset <cmake-presets(7)>` for more details.
.. option:: --list-presets
Lists the available test presets. The current working directory must contain
CMake preset files.
.. option:: -C <cfg>, --build-config <cfg>
Choose configuration to test.
Some CMake-generated build trees can have multiple build
configurations in the same tree. This option can be used to specify
which one should be tested. Example configurations are ``Debug`` and
``Release``.
.. option:: --progress
Enable short progress output from tests.
When the output of :program:`ctest` is being sent directly to a terminal, the
progress through the set of tests is reported by updating the same line
rather than printing start and end messages for each test on new lines.
This can significantly reduce the verbosity of the test output.
Test completion messages are still output on their own line for failed
tests and the final test summary will also still be logged.
This option can also be enabled by setting the environment variable
:envvar:`CTEST_PROGRESS_OUTPUT`.
.. option:: -V, --verbose
Enable verbose output from tests.
Test output is normally suppressed and only summary information is
displayed. This option will show all test output.
.. option:: -VV, --extra-verbose
Enable more verbose output from tests.
Test output is normally suppressed and only summary information is
displayed. This option will show even more test output.
.. option:: --debug
Displaying more verbose internals of CTest.
This feature will result in a large number of output that is mostly
useful for debugging dashboard problems.
.. option:: --output-on-failure
Output anything outputted by the test program if the test should fail.
This option can also be enabled by setting the
:envvar:`CTEST_OUTPUT_ON_FAILURE` environment variable
.. option:: --stop-on-failure
Stop running the tests when the first failure happens.
.. option:: -F
Enable failover.
This option allows CTest to resume a test set execution that was
previously interrupted. If no interruption occurred, the ``-F`` option
will have no effect.
.. option:: -j <jobs>, --parallel <jobs>
Run the tests in parallel using the given number of jobs.
This option tells CTest to run the tests in parallel using given
number of jobs. This option can also be set by setting the
:envvar:`CTEST_PARALLEL_LEVEL` environment variable.
This option can be used with the :prop_test:`PROCESSORS` test property.
See `Label and Subproject Summary`_.
.. option:: --resource-spec-file <file>
Run CTest with :ref:`resource allocation <ctest-resource-allocation>` enabled,
using the
:ref:`resource specification file <ctest-resource-specification-file>`
specified in ``<file>``.
When :program:`ctest` is run as a `Dashboard Client`_ this sets the
``ResourceSpecFile`` option of the `CTest Test Step`_.
.. option:: --test-load <level>
While running tests in parallel (e.g. with :option:`-j <ctest -j>`), try
not to start tests when they may cause the CPU load to pass above a given
threshold.
When :program:`ctest` is run as a `Dashboard Client`_ this sets the
``TestLoad`` option of the `CTest Test Step`_.
.. option:: -Q, --quiet
Make CTest quiet.
This option will suppress all the output. The output log file will
still be generated if the :option:`--output-log <ctest --output-log>` is
specified. Options such as :option:`--verbose <ctest --verbose>`,
:option:`--extra-verbose <ctest --extra-verbose>`, and
:option:`--debug <ctest --debug>` are ignored
if ``--quiet`` is specified.
.. option:: -O <file>, --output-log <file>
Output to log file.
This option tells CTest to write all its output to a ``<file>`` log file.
.. option:: --output-junit <file>
.. versionadded:: 3.21
Write test results in JUnit format.
This option tells CTest to write test results to ``<file>`` in JUnit XML
format. If ``<file>`` already exists, it will be overwritten. If using the
:option:`-S <ctest -S>` option to run a dashboard script, use the
``OUTPUT_JUNIT`` keyword with the :command:`ctest_test` command instead.
.. option:: -N, --show-only[=<format>]
Disable actual execution of tests.
This option tells CTest to list the tests that would be run but not
actually run them. Useful in conjunction with the :option:`-R <ctest -R>`
and :option:`-E <ctest -E>` options.
.. versionadded:: 3.14
The ``--show-only`` option accepts a ``<format>`` value.
``<format>`` can be one of the following values.
``human``
Human-friendly output. This is not guaranteed to be stable.
This is the default.
``json-v1``
Dump the test information in JSON format.
See `Show as JSON Object Model`_.
.. option:: -L <regex>, --label-regex <regex>
Run tests with labels matching regular expression as described under
:ref:`string(REGEX) <Regex Specification>`.
This option tells CTest to run only the tests whose labels match the
given regular expression. When more than one ``-L`` option is given,
a test will only be run if each regular expression matches at least one
of the test's labels (i.e. the multiple ``-L`` labels form an ``AND``
relationship). See `Label Matching`_.
.. option:: -R <regex>, --tests-regex <regex>
Run tests matching regular expression.
This option tells CTest to run only the tests whose names match the
given regular expression.
.. option:: -E <regex>, --exclude-regex <regex>
Exclude tests matching regular expression.
This option tells CTest to NOT run the tests whose names match the
given regular expression.
.. option:: -LE <regex>, --label-exclude <regex>
Exclude tests with labels matching regular expression.
This option tells CTest to NOT run the tests whose labels match the
given regular expression. When more than one ``-LE`` option is given,
a test will only be excluded if each regular expression matches at least one
of the test's labels (i.e. the multiple ``-LE`` labels form an ``AND``
relationship). See `Label Matching`_.
.. option:: -FA <regex>, --fixture-exclude-any <regex>
Exclude fixtures matching ``<regex>`` from automatically adding any tests to
the test set.
If a test in the set of tests to be executed requires a particular fixture,
that fixture's setup and cleanup tests would normally be added to the test set
automatically. This option prevents adding setup or cleanup tests for fixtures
matching the ``<regex>``. Note that all other fixture behavior is retained,
including test dependencies and skipping tests that have fixture setup tests
that fail.
.. option:: -FS <regex>, --fixture-exclude-setup <regex>
Same as :option:`-FA <ctest -FA>` except only matching setup tests are
excluded.
.. option:
没有合适的资源?快使用搜索试试~ 我知道了~
cmake-3.26.6-windows-x86_64.zip
共2000个文件
txt:1194个
html:806个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 164 浏览量
2024-08-02
08:02:35
上传
评论
收藏 39.99MB ZIP 举报
温馨提示
cmake-3.26.6-windows-x86_64.zip
资源推荐
资源详情
资源评论
收起资源包目录
cmake-3.26.6-windows-x86_64.zip (2000个子文件)
genindex.html 2.68MB
ctest.1.html 231KB
cmake-generator-expressions.7.html 230KB
cmake-file-api.7.html 175KB
cmake.1.html 171KB
cmake-buildsystem.7.html 161KB
cmake-presets.7.html 122KB
rpm.html 114KB
index.html 111KB
cmake-variables.7.html 106KB
cmake-toolchains.7.html 93KB
cmake-packages.7.html 85KB
cmake-properties.7.html 80KB
index.html 77KB
deb.html 76KB
cmake-language.7.html 68KB
cmake-developer.7.html 61KB
index.html 55KB
ifw.html 52KB
cmake-policies.7.html 48KB
cmake-qt.7.html 48KB
cmake-compile-features.7.html 46KB
A Basic Starting Point.html 45KB
ccmake.1.html 44KB
Adding a Library.html 43KB
cpack.1.html 39KB
cmake-modules.7.html 38KB
nuget.html 38KB
CMAKE_LINK_LIBRARY_USING_FEATURE.html 37KB
CMAKE_LANG_LINK_LIBRARY_USING_FEATURE.html 37KB
external.html 36KB
cmake-configure-log.7.html 36KB
Adding Generator Expressions.html 34KB
Installing and Testing.html 34KB
Selecting Static or Shared Libraries.html 32KB
productbuild.html 32KB
wix.html 28KB
cmake-gui.1.html 28KB
nsis.html 27KB
Adding Export Configuration.html 25KB
dmg.html 22KB
Adding System Introspection.html 22KB
cmake-commands.7.html 22KB
freebsd.html 21KB
index.html 21KB
Adding a Custom Command and Generated File.html 21KB
CMAKE_LINK_GROUP_USING_FEATURE.html 21KB
Adding Usage Requirements for a Library.html 20KB
CMAKE_LANG_LINK_GROUP_USING_FEATURE.html 20KB
FIXTURES_REQUIRED.html 19KB
cmake-generators.7.html 16KB
archive.html 16KB
CMAKE_GENERATOR_TOOLSET.html 15KB
Adding Support for a Testing Dashboard.html 15KB
cmake-env-variables.7.html 15KB
Packaging Debug and Release.html 14KB
CMAKE_POLICY_WARNING_CMPNNNN.html 14KB
CMAKE_SYSTEM_PREFIX_PATH.html 13KB
CMAKE_LANG_COMPILER_ID.html 13KB
Packaging an Installer.html 13KB
CMAKE_MAKE_PROGRAM.html 12KB
CMAKE_SYSTEM_IGNORE_PATH.html 12KB
CMAKE_GENERATOR_INSTANCE.html 12KB
bundle.html 12KB
CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY.html 12KB
CMAKE_IGNORE_PATH.html 12KB
CMAKE_FIND_USE_PACKAGE_REGISTRY.html 12KB
CMAKE_FIND_USE_INSTALL_PREFIX.html 11KB
RESOURCE_GROUPS.html 11KB
CMAKE_INSTALL_PREFIX.html 11KB
CMAKE_MESSAGE_CONTEXT.html 11KB
CMAKE_MSVC_RUNTIME_LIBRARY.html 11KB
CTEST_COVERAGE_COMMAND.html 11KB
CPACK_CUSTOM_INSTALL_VARIABLES.html 11KB
CMAKE_MSVC_DEBUG_INFORMATION_FORMAT.html 11KB
CMAKE_WATCOM_RUNTIME_LIBRARY.html 10KB
CMAKE_FIND_USE_PACKAGE_ROOT_PATH.html 10KB
CMAKE_VERSION.html 10KB
index.html 10KB
ENVIRONMENT_MODIFICATION.html 10KB
CMAKE_SYSTEM_IGNORE_PREFIX_PATH.html 10KB
INCLUDE_DIRECTORIES.html 10KB
CMAKE_MAXIMUM_RECURSION_DEPTH.html 10KB
CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH.html 10KB
CMAKE_LANG_FLAGS.html 10KB
CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH.html 10KB
CMAKE_FIND_USE_CMAKE_SYSTEM_PATH.html 10KB
CMAKE_LANG_LINKER_WRAPPER_FLAG.html 10KB
PROJECT_IS_TOP_LEVEL.html 10KB
CMAKE_IGNORE_PREFIX_PATH.html 10KB
CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES.html 10KB
CMAKE_FIND_USE_CMAKE_PATH.html 10KB
CMAKE_TRY_COMPILE_PLATFORM_VARIABLES.html 10KB
CMAKE_EXPORT_COMPILE_COMMANDS.html 10KB
CMAKE_PROJECT_TOP_LEVEL_INCLUDES.html 10KB
CMAKE_DEFAULT_CONFIGS.html 10KB
COMPILE_DEFINITIONS.html 9KB
PROJECT-NAME_IS_TOP_LEVEL.html 9KB
CMAKE_PROJECT_HOMEPAGE_URL.html 9KB
CMAKE_PROJECT_DESCRIPTION.html 9KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
码农张三疯
- 粉丝: 1w+
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- SparkSQL进阶操作相关数据
- java制作的小游戏,作为巩固java知识之用.zip
- Java语言写的围棋小游戏 半成品A Go game written in golang(Semi-finished).zip
- 基于Java-swing的俄罗斯方块游戏:源码+答辩文档+PPT.zip
- florr map详细版
- shiahdifhiahfiqefiwhfi weifwijfiwqufiqweefijeq0jfe
- registry-2.8.3<arm/amd>二进制文件
- Kotlin接口与抽象类详解及其应用
- 51单片机加减乘除计算器系统设计(proteus8.17,keil5),复制粘贴就可以运行
- lv_0_20241114231223.mp4
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功