https://public.kitware.com/Wiki/index.php?title=CTest_2.2.3_Docs&feed=atom&action=historyCTest 2.2.3 Docs - Revision history2024-03-28T11:43:17ZRevision history for this page on the wikiMediaWiki 1.38.6https://public.kitware.com/Wiki/index.php?title=CTest_2.2.3_Docs&diff=9985&oldid=prevAlex: New page: <pre> ctest version 2.2-patch 3 ------------------------------------------------------------------------------ Name ctest - Testing driver provided by CMake. --------------------------...2007-07-27T18:40:06Z<p>New page: <pre> ctest version 2.2-patch 3 ------------------------------------------------------------------------------ Name ctest - Testing driver provided by CMake. --------------------------...</p>
<p><b>New page</b></p><div><pre><br />
ctest version 2.2-patch 3<br />
------------------------------------------------------------------------------<br />
Name<br />
<br />
ctest - Testing driver provided by CMake.<br />
<br />
------------------------------------------------------------------------------<br />
Usage<br />
<br />
ctest [options]<br />
<br />
The "ctest" executable is the CMake test driver program. CMake-generated<br />
build trees created for projects that use the ENABLE_TESTING and ADD_TEST<br />
commands have testing support. This program will run the tests and report<br />
results.<br />
<br />
------------------------------------------------------------------------------<br />
Command-Line Options<br />
<br />
-C <cfg>, --build-config <cfg><br />
Choose configuration to test.<br />
<br />
Some CMake-generated build trees can have multiple build<br />
configurations in the same tree. This option can be used to specify<br />
which one should be tested. Example configurations are "Debug" and<br />
"Release".<br />
<br />
-V,--verbose<br />
Enable verbose output from tests.<br />
<br />
Test output is normally suppressed and only summary information is<br />
displayed. This option will show all test output.<br />
<br />
-VV,--extra-verbose<br />
Enable more verbose output from tests.<br />
<br />
Test output is normally suppressed and only summary information is<br />
displayed. This option will show even more test output.<br />
<br />
--debug<br />
Displaying more verbose internals of CTest.<br />
<br />
This feature will result in large number of output that is mostly<br />
useful for debugging dashboard problems.<br />
<br />
-Q,--quiet<br />
Make ctest quiet.<br />
<br />
This option will suppress all the output. The output log file will<br />
still be generated if the --output-log is specified. Options such as<br />
--verbose, --extra-verbose, and --debug are ignored if --quiet is<br />
specified.<br />
<br />
-O <file>, --output-log <file><br />
Output to log file<br />
<br />
This option tells ctest to write all its output to a log file.<br />
<br />
-N,--show-only<br />
Disable actual execution of tests.<br />
<br />
This option tells ctest to list the tests that would be run but not<br />
actually run them. Useful in conjunction with the -R and -E options.<br />
<br />
-R <regex>, --tests-regex <regex><br />
Run tests matching regular expression.<br />
<br />
This option tells ctest to run only the tests whose names match the<br />
given regular expression.<br />
<br />
-E <regex>, --exclude-regex <regex><br />
Exclude tests matching regular expression.<br />
<br />
This option tells ctest to NOT run the tests whose names match the<br />
given regular expression.<br />
<br />
-D <dashboard>, --dashboard <dashboard><br />
Execute dashboard test<br />
<br />
This option tells ctest to perform act as a Dart client and perform a<br />
dashboard test. All tests are <Mode><Test>, where Mode can be<br />
Experimental, Nightly, and Continuous, and Test can be Start, Update,<br />
Configure, Build, Test, Coverage, and Submit.<br />
<br />
-M <model>, --test-model <model><br />
Sets the model for a dashboard<br />
<br />
This option tells ctest to act as a Dart client where the TestModel<br />
can be Experimental, Nightly, and Continuous. Combining -M and -T is<br />
similar to -D<br />
<br />
-T <action>, --test-action <action><br />
Sets the dashboard action to perform<br />
<br />
This option tells ctest to act as a Dart client and perform some<br />
action such as start, build, test etc. Combining -M and -T is similar<br />
to -D<br />
<br />
-S <script>, --script <script><br />
Execute a dashboard for a configuration<br />
<br />
This option tells ctest to load in a configuration script which sets a<br />
number of parameters such as the binary and source directories. Then<br />
ctest will do what is required to create and run a dashboard. This<br />
option basically sets up a dashboard and then runs ctest -D with the<br />
appropriate options.<br />
<br />
-A <file>, --add-notes <file><br />
Add a notes file with submission<br />
<br />
This option tells ctest to include a notes file when submitting<br />
dashboard.<br />
<br />
-I [Start,End,Stride,test#,test#|Test file], --tests-information<br />
Run a specific number of tests by number.<br />
<br />
This option causes ctest to run tests starting at number Start, ending<br />
at number End, and incrementing by Stride. Any additional numbers<br />
after Stride are considered individual test numbers. Start, End,or<br />
stride can be empty. Optionally a file can be given that contains the<br />
same syntax as the command line.<br />
<br />
-U, --union<br />
Take the Union of -I and -R<br />
<br />
When both -R and -I are specified by default the intersection of tests<br />
are run. By specifying -U the union of tests is run instead.<br />
<br />
--interactive-debug-mode [0|1]<br />
Set the interactive mode to 0 or 1.<br />
<br />
This option causes ctest to run tests in either an interactive mode or<br />
a non-interactive mode. On Windows this means that in non-interactive<br />
mode, all system debug pop up windows are blocked. In dashboard mode<br />
(Experimental, Nightly, Continuous), the default is non-interactive.<br />
When just running tests not for a dashboard the default is to allow<br />
popups and interactive debugging.<br />
<br />
--build-and-test<br />
Configure, build and run a test.<br />
<br />
This option tells ctest to configure (i.e. run cmake on), build, and<br />
or execute a test. The configure and test steps are optional. The<br />
arguments to this command line are the source and binary directories.<br />
By default this will run CMake on the Source/Bin directories specified<br />
unless --build-nocmake is specified. Both --build-makeprogram and<br />
--build-generator MUST be provided to use --built-and-test. If<br />
--test-command is specified then that will be run after the build is<br />
complete. Other options that affect this mode are --build-target<br />
--build-nocmake, --build-run-dir, --build-two-config, --build-exe-dir,<br />
--build-project,--build-noclean, --build-options<br />
<br />
--build-target<br />
Specify a specific target to build.<br />
<br />
This option goes with the --build-and-test option, if left out the all<br />
target is built.<br />
<br />
--build-nocmake<br />
Run the build without running cmake first.<br />
<br />
Skip the cmake step.<br />
<br />
--build-run-dir<br />
Specify directory to run programs from.<br />
<br />
Directory where programs will be after it has been compiled.<br />
<br />
--build-two-config<br />
Run CMake twice<br />
<br />
<br />
--build-exe-dir<br />
Specify the directory for the executable.<br />
<br />
<br />
--build-generator<br />
Specify the generator to use.<br />
<br />
<br />
--build-project<br />
Specify the name of the project to build.<br />
<br />
<br />
--build-makeprogram<br />
Specify the make program to use.<br />
<br />
<br />
--build-noclean<br />
Skip the make clean step.<br />
<br />
<br />
--build-options<br />
Add extra options to the build step.<br />
<br />
This option must be the last option with the exception of<br />
--test-command<br />
<br />
--test-command<br />
The test to run with the --build-and-test option.<br />
<br />
<br />
--tomorrow-tag<br />
Nightly or experimental starts with next day tag.<br />
<br />
This is useful if the build will not finish in one day.<br />
<br />
--ctest-config<br />
The configuration file used to initialize CTest state when submitting<br />
dashboards.<br />
<br />
This option tells CTest to use different initialization file instead<br />
of DartConfiguration.tcl. This way multiple initialization files can<br />
be used for example to submit to multiple dashboards.<br />
<br />
--overwrite<br />
Overwrite CTest configuration option.<br />
<br />
By default ctest uses configuration options from configuration file.<br />
This option will overwrite the configuration option.<br />
<br />
--extra-submit <file>[;<file>]<br />
Submit extra files to the dashboard.<br />
<br />
This option will submit extra files to the dashboard.<br />
<br />
--force-new-ctest-process<br />
Run child CTest instances as new processes<br />
<br />
By default CTest will run child CTest instances within the same<br />
process. If this behavior is not desired, this argument will enforce<br />
new processes for child CTest processes.<br />
<br />
--submit-index<br />
Submit individual dashboard tests with specific index<br />
<br />
This option allows performing the same CTest action (such as test)<br />
multiple times and submit all stages to the same dashboard (Dart2<br />
required). Each execution requires different index.<br />
<br />
--copyright [file]<br />
Print the CMake copyright and exit.<br />
<br />
If a file is specified, the copyright is written into it.<br />
<br />
--help<br />
Print usage information and exit.<br />
<br />
Usage describes the basic command line interface and its options.<br />
<br />
--help-full [file]<br />
Print full help and exit.<br />
<br />
Full help displays most of the documentation provided by the UNIX man<br />
page. It is provided for use on non-UNIX platforms, but is also<br />
convenient if the man page is not installed. If a file is specified,<br />
the help is written into it.<br />
<br />
--help-html [file]<br />
Print full help in HTML format.<br />
<br />
This option is used by CMake authors to help produce web pages. If a<br />
file is specified, the help is written into it.<br />
<br />
--help-man [file]<br />
Print a UNIX man page and exit.<br />
<br />
This option is used by the cmake build to generate the UNIX man page.<br />
If a file is specified, the help is written into it.<br />
<br />
--version [file]<br />
Show program name/version banner and exit.<br />
<br />
If a file is specified, the version is written into it.<br />
<br />
------------------------------------------------------------------------------<br />
Copyright<br />
<br />
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.<br />
<br />
Redistribution and use in source and binary forms, with or without<br />
modification, are permitted provided that the following conditions are met:<br />
<br />
Redistributions of source code must retain the above copyright notice,<br />
this list of conditions and the following disclaimer.<br />
<br />
Redistributions in binary form must reproduce the above copyright<br />
notice, this list of conditions and the following disclaimer in the<br />
documentation and/or other materials provided with the distribution.<br />
<br />
The names of Kitware, Inc., the Insight Consortium, or the names of<br />
any consortium members, or of any contributors, may not be used to<br />
endorse or promote products derived from this software without<br />
specific prior written permission.<br />
<br />
Modified source versions must be plainly marked as such, and must not<br />
be misrepresented as being the original software.<br />
<br />
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''<br />
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br />
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br />
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR<br />
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL<br />
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR<br />
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER<br />
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,<br />
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE<br />
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br />
<br />
------------------------------------------------------------------------------<br />
Mailing List<br />
<br />
For help and discussion about using cmake, a mailing list is provided at<br />
cmake@www.cmake.org. Please first read the full documentation at<br />
http://www.cmake.org before posting questions to the list.<br />
<br />
</pre></div>Alex