summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestMultiProcessHandler.cxx
Commit message (Collapse)AuthorAgeFilesLines
* CTest: add an ENVIRONMENT_MODIFICATION propertyBen Boeckel2021-07-091-0/+5
| | | | | | | | | | | | | | | | | | | | 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: Display test "WAITING" messages only in extra-verbose modeBrad King2021-04-061-5/+5
| | | | | These messages are incidental scheduling output. Avoid cluttering the normal verbose output showing tests starting and finishing.
* clang-tidy: fix `readability-qualified-auto` warningsBen Boeckel2021-01-271-6/+6
|
* Code style: add missed explicit 'this->'Oleksandr Koval2021-01-051-12/+12
| | | | | CMake uses explicit 'this->' style. Using custom clang-tidy check we can detect and fix places where 'this->' was missed.
* Refactoring: Third-parties public headers are under cm3p prefixMarc Chevrier2020-05-071-4/+4
| | | | Fixes: #20666
* 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-1/+10
| | | | | | To stop the tests once one has failed Fixes: #16628
* Refactoring: add cm::contains to <cmext/algorithm>Marc Chevrier2020-04-171-7/+6
|
* cmCTestRunTest: modernize memory managementMarc Chevrier2020-03-111-22/+22
|
* CTest: Provide more detailed information on resource allocation errorKyle Edwards2020-02-241-1/+33
|
* Refactor: Provide more detailed error information from TryAllocateResources()Kyle Edwards2020-02-241-14/+27
|
* CTest: Improve error reporting with bad working directory for testsKyle Edwards2020-02-241-1/+1
|
* Refactor: Require detail when calling cmCTestRunTest::StartFailure()Kyle Edwards2020-02-241-3/+4
|
* Refactoring: use append functions from cmext/algorithmMarc Chevrier2019-12-171-2/+4
|
* cmCTestMultiProcessHandler: Hold repeat mode as a memberBrad King2019-11-071-3/+3
|
* CTest: Rename internal APIs for --repeat optionsBrad King2019-11-071-3/+3
| | | | Replace use of the term "rerun" with "repeat" to match the public names.
* Merge branch 'backport-ctest-resource-groups'Brad King2019-11-051-50/+51
|\
| * CTest: Rename hardware -> resources for source codeCraig Scott2019-11-051-35/+35
| |
| * cmCTestMultiProcessHandler: Rename resource locking functionsCraig Scott2019-11-051-4/+4
| | | | | | | | | | | | Renaming these ahead of other refactoring which will use the previous names. The previous names more accurately reflect their purpose after this commit anyway (talking about locking and unlocking rather than allocating and deallocating).
| * CTest: Rename hardware -> resources for CMake variables, command optionsCraig Scott2019-11-051-1/+1
| | | | | | | | | | | | 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 test property to RESOURCE_GROUPSBrad King2019-11-051-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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: Add --repeat-until-pass optionBrad King2019-10-291-2/+2
|/ | | | | | | | | 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-021-0/+26
|
* CTest: Allocate hardware to testsKyle Edwards2019-10-021-4/+136
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-21/+20
| | | | | 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: modernize-deprecated-headersRegina Pfeifer2019-09-161-2/+2
|
* Merge topic 'pvs-cleanup'Brad King2019-08-261-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7fe3e874d5 cmCPackLog: Fix support for multiple log message tags 74f2c0ea56 cmCTestTestHandler: Remove extra layer of parentheses 7c2767ef3b cmCTestMultiProcessHandler: Explain testRun ownership in comments 303e813438 CTest: Simplify some boolean conditions 51565abe79 cmMessageCommand: Remove extra layer of parentheses b1cfaf7b91 cmVSSetupHelper: Remove unused SmartBSTR copy operations 3f4c4e7afe cmVSSetupHelper: Fix SmartBSTR copy operations a8ca5aea94 cmMakefileTargetGenerator: Check for null before using a pointer ... Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de> Acked-by: Artalus <artalus-mail@yandex.ru> Merge-request: !3715
| * cmCTestMultiProcessHandler: Explain testRun ownership in commentsBrad King2019-08-261-0/+3
| | | | | | | | | | | | | | | | The ownership semantics of the 'testRun' variable are subtle and may fool static analysers. Add comments explaining them for now. Later some refactoring could be done to clarify the code. Issue: #19610
* | Merge topic 'ctest-json-REQUIRED_FILES'Brad King2019-08-231-2/+2
|\ \ | |/ |/| | | | | | | | | 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-221-2/+2
| | | | | | | | Fixes: #19629
* | cmAlgorithms: Add cmContainsRegina Pfeifer2019-08-191-10/+6
| | | | | | | | Also, use the new function where applicable.
* | cmStringAlgorithms: Add cmStrToLong and cmStrToULongSebastian Holtermann2019-08-101-2/+2
| | | | | | | | | | | | | | | | This adds the following functions to cmStringAlgorithms: - `cmStrToLong`: moved from `cmSystemTools::StringToLong` - `cmStrToULong`: moved from `cmSystemTools::StringToULong` Overloads of the given functions for `std::string` are added as well.
* | CTest: Add SKIP_REGULAR_EXPRESSION test propertyGabor Bencze2019-07-181-0/+5
| |
* | IWYU: Fix handling of <memory> standard headerBrad King2019-07-101-0/+2
|/ | | | | | | | An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `<memory>` inclusions to follow the now-correct IWYU lints.
* Use cmAppend to append ranges to std::vector instancesSebastian Holtermann2019-05-231-9/+7
|
* Merge topic 'cmrange-improvements'Brad King2019-02-251-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | b8031308f3 cmRange: Add unit tests a8d51ef8b7 cmRange: Add functions filter and transform da4773e8b8 cmRange: Add functions all_of, any_of, none_of 17a367e77f cmRange: Stylistic cleanup 9eb0e73f46 cmRange: Move to dedicated header file Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Artur Ryt <artur.ryt@gmail.com> Merge-request: !2972
| * cmRange: Move to dedicated header fileRegina Pfeifer2019-02-211-1/+1
| |
* | cmSystemTools::Error: consolidate parameters into single std::stringVitaly Stakhovsky2019-02-201-2/+2
|/
* Modernize: Use ranged for-loops when possibleArtur Ryt2019-02-071-3/+2
| | | | | | | Replaced most manual `const_iterator`-based loops and some reverse-iterator loops with range loops. Fixes: #18858
* Merge topic 'tidy-use-equals-default'Brad King2019-01-291-4/+1
|\ | | | | | | | | | | | | | | | | 094f01d0f0 cleanup: Prefer compiler provided special member functions 55671b41d2 clang-tidy: Use `= default` Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Brad King <brad.king@kitware.com> Merge-request: !2841
| * cleanup: Prefer compiler provided special member functionsRegina Pfeifer2019-01-251-1/+0
| |
| * clang-tidy: Use `= default`Regina Pfeifer2019-01-251-4/+2
| | | | | | | | | | | | Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and `Source/cmUVHandlePtr.h` where a few older compilers require a user-defined default constructor (with `{}`).
* | cmSystemTools::RenameFile: Accepts std::string argsVitaly Stakhovsky2019-01-231-1/+1
|/
* CTest: Teach --show-only=json-v1 to filter out not-available testsBrad King2019-01-171-0/+5
| | | | | | 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.
* CTest: Add --show-only[=format] option to print test infoJustin Goshi2019-01-101-0/+331
| | | | | | format can be 'human' to print the current text format or 'json-v1' to print the test object model in json format and is useful for IDEs who want to gather information about the tests. Defaults to 'human' format.
* cmCTestRunTest: Thread number of completed tests through start APIsMichael Wegner2018-09-251-2/+2
|
* CTest: Improve stop-time implementationBrad King2018-09-121-17/+32
| | | | | | | | | | The CTestTestStopTime test has been failing sporadically because the stop time causes the first internal test to have a timeout short enough that we might hit it and start the second test just before the stop time is reached. Instead we should track when a timeout is shortened in order to stay within the stop time. If a test times out for this reason then we should consider the stop time reached and not start any more tests.
* Merge topic 'ctest-fix-test-load'Brad King2018-09-111-20/+39
|\ | | | | | | | | | | | | 292ec157b6 CTest: Fix --test-load regression Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2362
| * CTest: Fix --test-load regressionBrad King2018-09-101-20/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Update use of KWSys SystemTools::SplitString for new signatureBrad King2018-06-221-3/+2
|/