summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestTestHandler.h
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* CTest: use std::chrono::steady_clock for time keepingWouter Klouwen2017-11-141-1/+2
| | | | | | | | | | | | It was reported in issue #17345 that CTest does not use monotonic time to report test duration. Monotonic clocks are not affected by large NTP adjustments or things like daylight savings time. As CMake 3.10 requires C++11, which introduced std::chrono, this commit moves the time keeping in CTest from cmSystemTools::GetTime() to std::chrono::steady_clock. Fixes: #17345
* Fix trivial typos in textluzpaz2017-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some are user facing. Found using codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt` whereby the whitelist contained: ans dum helpfull emmited emmitted buil iff isnt nto ot pathes substract te todays upto whitespaces
* Use C++11 override instead of CM_OVERRIDEBrad King2017-09-151-3/+3
| | | | | | | | We now require C++11 support including `override`. Drop use of the old compatibility macro. Convert references as follows: git grep -l CM_OVERRIDE -- '*.h' '*.hxx' '*.cxx' | xargs sed -i 's/CM_OVERRIDE/override/g'
* Meta: modernize old-fashioned loops to range-based `for` (CTest).Pavel Solodovnikov2017-09-141-4/+6
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* CTest: Split out labels and subproject labels in summary outputBill Hoffman2017-09-081-2/+1
| | | | | | | | This commit splits out the reporting of labels and labels used for sub projects. If a label is a sub project label it will not be included in the label summary. To implement this the commit creates PrintLabelOrSubprojectSummary which is able to do the work of both PrintLabelSummary and PrintSubprojectSummary avoiding code duplication.
* clang-format: format all code as Cpp11Daniel Pfeifer2017-08-301-3/+3
|
* IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-261-1/+1
| | | | Also remove `#include "cmConfigure.h"` from most source files.
* Merge topic 'better-exception-reporting'Brad King2017-07-131-1/+2
|\ | | | | | | | | | | | | 0c650f39 CTest: Report more detail about system exceptions in tests Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1046