.. cmake-manual-description: CTest Command-Line Reference
ctest(1)
********
.. contents::
Synopsis
========
.. parsed-literal::
ctest [<options>]
ctest --build-and-test <path-to-source> <path-to-build>
--build-generator <generator> [<options>...]
[--build-options <opts>...] [--test-command <command> [<args>...]]
ctest {-D <dashboard> | -M <model> -T <action> | -S <script> | -SP <script>}
[-- <dashboard-options>...]
Description
===========
The **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.
.. _`CTest Options`:
Options
=======
``--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.
``--list-presets``
Lists the available test presets. The current working directory must contain
CMake preset files.
``-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``.
``--progress``
Enable short progress output from tests.
When the output of **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`.
``-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.
``-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.
``--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.
``--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
``--stop-on-failure``
Stop running the tests when the first failure happens.
``-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.
``-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`_.
``--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 ``ctest`` is run as a `Dashboard Client`_ this sets the
``ResourceSpecFile`` option of the `CTest Test Step`_.
``--test-load <level>``
While running tests in parallel (e.g. with ``-j``), try not to start
tests when they may cause the CPU load to pass above a given threshold.
When ``ctest`` is run as a `Dashboard Client`_ this sets the
``TestLoad`` option of the `CTest Test Step`_.
``-Q,--quiet``
Make CTest quiet.
This option will suppress all the output. The output log file will
still be generated if the ``--output-log`` is specified. Options such
as ``--verbose``, ``--extra-verbose``, and ``--debug`` are ignored
if ``--quiet`` is specified.
``-O <file>, --output-log <file>``
Output to log file.
This option tells CTest to write all its output to a ``<file>`` log file.
``--output-junit <file>``
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
``-S`` option to run a dashboard script, use the ``OUTPUT_JUNIT`` keyword
with the :command:`ctest_test` command instead.
``-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 ``-R`` and ``-E``
options.
``<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`_.
``-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`_.
``-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.
``-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.
``-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`_.
``-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.
``-FS <regex>, --fixture-exclude-setup <regex>``
Same as ``-FA`` except only matching setup tests are excluded.
``-FC <regex>, --fixture-exclude-cleanup <regex>``
Same as ``-FA`` except only matching cleanup tests are excluded.
``-D <dashboard>, --dashboard <dashboard>``
Execute dashboard test.
This option tells CTest to act as a CDash client and perform a
dashboard test. All tests are ``<Mode><Test>``, where ``<Mode>`` can be
``Experimental``, ``Nightly``, and ``Continuous``, and ``<Test>`` can be
``Start``, ``Update``, ``Configure``, ``Build``, ``Test``,
``Coverage``, and ``Submit``.
See `Dashboard Client`_.
``-D <var>:<type>=<value>``
Define a variable for script mode.
没有合适的资源?快使用搜索试试~ 我知道了~
cmake安装包 3.23版本
共2000个文件
txt:1898个
html:1853个
rst:1833个
需积分: 0 11 下载量 161 浏览量
2023-02-26
00:49:25
上传
评论
收藏 37.26MB ZIP 举报
温馨提示
CMake 可以编译源代码、制作程序库、产生适配器(wrapper)、还可以用任意的顺序建构执行档。CMake 支持 in-place 建构(二进档和源代码在同一个目录树中)和 out-of-place 建构(二进档在别的目录里),因此可以很容易从同一个源代码目录树中建构出多个二进档。CMake 也支持静态与动态程式库的建构。 在Windows系统搭建C/C++开发环境是必不可少的
资源推荐
资源详情
资源评论
收起资源包目录
cmake安装包 3.23版本 (2000个子文件)
test_mpi.c 958B
CMakeCCompilerABI.c 538B
CheckFunctionExists.c 461B
CheckVariableExists.c 406B
libver_mpi.c 377B
CheckForPthreads.c 288B
CMakeTestGNU.c 278B
main.c 261B
VerifyC.c 70B
main.c 49B
foo.c 33B
my_module_.c 29B
MY_MODULE.c 28B
mymodule_.c 28B
MYMODULE.c 27B
CMakeCXXCompilerABI.cpp 406B
main.cpp 49B
foo.cpp 33B
basic.css 13KB
classic.css 4KB
pygments.css 3KB
cmake.css 681B
default.css 28B
cmCPluginAPI.h 12KB
CMakeCompilerABI.h 2KB
genindex.html 2.34MB
ctest.1.html 194KB
cmake-buildsystem.7.html 161KB
cmake-file-api.7.html 152KB
cmake-generator-expressions.7.html 151KB
file.html 126KB
install.html 125KB
ExternalProject.html 116KB
cmake.1.html 110KB
index.html 109KB
cmake-variables.7.html 101KB
cmake-presets.7.html 93KB
rpm.html 91KB
cmake-toolchains.7.html 89KB
cmake-packages.7.html 85KB
3.0.html 83KB
3.8.html 81KB
FetchContent.html 79KB
find_package.html 79KB
3.14.html 77KB
cmake-properties.7.html 76KB
3.19.html 74KB
index.html 74KB
cmake_path.html 71KB
3.1.html 71KB
deb.html 67KB
cmake-language.7.html 66KB
3.15.html 66KB
3.17.html 65KB
3.18.html 64KB
string.html 64KB
3.9.html 64KB
3.20.html 63KB
3.21.html 62KB
3.16.html 61KB
3.11.html 60KB
3.7.html 59KB
add_custom_command.html 58KB
CPack.html 57KB
target_link_libraries.html 57KB
3.6.html 56KB
3.12.html 56KB
FindCUDA.html 56KB
3.4.html 53KB
3.23.html 52KB
cmake-developer.7.html 50KB
UseJava.html 50KB
ifw.html 49KB
3.3.html 49KB
3.10.html 48KB
cmake-qt.7.html 48KB
3.13.html 47KB
FindMatlab.html 46KB
WriteCompilerDetectionHeader.html 45KB
FindPython.html 45KB
FindPython3.html 45KB
3.2.html 44KB
cmake-policies.7.html 44KB
UseSWIG.html 44KB
add_library.html 42KB
cmake-compile-features.7.html 41KB
try_compile.html 40KB
FindBoost.html 39KB
FindPython2.html 39KB
ExternalData.html 39KB
find_library.html 39KB
if.html 38KB
cmake-modules.7.html 38KB
FeatureSummary.html 36KB
external.html 36KB
list.html 36KB
AUTOMOC.html 36KB
FindCUDAToolkit.html 35KB
FindDoxygen.html 34KB
3.5.html 33KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
upupday
- 粉丝: 772
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- fortran教程:Fortran 语言教程,详细地介绍了Fortran语言
- 集监控点监控、日志监控、数据可视化及监控告警为一体的分布式开源监控系统 支持插件功能, 监控插件无需开发,支持多种告警方式
- java代码:java工具类-javaUtils多种工具类-正则工具-base64工具等
- 简单详细介绍了python爬虫基础.docx
- 详细介绍啦智能车图像处理去畸变教程.docx
- fortran代码:数值算法-人工智能算法-完整代码
- centos7中java8+mysql80+hadoop3.2.4集群+hive3.1.2从0开始搭建(仅供参考)
- 非常详细描述了大创项目进行流程.docx
- matlab代码:红尾鹰优化算法 Red‑tailed hawk algorithm RTH算法
- Unity游戏源码3D马里奥工程文件
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功