.. cmake-manual-description: CTest Command-Line Reference
ctest(1)
********
.. contents::
Synopsis
========
.. parsed-literal::
ctest [<options>]
ctest <path-to-source> <path-to-build> --build-generator <generator>
[<options>...] [-- <build-options>...] [--test-command <test>]
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
ENABLE_TESTING and ADD_TEST commands have testing support. This
program will run the tests and report results.
Options
=======
``-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".
``-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 environment variable
``CTEST_OUTPUT_ON_FAILURE``.
``-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
environment variable ``CTEST_PARALLEL_LEVEL``.
This option can be used with the :prop_test:`PROCESSORS` test property.
See `Label and Subproject Summary`_.
``--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 log file.
``-N,--show-only``
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.
``-L <regex>, --label-regex <regex>``
Run tests with labels matching regular expression.
This option tells CTest to run only the tests whose labels match the
given regular expression.
``-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.
``-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.
Pass in variable values on the command line. Use in conjunction
with ``-S`` to pass variable values to a dashboard script. Parsing ``-D``
arguments as variable values is only attempted if the value
following ``-D`` does not match any of the known dashboard types.
``-M <model>, --test-model <model>``
Sets the model for a dashboard.
This option tells CTest to act as a CDash client where the ``<model>``
can be ``Experimental``, ``Nightly``, and ``Continuous``.
Combining ``-M`` and ``-T`` is similar to ``-D``.
See `Dashboard Client`_.
``-T <action>, --test-action <action>``
Sets the dashboard action to perform.
This option tells CTest to act as a CDash client and perform some
action such as ``start``, ``build``, ``test`` etc. See
`Dashboard Client Steps`_ for the full list of actions.
Combining ``-M`` and ``-T`` is similar to ``-D``.
See `Dashboard Client`_.
``-S <script>, --script <script>``
Execute a dashboard for a configuration.
This option tells CTest to load in a configuration script which sets
a number of parameters such as the binary and source directories.
Then CTest will do what is required to create and run a dashboard.
This option basically sets up a dashboard and then runs ``ctest -D``
with the appropriate options.
See `Dashboard Client`_.
``-SP <script>, --script-new-process <script>``
Execute a dashboard for a configuration.
This option does the same operations as ``-S`` but it will do them in a
separate process. This is primarily useful in cases where the
script may modify the environment and you do not want the modified
environment to impact other ``-S`` scripts.
See `Dashboard Client`_.
``-I [Start,End,Stride,test#,test#|Test file], --tests-information``
Run a specific number of tests by number.
This option causes CTest to run tests starting at number Start,
ending at number End, and incrementing by Stride. Any additional
numbers after Stride are considered individual test numbers. Start,
End,or stride can be empty. Optionally a file can be given that
contains the same syntax as the command line.
``-U, --union``
Take the Union of ``-I`` and ``-R``.
When both ``-R`` and ``-I`` are specified by default the intersection of
tests are run. By specifying ``-U`` the union of tests is run instead.
``--rerun-failed``
Run only the tests that failed previously.
This option tells CTest to perform only the tests that failed during
its previous run. When this option is specified, CTest ignores all
other options intended to modify the list of tests to run (``-L``, ``-R``,
``-E``, ``-LE``, ``-I``, etc). In the event that CTest runs and no tests
fail, subsequent calls to CTest with the ``--rerun-failed`` option will run
the set of tests that most recently failed (if any).
``--repeat-until-fail <n>``
Require each test to run ``<n>`` times without failing in order to pass.
This is useful in finding sporadic fail
没有合适的资源?快使用搜索试试~ 我知道了~
cmake-3.11.0-rc4-win32-x86
共5159个文件
txt:1417个
html:1386个
rst:1383个
5星 · 超过95%的资源 需积分: 9 9 下载量 134 浏览量
2018-04-30
23:26:39
上传
评论
收藏 16.84MB RAR 举报
温馨提示
CMake是一个工程文件生成工具。用户可以使用预定义好的CMake脚本,根据自己的选择(像是Visual Studio, Code::Blocks, Eclipse)生成不同IDE的工程文件
资源推荐
资源详情
资源评论
收起资源包目录
cmake-3.11.0-rc4-win32-x86 (5159个子文件)
ctest.1 49KB
cmake.1 24KB
ccmake.1 11KB
cpack.1 9KB
cmake-gui.1 7KB
cmake-modules.7 631KB
cmake-commands.7 278KB
cmake-properties.7 207KB
cmake-variables.7 166KB
cmake-policies.7 101KB
cmake-buildsystem.7 39KB
cmake-developer.7 35KB
cmake-packages.7 28KB
cmake-server.7 24KB
cmake-toolchains.7 20KB
cmake-language.7 19KB
cmake-generators.7 18KB
cmake-generator-expressions.7 14KB
cmake-compile-features.7 14KB
cmake-qt.7 10KB
cmake-env-variables.7 9KB
Squish4RunTestCase.bat 653B
SquishRunTestCase.bat 219B
test_mpi.c 872B
CheckFunctionExists.c 449B
CMakeCCompilerABI.c 435B
CheckVariableExists.c 398B
libver_mpi.c 360B
CheckForPthreads.c 288B
main.c 261B
CMakeTestGNU.c 184B
VerifyC.c 70B
main.c 49B
foo.c 33B
my_module_.c 29B
mymodule_.c 28B
MY_MODULE.c 28B
MYMODULE.c 27B
ExternalProject.cmake 118KB
CPackRPM.cmake 110KB
FindBoost.cmake 92KB
FindMPI.cmake 86KB
FindCUDA.cmake 86KB
FindQt4.cmake 54KB
UseJava.cmake 53KB
FindMatlab.cmake 50KB
ExternalData.cmake 43KB
CPackDeb.cmake 43KB
BundleUtilities.cmake 41KB
FindwxWidgets.cmake 41KB
FindDoxygen.cmake 39KB
FindHDF5.cmake 39KB
FetchContent.cmake 38KB
FindGTK2.cmake 37KB
CPackIFW.cmake 36KB
GetPrerequisites.cmake 34KB
CMakeDetermineCompilerId.cmake 33KB
InstallRequiredSystemLibraries.cmake 29KB
FeatureSummary.cmake 29KB
CPack.cmake 27KB
FindPkgConfig.cmake 26KB
WriteCompilerDetectionHeader.cmake 25KB
FindwxWindows.cmake 25KB
FindIce.cmake 24KB
CPackComponent.cmake 21KB
FindOpenMP.cmake 21KB
FindProtobuf.cmake 20KB
FindBLAS.cmake 20KB
FindX11.cmake 20KB
FindOpenGL.cmake 20KB
Qt4Macros.cmake 18KB
GoogleTest.cmake 18KB
UseSWIG.cmake 15KB
FindICU.cmake 15KB
DeployQt4.cmake 15KB
FindPackageHandleStandardArgs.cmake 15KB
GNUInstallDirs.cmake 15KB
FindOpenSSL.cmake 15KB
Android-Determine.cmake 15KB
GenerateExportHeader.cmake 14KB
FortranCInterface.cmake 14KB
Windows-MSVC.cmake 14KB
FindSDL_sound.cmake 13KB
FindPythonLibs.cmake 13KB
CMakePackageConfigHelpers.cmake 13KB
KDE3Macros.cmake 13KB
Determine-Compiler-NDK.cmake 12KB
FindJNI.cmake 12KB
run_nvcc.cmake 12KB
CMakeDetermineFortranCompiler.cmake 12KB
FindImageMagick.cmake 12KB
FindRuby.cmake 11KB
FindJava.cmake 11KB
CSharpUtilities.cmake 11KB
FindFLTK.cmake 11KB
FindDCMTK.cmake 11KB
FindKDE3.cmake 10KB
FindLAPACK.cmake 10KB
CTestCoverageCollectGCOV.cmake 10KB
CPackWIX.cmake 10KB
共 5159 条
- 1
- 2
- 3
- 4
- 5
- 6
- 52
资源评论
- wtoufo0002019-07-30免费资源,不错。谢谢
- misterc2019-12-31感谢楼主的免费资源!!
赤豆糊_siki
- 粉丝: 27
- 资源: 28
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功