summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CTestCommandLine
Commit message (Collapse)AuthorAgeFilesLines
* Tests/RunCMake: Update cmake_minimum_required versionsBrad King2023-02-112-2/+2
| | | | | | | | For policy-specific tests, use the version before the policy was introduced. Otherwise, use 3.5 where possible. Also, remove `cmake_minimum_required()` and `project()` calls from individual cases where they are handled by `CMakeLists.txt`.
* ctest(1): Add CTEST_NO_TESTS_ACTION env varfriendlyanon2023-01-138-0/+15
| | | | | This environment variable provides a default value for the --no-tests=<action> command line argument.
* Tests: Factor out RunCMake ctest environment isolationBrad King2022-11-141-3/+0
| | | | | | | | Some RunCMake tests unset some environment variables that affect ctest's behavior before running it. Any test using the RunCTest helper needs to do this, so do it in the helper itself. Issue: #24153
* Tests: Add cases covering bad ctest output truncation typesBrad King2022-09-073-0/+3
| | | | Issue: #23869
* RunCMakeTest: fix Truncation test definitionFrank Winklmeier2022-09-057-1/+6
| | | | | | | | | | The `ctest_test` and `CTestCommandLine` truncation tests had multiple problems: - escape expected result string to avoid regex matching - specify the truncation size - pass the truncation mode correctly into the test definition - use unique test names Issue: #23868
* CMake: Use FindPython instead of FindPythonInterp to build CMake itselfKyle Edwards2022-04-211-2/+2
| | | | Fixes: #23444
* Tests: Fix CMake syntax warning in RunCMake.CTestCommandLineBrad King2022-03-101-1/+1
| | | | | Fix a regex added in the test by commit 140704d443 (ctest: add option for output truncation, 2022-03-07).
* ctest: add option for output truncationFrank Winklmeier2022-03-083-0/+34
| | | | | | | | | | Add `--test-output-truncation` to `ctest`. This option can be used to customize which part of the test output is being truncated. Currently supported values are `tail`, `middle` and `head`. Also add equivalent `CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION` variable. Fixes: #23206
* Tests: Add case covering both ctest subdirectory commandsBrad King2021-12-082-0/+40
| | | | | CTest re-implements the `subdirs` and `add_subdirectory` commands. Verify that they both work.
* CTest: Exit coverage handling early if no binary dirJoseph Snyder2021-06-022-0/+7
| | | | | | | | Check for the existence of the Binary directory string before checking for coverage files. If the directory is not specified, write an error message and do not do any checking. Fixes: #22102
* ctest: Add support for writing test results in JUnit XML formatZack Galbreath2021-04-264-0/+57
| | | | Addresses #18654
* ctest: Display test "WAITING" messages only in extra-verbose modeBrad King2021-04-064-7/+46
| | | | | These messages are incidental scheduling output. Avoid cluttering the normal verbose output showing tests starting and finishing.
* Ctest: Support build tree on command lineAsit Dhal2020-12-176-0/+22
| | | | Fixes: #21268
* ctest: Provide hints about inspecting test failuresAsit Dhal2020-12-012-2/+6
| | | | Fixes: #20955
* CTest: exit nonzero after message(SEND_ERROR|FATAL_ERROR)Kevin Puetz2020-08-263-1/+3
| | | | Fixes: #21004
* Merge topic 'ctest_stop_on_failure_16628'Brad King2020-04-224-0/+26
|\ | | | | | | | | | | | | e89aeba5c4 ctest: add option --stop-on-failure Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4630
| * ctest: add option --stop-on-failureJohnny Jazeix2020-04-204-0/+26
| | | | | | | | | | | | To stop the tests once one has failed Fixes: #16628
* | CTest: Fix '-T MemCheck' command-line support for sanitizersBrad King2020-04-172-0/+28
|/ | | | | | | | | | | In commit 49948f7221 (ctest_memcheck: Add support for ThreadSanitizer, 2014-07-07, v3.1.0-rc1~322^2~1) and commit 1e005eadbc (CTest: Fix MemoryCheckType from 'ctest -T MemCheck', 2014-07-15, v3.1.0-rc1~298^2), the `CMakeCommand` internal setting was left set only when using `ctest -S` scripts. Instead simply use CTest's corresponding CMake directly without passing it through an internal setting. Fixes: #20584
* Add --no-tests=<[error|ignore]> option to CTestStefan Dinkelacker2020-01-3110-0/+38
| | | | | | | | | If no tests were found, the default behavior of CTest is to always log an error message but to return an error code in script mode only. This option unifies the behavior of CTest by either returning an error code if no tests were found or by ignoring it. Signed-off-by: Stefan Dinkelacker <s.dinkelacker@dkfz-heidelberg.de>
* ctest: Populate CTEST_CONFIGURATION_TYPE from the -C command line when setJulien Jomier2019-12-094-0/+30
|
* CTest: Consolidate '--repeat-* n' options as `--repeat *:n`Brad King2019-11-1522-40/+28
| | | | | | | Combine `--repeat-until-fail`, `--repeat-until-pass`, and `--repeat-after-timeout` to create a single `--repeat <mode>:<n>` option. Retain `--repeat-until-fail` too because that has been available in previous releases.
* Merge branch 'backport-ctest-resource-groups'Brad King2019-11-052-4/+4
|\
| * CTest: Rename PROCESSES test property to RESOURCE_GROUPSBrad King2019-11-052-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | The `PROCESSES` test property name added for CMake 3.16 is too close to the existing `PROCESSORS` test property. Furthermore, the property in principle specifies groups of resources organized in a way that is meaningful to a particular test. The groups may often correspond to processes but they could have other meanings. Since the property name `PROCESSES` has not been in a final 3.16 release yet, simply rename it to `RESOURCE_GROUPS`. Fixes: #19914
* | Tests: Extend RunCMake.CTestCommandLine internal timeout for valgrindBrad King2019-11-041-1/+1
| | | | | | | | | | | | A case added by commit 39ac8b4eb5 (ctest: Add --repeat-after-timeout option, 2019-10-29) includes a success-case timeout of 2 seconds. That is too short when running under valgrind, so extend it to 5 seconds.
* | ctest: Add --repeat-after-timeout optionBrad King2019-10-2911-0/+75
| | | | | | | | | | Add an option to re-run tests if they timeout. This will help tolerate sporadic timeouts on busy machines.
* | ctest: Add --repeat-until-pass optionBrad King2019-10-2913-4/+81
|/ | | | | | | | | Add an option to re-run tests if they fail. This will help tolerate sporadic failures. Issue: #17010 Co-Author: Ben Boeckel <ben.boeckel@kitware.com> Co-Author: Chuck Atkins <chuck.atkins@kitware.com>
* CTest: Add Json output for PROCESSES propertyKyle Edwards2019-10-022-4/+62
|
* Merge topic 'ctest-json-REQUIRED_FILES'Brad King2019-08-232-4/+18
|\ | | | | | | | | | | | | 5778880d20 CTest: Fix --show-only=json-v1 output with REQUIRED_FILES property Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3719
| * CTest: Fix --show-only=json-v1 output with REQUIRED_FILES propertyBrad King2019-08-222-4/+18
| | | | | | | | Fixes: #19629
* | Tests: Create test for SKIP_REGULAR_EXPRESSION test propertyGabor Bencze2019-07-182-0/+27
| |
* | CTest: Clean up stdout and logfile output for Pass/Fail regexStephen Manz2019-07-094-0/+84
|/ | | | | | | | | | For pass regex, display only the element that was found, rather than all elements Rename loop variable for fail regex, from pass to fail For consistency, add space in output for pass Add tests that find and don't find PASS_REGULAR_EXPRESSION, and a test that finds FAIL_REGULAR_EXPRESSION, whose LastTest.log files are checked using *-check.cmake.
* CTest: Teach --show-only= to reject unknown valuesBrad King2019-01-174-0/+5
|
* CTest: Teach --show-only=json-v1 to filter out not-available testsBrad King2019-01-171-0/+1
| | | | | | Avoid exposing the internal special value that we use to track tests not available in the tested configuration. This also prevents clients from having to do the filtering themselves.
* Tests: Fix RunCMake.CTestCommandLine case when no python is foundBrad King2019-01-171-0/+3
| | | | | Do not try to run the python checks if the python executable is not available.
* Tests: Rename RunCMake.CTestCommandLine show-only test casesBrad King2019-01-175-12/+12
| | | | | The current name was chosen from an earlier design iteration of the command-line option name. Rename the case to match the final name.
* Tests: Fix RunCMake.CTestCommandLine to actually check json-v1Brad King2019-01-161-0/+1
| | | | | Add a file missing from commit 67209a9291 (Tests: Add cases for ctest --show-only=json-v1, 2018-11-01) to actually hook up the content check.
* Tests: Add cases for ctest --show-only=json-v1Brad King2019-01-103-0/+159
|
* CTest: Restore inheritance of stdin by test processesBrad King2018-11-153-0/+14
| | | | | | | | | | | Since commit v3.11.0-rc1~117^2 (CTest: Re-implement test process handling using libuv, 2017-12-10) we do not give the child test processes any stdin. Prior to that change we let the child test processes inherit stdin from ctest itself. Tests that run serially might be able to use the real stdin meaningfully, so restore that behavior and add a test case. Fixes: #18591
* CTest: Fix --test-load regressionBrad King2018-09-105-6/+10
| | | | | | | | | | | | | | | | | | | | | | | The `ctest --test-load` option is implemented in `StartNextTests` by not starting any tests when the load is too high and instead sleeping and then returning. Prior to commit v3.11.0-rc1~117^2 (CTest: Re-implement test process handling using libuv, 2017-12-10) our outer loop in `RunTests` would immediately call `StartNextTests` again. However, now the `uv_run` loop may simply terminate if there are no tests running because no events are left pending. Fix this by converting the sleep in `StartNextTests` into a libuv timer that it starts instead. This avoids leaving `uv_run` with no pending events. In the case that there are other running tests this also allows CTest to detect when they finish even if it during the wait period where we previously slept. This regression was not caught by the test suite because it only verified that we do not start new tests when the load was too high and not that we proceed to start tests when the load drops. Revise the test suite to cover both. Fixes: #18338
* CTest: Add options to control test process affinity to CPUsBrad King2018-03-052-0/+21
| | | | | | | | | | In commit v2.8.0~170 (ENH: Added ctest test options PROCESSORS and RUN_SERIAL, 2009-09-07) CTest learned to track the number of processors allocated to running tests in order to balance it against the desired level of parallelism. Extend this idea by introducing a new `PROCESSOR_AFFINITY` test property to ask that CTest run a test with the CPU affinity mask set. This will allow a set of tests that are running concurrently to use disjoint CPU resources.
* Tests: Remove incorrect use of 'test-timeout' optionBetsy McPhail2017-11-101-1/+1
|
* CTest: Weight reported test times by PROCESSORS in summariesBill Hoffman2017-09-081-2/+2
| | | | | | This commit changes the times reported by labels and subprojects to be weighted by the PROCESSORS property. It is reported with `sec*proc` instead of just `sec`.
* CTest: Properly reset output to avoid duplication with --repeat-until-failSylvain Joubert2017-01-121-0/+2
|
* Update tests that expect uncompressed outputZack Galbreath2016-11-081-0/+1
| | | | Pass --no-compressed-output to ctest for tests that expect uncompressed output.
* CTest: Fix regression in handling of a RUN_SERIAL test that failsBrad King2015-10-234-0/+27
| | | | | | | Refactoring in commit v3.4.0-rc1~390^2~1 (cmCTestMultiProcessHandler: Refactor RUN_SERIAL implementation, 2015-06-01) forgot to update a code path for cleaning up after a failed RUN_SERIAL test. This causes an infinite loop after a RUN_SERIAL test fails. Fix it and add a test.
* CTest: Add options to limit output of passed and failed testsRoman Wüger2015-09-184-0/+36
| | | | | | | | | | Add ctest command-line options: --test-output-size-passed <n> --test-output-size-failed <n> to set the amount of test output to store in Test.xml as a command-line dashboard client.
* CTest: Show the number of tests for each label in the summaryBetsy McPhail2015-07-062-0/+30
|
* ctest: Optionally avoid starting tests that may exceed a given CPU loadBetsy McPhail2015-06-307-0/+52
| | | | | | | | | | | | | | Add a TestLoad setting to CTest that can be set via a new --test-load command-line option, CTEST_TEST_LOAD variable, or TEST_LOAD option to the ctest_test command. Teach cmCTestMultiProcessHandler to measure the CPU load and avoid starting tests that may take more than the spare load currently available. The expression <current_load> + <test_processors> <= <max-load> must be true to start a new test. Co-Author: Zack Galbreath <zack.galbreath@kitware.com>
* CTest: Capture test stdout/stderr through one pipe (#15600)Brad King2015-06-033-0/+30
| | | | | | | Use the KWSys Process "MergeOutput" option to give each test child process the same pipe for both stdout and stderr. This allows natural merging of stdout and stderr together instead of merging on arbitrary buffered read boundaries as before.
* Tests: Add case for 'ctest' run with bad CTestTestfileBrad King2015-05-142-0/+17
|