ctest_test ---------- Perform the :ref:`CTest Test Step` as a :ref:`Dashboard Client`. :: ctest_test([BUILD ] [APPEND] [START ] [END ] [STRIDE ] [EXCLUDE ] [INCLUDE ] [EXCLUDE_LABEL ] [INCLUDE_LABEL ] [EXCLUDE_FIXTURE ] [EXCLUDE_FIXTURE_SETUP ] [EXCLUDE_FIXTURE_CLEANUP ] [PARALLEL_LEVEL ] [RESOURCE_SPEC_FILE ] [TEST_LOAD ] [SCHEDULE_RANDOM ] [STOP_TIME ] [RETURN_VALUE ] [CAPTURE_CMAKE_ERROR ] [REPEAT :] [QUIET] ) Run tests in the project build tree and store results in ``Test.xml`` for submission with the :command:`ctest_submit` command. The options are: ``BUILD `` Specify the top-level build directory. If not given, the :variable:`CTEST_BINARY_DIRECTORY` variable is used. ``APPEND`` Mark ``Test.xml`` for append to results previously submitted to a dashboard server since the last :command:`ctest_start` call. Append semantics are defined by the dashboard server in use. This does *not* cause results to be appended to a ``.xml`` file produced by a previous call to this command. ``START `` Specify the beginning of a range of test numbers. ``END `` Specify the end of a range of test numbers. ``STRIDE `` Specify the stride by which to step across a range of test numbers. ``EXCLUDE `` Specify a regular expression matching test names to exclude. ``INCLUDE `` Specify a regular expression matching test names to include. Tests not matching this expression are excluded. ``EXCLUDE_LABEL `` Specify a regular expression matching test labels to exclude. ``INCLUDE_LABEL `` Specify a regular expression matching test labels to include. Tests not matching this expression are excluded. ``EXCLUDE_FIXTURE `` 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 ````. Note that all other fixture behavior is retained, including test dependencies and skipping tests that have fixture setup tests that fail. ``EXCLUDE_FIXTURE_SETUP `` Same as ``EXCLUDE_FIXTURE`` except only matching setup tests are excluded. ``EXCLUDE_FIXTURE_CLEANUP `` Same as ``EXCLUDE_FIXTURE`` except only matching cleanup tests are excluded. ``PARALLEL_LEVEL `` Specify a positive number representing the number of tests to be run in parallel. ``RESOURCE_SPEC_FILE `` Specify a :ref:`resource specification file `. See :ref:`ctest-resource-allocation` for more information. ``TEST_LOAD `` While running tests in parallel, try not to start tests when they may cause the CPU load to pass above a given threshold. If not specified the :variable:`CTEST_TEST_LOAD` variable will be checked, and then the ``--test-load`` command-line argument to :manual:`ctest(1)`. See also the ``TestLoad`` setting in the :ref:`CTest Test Step`. ``REPEAT :`` Run tests repeatedly based on the given ```` up to ```` times. The modes are: ``UNTIL_FAIL`` Require each test to run ```` times without failing in order to pass. This is useful in finding sporadic failures in test cases. ``UNTIL_PASS`` Allow each test to run up to ```` times in order to pass. Repeats tests if they fail for any reason. This is useful in tolerating sporadic failures in test cases. ``AFTER_TIMEOUT`` Allow each test to run up to ```` times in order to pass. Repeats tests only if they timeout. This is useful in tolerating sporadic timeouts in test cases on busy machines. ``SCHEDULE_RANDOM `` Launch tests in a random order. This may be useful for detecting implicit test dependencies. ``STOP_TIME `` Specify a time of day at which the tests should all stop running. ``RETURN_VALUE `` Store in the ```` variable ``0`` if all tests passed. Store non-zero if anything went wrong. ``CAPTURE_CMAKE_ERROR `` Store in the ```` variable -1 if there are any errors running the command and prevent ctest from returning non-zero if an error occurs. ``QUIET`` Suppress any CTest-specific non-error messages that would have otherwise been printed to the console. Output from the underlying test command is not affected. Summary info detailing the percentage of passing tests is also unaffected by the ``QUIET`` option. See also the :variable:`CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE` and :variable:`CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE` variables.