summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestTestHandler.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'ctest-tests-from-file'Brad King2024-03-111-4/+4
|\ | | | | | | | | | | | | | | | | | | | | 170ec48601 Help: Improve ctest tests-from-file documentation wording and wrapping 1a4837641e ctest: Remove unnecessary and ambiguous tests-from-file comment syntax d52c66bfb3 ctest: Honor tests-from-file options with empty input 8673264e25 Tests: Make ctest tests-from-file expected output more precise Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9322
| * ctest: Honor tests-from-file options with empty inputBrad King2024-03-081-4/+4
| | | | | | | | If the `--tests-from-file` input file is empty, no tests should run.
* | Merge topic 'gtest-json-test-def-source'Brad King2024-03-081-0/+1
|\ \ | |/ |/| | | | | | | | | 06860d5c12 ctest: Show custom test properties in --show-only=json-v1 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9305
| * ctest: Show custom test properties in --show-only=json-v1Daniel Sim2024-03-061-0/+1
| |
* | ctest: Exit with failure when tests-from-file input is missingBrad King2024-03-061-2/+2
|/ | | | | | | | | | | | | | | If the options added by * commit 022f20f663 (ctest: add command line option to run the tests listed in a given file, 2023-11-29, v3.29.0-rc1~66^2~2) * commit dbacc1d5a8 (ctest: add command line option to exclude tests listed in a given file, 2023-11-30, v3.29.0-rc1~66^2~1) * commit 701029726f (ctest_test: add options INCLUDE_FROM_FILE and EXCLUDE_FROM_FILE, 2023-12-03, v3.29.0-rc1~66^2) are given a missing file, fail instead of ignoring it. Fixes: #25740
* ctest: add command line option to exclude tests listed in a given fileAlex Neundorf2024-01-251-1/+4
| | | | | | | Add `--exclude-from-file <filename>` to exclude the tests listed in the given file. Issue: #25455
* ctest: add command line option to run the tests listed in a given fileAlex Neundorf2024-01-251-0/+3
| | | | | | | | Add `--tests-from-file <filename>` to run only the tests listed in the given file. The test names must match exactly, no regexps or something. The listed tests can still be filtered with a regexp using -R. Issue: #25455
* cmCTestTestHandler: Clarify name of member storing RESOURCE_LOCK propertyBrad King2023-11-211-1/+1
| | | | The property represents project-defined resources.
* CTest: Add ability to dynamically generate resource spec fileKyle Edwards2023-08-101-4/+2
| | | | Issue: #25106
* IWYU: Update for Debian 12 CI jobBrad King2023-07-281-1/+1
| | | | | | `include-what-you-use` diagnostics, in practice, are specific to the environment's compiler and standard library. Update includes to satisfy IWYU for our CI job under Debian 12.
* ctest: Optionally terminate tests with a custom signal on timeoutBrad King2023-06-021-0/+11
| | | | | | | | CTest normally terminates test processes on timeout using `SIGKILL`. Offer tests a chance to exit gracefully, on platforms supporting POSIX signals, by setting `TIMEOUT_SIGNAL_{NAME,GRACE_PERIOD}` properties. Fixes: #17288
* cmCTestTestHandler: Remove outdated commentBrad King2023-05-311-4/+0
| | | | | | Remove a comment that has not been relevant since commit 177edc5ed1 (Fixed ctest -N segfault issue. Further refactored ctest. Enabled failover for ctest, 2009-08-27, v2.8.0~250).
* cmCTestRunTest: Consolidate test timeout selection logicBrad King2023-05-041-2/+3
| | | | | Test timeout selection was previously spread out over several locations. Consolidate it in a single place to make it easier to follow.
* cmCTestTestHandler: Use in-class initialization of properties and resultsBrad King2023-05-041-17/+17
|
* ctest: add option for output truncationFrank Winklmeier2022-03-081-2/+9
| | | | | | | | | | 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
* Source: Replace C headers with C++ onesRose2021-11-021-2/+1
| | | | In applicable areas only, of course.
* Rename cmProp in cmValueMarc Chevrier2021-09-211-2/+2
|
* cmCTestGenericHandler::GetOption returns cmPropMarc Chevrier2021-09-131-3/+4
|
* CTest: add an ENVIRONMENT_MODIFICATION propertyBen Boeckel2021-07-091-0/+1
| | | | | | | | | | | | | | | | | | | | This property allows projects to modify environment variables at test time rather than trying to guess what the state should be based on what is present at configure time. Of particular interest is the ability to use a `PATH` present at test time while adding entries known to be necessary for the test itself. There are multiple operations provided to modify variables, including: - setting and unsetting - appending and prepending as: - strings - path lists - CMake lists Additionally, a `reset` action is provided to cancel any prior modifications to that particular variable in the case of incremental additions to the test property.
* ctest: support <CTestMeasurement> for runtime measurementsZack Galbreath2021-07-011-6/+6
| | | | | | | | | | | | | | | | | | | 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: allow test output to add labelsZack Galbreath2021-06-171-0/+1
| | | | | Parse test output for <CTestLabel>...</CTestLabel>. If found, add this value to the list of labels associated with this test.
* ctest: allow test output to override the 'details' fieldZack Galbreath2021-06-091-0/+2
| | | | | | 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-081-0/+2
| | | | | | | | | | | | | | 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
* ctest: Add support for writing test results in JUnit XML formatZack Galbreath2021-04-261-0/+10
| | | | Addresses #18654
* ctest: Support multiple -L and -LE options to mean "AND"Adriaan de Groot2021-03-281-6/+2
| | | | Fixes: #21087
* Modernize: Use #pragma once in all header filesKitware Robot2020-09-031-4/+1
| | | | | | | | | | | | | | | | #pragma once is a widely supported compiler pragma, even though it is not part of the C++ standard. Many of the issues keeping #pragma once from being standardized (distributed filesystems, build farms, hard links, etc.) do not apply to CMake - it is easy to build CMake on a single machine. CMake also does not install any header files which can be consumed by other projects (though cmCPluginAPI.h has been deliberately omitted from this conversion in case anyone is still using it.) Finally, #pragma once has been required to build CMake since at least August 2017 (7f29bbe6 enabled server mode unconditionally, which had been using #pragma once since September 2016 (b13d3e0d)). The fact that we now require C++11 filters out old compilers, and it is unlikely that there is a compiler which supports C++11 but does not support #pragma once.
* CTest: exit nonzero after message(SEND_ERROR|FATAL_ERROR)Kevin Puetz2020-08-261-2/+2
| | | | Fixes: #21004
* cmCTest: Members accept std::string parametersVitaly Stakhovsky2020-07-271-2/+3
|
* CTest: Log environment variables as a test measurementKyle Edwards2020-05-191-0/+1
|
* CTest: Add CTEST_RESOURCE_SPEC_FILE variableKyle Edwards2020-04-021-1/+1
|
* remove pointless return value from cmCTestTestHandler::CleanTestOutput()Rolf Eike Beer2020-03-231-1/+1
|
* CTest: Provide more detailed information on resource allocation errorKyle Edwards2020-02-241-0/+1
|
* ctest_test: Add option to REPEAT testsBrad King2019-11-071-1/+3
|
* CTest: Rename hardware -> resources for source codeCraig Scott2019-11-051-3/+3
|
* CTest: Rename PROCESSES test property to RESOURCE_GROUPSBrad King2019-11-051-3/+3
| | | | | | | | | | | | 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
* CTest: Allocate hardware to testsKyle Edwards2019-10-021-0/+4
|
* CTest: Add lexer for PROCESSES propertyKyle Edwards2019-10-021-0/+15
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-6/+8
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-041-6/+5
| | | | | | | | Automate the conversion with perl -i -0pe 's/typedef ([^;]*) ([^ ]+);/using $2 = $1;/g' then manually fix a few places.
* Refactor: Break cmCTestTestHandler::ProcessHandler() into smaller functionsKyle Edwards2019-07-191-0/+13
|
* CTest: Add SKIP_REGULAR_EXPRESSION test propertyGabor Bencze2019-07-181-0/+2
|
* Fix invalid ///! doxygen comment line startsSebastian Holtermann2019-03-311-2/+2
| | | | | In various places `///!` was used to start a comment line. This is not valid Doygen syntax. This patch replaces `///!` comment starts with `//!`.
* CTest: Represent process exit codes as 64-bit signed integerZsolt Parragi2019-02-081-1/+2
| | | | | | | Exit code constants on Windows, such as `STATUS_NO_MEMORY` do not fit in a 32-bit signed integer type. They do fit in an unsigned 32-bit type, but for compatibility with UNIX semantics we treat exit codes as signed. Use a 64-bit signed integer to handle both.
* TestGenerator: Record support file and line where test was addedJustin Goshi2019-01-081-0/+3
| | | | | Add internal test properties that ctest can use to report where the test was added in CMake code.
* CTest: Add colored output on tests summary where supportedSylvain Joubert2018-11-091-1/+1
| | | | | | | | - Number of passed/failed tests is colored according to the whole outcome - Individual listed tested are colored according to their completion status: * Disabled: blue * Failed: red * Not Run: yellow
* CTest: Add options to control test process affinity to CPUsBrad King2018-03-051-0/+2
| | | | | | | | | | 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.
* CTest: introduce cmDurationWouter Klouwen2018-01-231-4/+5
| | | | | | | | This commit introduces cmDuration as a typedef for std::chrono::duration<double, std::ratio<1>>. It is less verbose and provides for a point to put future common functionality for durations. No functional change intended.
* CTest: Remove unfinished batch test modeBrad King2017-12-081-1/+0
| | | | | This was partially implemented by commit v2.8.0~154 (Added some ctest batch capabilities, 2009-09-10) but never finished.
* CTest: convert timeouts to std::chrono::durationWouter Klouwen2017-12-041-3/+3
| | | | | | | | | This commit continues the refactoring of CTest to adopt std::chrono. After the last sets of changes that introduced std::chrono::steady_clock and std::chrono::system_clock respectively, it makes sense to have all the timeouts be stored as std::chrono::duration. No functional change intended.
* CTest: adopt std::chrono::system_clockWouter Klouwen2017-11-171-2/+2
| | | | | | | | | | | | | | | | | | After the refactor to make CTest use std::chrono::steady_clock for the keeping of time for test duration, there are still references to cmSystemTools::GetTime() left. To further adopt std::chrono for time related activities, this commit changes those remaining references to std::chrono::system_clock::now() calls and alters the storage from either unsigned int or double to std::chrono::system_clock::time_point. For ease of conversion, a converter method is added to cmXMLWriter that converts from a std::chrono::system_clock::time_point to the number of seconds since the UN*X epoch as that is expected behaviour. This means no more casts as required. Functionally should be no difference as the system_clock is implemented in the same terms.