summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ctest_test
Commit message (Collapse)AuthorAgeFilesLines
* cmCTestMultiProcessHandler: Stop searching for tests when limit is reachedBrad King2023-11-173-0/+33
| | | | Avoid an extra loop iteration if we have no room for more tests.
* Tests: Cover ctest waiting on insufficient non-zero spare test-loadBrad King2023-11-173-10/+14
|
* Tests: Migrate CTestTest{NoBuild,NoExe} to RunCMake.ctest_{build,test}Brad King2023-09-076-4/+23
| | | | Avoid duplicating infrastructure provided by the latter.
* 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`.
* 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-074-0/+7
| | | | Issue: #23869
* RunCMakeTest: fix Truncation test definitionFrank Winklmeier2022-09-054-10/+12
| | | | | | | | | | 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
* ctest: add option for output truncationFrank Winklmeier2022-03-082-0/+29
| | | | | | | | | | 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
* Merge branch 'master' into ctest-test-changing-labelsKyle Edwards2021-07-283-0/+68
|\
| * ctest: support <CTestMeasurement> for runtime measurementsZack Galbreath2021-07-012-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach CTest to parse output for <CTestMeasurement> in addition to <DartMeasurement> for measurements defined at runtime. Use a new class (cmCTestTestMeasurementXMLParser) derived from cmXMLParser to parse the data and attributes these XML elements. This is an improvement over our previous approach of using a series of regular expressions. As part of this commit we also rename some member variables and methods to make their purpose more clear. DartStuff -> AllTestMeasurementsRegex DartStuff1 -> SingleTestMeasurementRegex DartString -> TestMeasurementsOutput GenerateDartOutput() -> GenerateCTestXML() GenerateRegressionImages() -> RecordCustomTestMeasurements() cmCTestRunTest::DartProcessing() -> ParseOutputForMeasurements()
| * ctest: improve test for runtime labelsZack Galbreath2021-07-011-5/+2
| | | | | | | | | | | | Check for the whole expected output string rather than particular substrings. This verifies that newlines are stripped for any <CTestLabel> lines found in the test output.
| * ctest: allow test output to add labelsZack Galbreath2021-06-172-0/+41
| | | | | | | | | | Parse test output for <CTestLabel>...</CTestLabel>. If found, add this value to the list of labels associated with this test.
* | CTest: Reset multi-options to persistent multi-optionsKyle Edwards2021-07-282-1/+19
|/ | | | | | | | 44ad3f0b added multi-options to CTest, but didn't reset them, causing ctest_test() to fail if it was run multiple times with different label arguments. Reset the multi-options. Fixes: #22485
* ctest: allow test output to override the 'details' fieldZack Galbreath2021-06-092-0/+28
| | | | | | Parse test output for <CTestDetails>...</CTestDetails>. If found, use this value to override the default 'Details' string reported to CDash.
* ctest: add support for attaching files to tests at run timeZack Galbreath2021-06-082-0/+9
| | | | | | | | | | | | | | Allow tests to specify files to upload at runtime. Previously this was only possible to specify at configure time with the ATTACHED_FILES test properties. This commit also fixes a bug in how our test data tarballs were generated by CTest. Previously, if you tried to attach a file outside of the binary directory, CTest would generate a tar file with a relative path, and tar would not allow you to extract it. We resolve this problem by creating tar files with a flat directory structure instead. Fixes: #22284
* Tests: Add cases for CTest extra measurements from testsZack Galbreath2021-04-272-0/+33
|
* ctest: Add support for writing test results in JUnit XML formatZack Galbreath2021-04-262-0/+27
| | | | Addresses #18654
* ctest: Display test "WAITING" messages only in extra-verbose modeBrad King2021-04-068-7/+58
| | | | | These messages are incidental scheduling output. Avoid cluttering the normal verbose output showing tests starting and finishing.
* Merge branch 'backport-ctest-repeat-notrun' into ctest-repeat-notrunBrad King2020-05-275-6/+49
|\
| * CTest: Make sure NOT_RUN tests show up in the failed test logRobert Maynard2020-05-275-1/+28
| | | | | | | | Issue: #20543
| * Tests: Add coverage of ctest_test RETURN_VALUE and REPEATRobert Maynard2020-05-271-5/+21
| |
* | CTest: Log environment variables as a test measurementKyle Edwards2020-05-192-0/+21
| |
* | ctest: add option --stop-on-failureJohnny Jazeix2020-04-202-0/+25
|/ | | | | | To stop the tests once one has failed Fixes: #16628
* ctest_test: Add option to REPEAT testsBrad King2019-11-0711-1/+86
|
* Remove unnecessary CTEST_PROJECT_NAME variablesRegina Pfeifer2018-11-201-1/+0
|
* CTest: Fix --test-load regressionBrad King2018-09-109-12/+20
| | | | | | | | | | | | | | | | | | | | | | | 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
* Tests: Disable parallel test execution while running ctest_testStephen Kelly2015-10-271-0/+1
|
* Tests: Don't overwrite RunCMake_TEST_FAILED variableStephen Kelly2015-10-271-5/+5
|
* CTest: Document and test custom output size settingsBrad King2015-09-183-0/+33
| | | | | | | | | Add documentation and tests for the existing CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE CTest variables.
* CTest: Optionally add a ChangeId attribute on XML Site tagsZack Galbreath2015-07-173-0/+23
| | | | | | | Add variable CTEST_CHANGE_ID to configure the setting. This allows CTest clients to give CDash information about what change is being tested so that CDash can take actions to report the results (e.g. to a pull request page).
* ctest: Optionally avoid starting tests that may exceed a given CPU loadBetsy McPhail2015-06-3016-0/+88
| | | | | | | | | | | | | | 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_test: Add QUIET optionZack Galbreath2015-02-235-0/+33