summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestTestHandler.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'ctest-environment-modifications'Brad King2021-07-131-0/+2
|\ | | | | | | | | | | | | | | de4f1f26b0 CTest: add an ENVIRONMENT_MODIFICATION property 4c757fa3c8 Help/prop_test/ENVIRONMENT: clarify the scope of the changes Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6299
| * CTest: add an ENVIRONMENT_MODIFICATION propertyBen Boeckel2021-07-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | cmState: Construct with modeBrad King2021-07-121-1/+1
|/
* ctest: support <CTestMeasurement> for runtime measurementsZack Galbreath2021-07-011-138/+54
| | | | | | | | | | | | | | | | | | | 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/+2
| | | | | 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-1/+9
| | | | | | 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-39/+67
| | | | | | | | | | | | | | 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/+130
| | | | Addresses #18654
* Update CMake code using KWSys to account for Status return valuesBrad King2021-04-141-1/+1
| | | | | | KWSys as of 2021-04-14 changed the return type of `SystemTools` operations from `bool` to `Status`. Update our call sites. This may improve error reporting accuracy in a few places.
* ctest: Support multiple -L and -LE options to mean "AND"Adriaan de Groot2021-03-281-44/+59
| | | | Fixes: #21087
* Source: Reduce c_str() usagevvs314152021-03-131-6/+4
|
* clang-tidy: fix `performance-no-automatic-move` warningsBen Boeckel2021-01-271-1/+1
|
* Code style: add missed explicit 'this->'Oleksandr Koval2021-01-051-3/+3
| | | | | CMake uses explicit 'this->' style. Using custom clang-tidy check we can detect and fix places where 'this->' was missed.
* include: refactor call sites of cmMakefile::ReadDependentFileAsit Dhal2020-10-211-1/+1
| | | | Fixes: #16773
* cmMakefile::GetDefinition: return cmPropVitaly Stakhovsky2020-09-021-2/+3
|
* CTest: exit nonzero after message(SEND_ERROR|FATAL_ERROR)Kevin Puetz2020-08-261-8/+16
| | | | Fixes: #21004
* cmCTest: Members accept std::string parametersVitaly Stakhovsky2020-07-271-6/+6
|
* CTest: Log environment variables as a test measurementKyle Edwards2020-05-191-0/+6
|
* Merge topic 'stl-support'Brad King2020-05-011-1/+1
|\ | | | | | | | | | | | | 8d4a9ee398 Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view> Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4689
| * Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view>Marc Chevrier2020-04-301-1/+1
| |
* | IWYU: mark <cstddef> as neededBen Boeckel2020-04-291-1/+1
|/ | | | Newer IWYU is not seeing them as needed for `size_t`.
* ctest: add option --stop-on-failureJohnny Jazeix2020-04-201-0/+4
| | | | | | To stop the tests once one has failed Fixes: #16628
* Refactoring: add cm::contains to <cmext/algorithm>Marc Chevrier2020-04-171-8/+9
|
* clang-tidy: address bugprone-branch-clone lintsBen Boeckel2020-04-131-4/+3
| | | | | | | | | Arguably, many of these are bugs in `clang-tidy`. An if/else tree with other conditionals between cloned blocks may be relying on the intermediate logic to fall out of the case and inverting this logic may be non-trivial. See: https://bugs.llvm.org/show_bug.cgi?id=44165
* CTest: Add CTEST_RESOURCE_SPEC_FILE variableKyle Edwards2020-04-021-15/+22
|
* use _s to construct static string_views at several placesRolf Eike Beer2020-03-241-29/+31
| | | | This should avoid the runtime strlen() call.
* replace std::string::substr() with operations that do not allocate memoryRolf Eike Beer2020-03-231-2/+3
| | | | | Modify the original string instead of creating a new copy with substr() when it is not used for anything else afterwards.
* CTest: avoid repeated string comparesRolf Eike Beer2020-03-231-52/+27
| | | | | | Only one key can match per iteration, avoid any further compares when one match was already found. While at it entirely avoid that the key and value strings are copied.
* remove pointless return value from cmCTestTestHandler::CleanTestOutput()Rolf Eike Beer2020-03-231-3/+2
|
* Modernize memory managementMarc Chevrier2020-03-081-14/+10
| | | | Update internals of various classes.
* CTest: Provide more detailed information on resource allocation errorKyle Edwards2020-02-241-0/+1
|
* Add --no-tests=<[error|ignore]> option to CTestStefan Dinkelacker2020-01-311-1/+12
| | | | | | | | | 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>
* Merge topic 'ctest-resource-allocation-spec-message'Craig Scott2019-12-291-2/+6
|\ | | | | | | | | | | | | b393b32b4b CTest: Improve error handling when reading resource spec file Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4162
| * CTest: Improve error handling when reading resource spec fileKyle Edwards2019-12-271-2/+6
| | | | | | | | Fixes: #20079
* | ctest_test: Add option to REPEAT testsBrad King2019-11-071-2/+30
| |
* | cmCTestMultiProcessHandler: Hold repeat mode as a memberBrad King2019-11-071-0/+2
|/
* CTest: Rename hardware -> resources for source codeCraig Scott2019-11-051-6/+6
|
* CTest: Rename hardware -> resources for CMake variables, command optionsCraig Scott2019-11-051-2/+2
| | | | | | Only changes the user-visible effects of renaming hardware allocation to resource allocation. Code changes are the minimum needed to achieve that.
* CTest: Rename "Processes" lexer to "ResourceGroups"Brad King2019-11-051-2/+2
| | | | | The corresponding test property `PROCESSES` has been renamed to `RESOURCE_GROUPS`.
* CTest: Rename PROCESSES test property to RESOURCE_GROUPSBrad King2019-11-051-5/+5
| | | | | | | | | | | | 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/+15
|
* CTest: Add lexer for PROCESSES propertyKyle Edwards2019-10-021-0/+28
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-20/+22
| | | | | 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.
* cmstd: Modernize CMake system headersMarc Chevrier2019-09-201-1/+1
| | | | | | | | | | | | | | Provide a standardized way to handle the C++ "standard" headers customized to be used with current CMake C++ standard constraints. Offer under directory `cm` headers which can be used as direct replacements of the standard ones. For example: #include <cm/string_view> can be used safely for CMake development in place of the `<string_view>` standard header. Fixes: #19491
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-3/+3
|
* Merge topic 'modernize-use-auto'Brad King2019-09-121-18/+9
|\ | | | | | | | | | | | | d25a5a7ec9 clang-tidy: modernize-use-auto Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3783
| * clang-tidy: modernize-use-autoRegina Pfeifer2019-09-101-18/+9
| | | | | | | | | | | | Set the MinTypeNameLength option to an impossibly high value in order to limit the diagnostics to iterators. Leave new expressions and cast expressions for later.
* | cmCTestTestHandler: Port away from cmCommandRegina Pfeifer2019-09-091-106/+51
|/
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-041-1/+1
| | | | | | | | Automate the conversion with perl -i -0pe 's/typedef ([^;]*) ([^ ]+);/using $2 = $1;/g' then manually fix a few places.
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-031-2/+2
|