summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestRunTest.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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-4/+6
|
* CTest: Rename internal APIs for --repeat optionsBrad King2019-11-071-7/+7
| | | | Replace use of the term "rerun" with "repeat" to match the public names.
* Merge branch 'backport-ctest-resource-groups'Brad King2019-11-051-8/+8
|\
| * CTest: Rename hardware -> resources for source codeCraig Scott2019-11-051-5/+5
| |
| * 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: Add --repeat-after-timeout optionBrad King2019-10-291-5/+8
| | | | | | | | | | Add an option to re-run tests if they timeout. This will help tolerate sporadic timeouts on busy machines.
* | ctest: Add --repeat-until-pass optionBrad King2019-10-291-4/+10
| | | | | | | | | | | | | | | | | | 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>
* | cmCTestRunTest: Use inline member initializersBrad King2019-10-291-3/+0
|/
* CTest: Allocate hardware to testsKyle Edwards2019-10-021-0/+43
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-9/+10
| | | | | 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-1/+1
|
* clang-tidy: modernize-use-autoRegina Pfeifer2019-09-101-2/+1
| | | | | | 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.
* Merge topic 'pvs-cleanup'Brad King2019-08-261-2/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * CTest: Simplify some boolean conditionsBrad King2019-08-261-2/+1
| | | | | | | | | | | | | | Directly compare two boolean values instead of spelling out accepted combinations. Issue: #19610
* | Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-19/+12
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* Refactor: Convert all instances of CMAKE_BUILD_WITH_CMAKE to CMAKE_BOOTSTRAPKitware Robot2019-08-091-1/+1
|
* CTest: Add SKIP_REGULAR_EXPRESSION test propertyGabor Bencze2019-07-181-3/+22
|
* Introduce memory management helper: cm_memory.hxxMarc Chevrier2019-07-141-1/+2
|
* CTest: Clean up stdout and logfile output for Pass/Fail regexStephen Manz2019-07-091-9/+12
| | | | | | | | | | For pass regex, display only the element that was found, rather than all elements Rename loop variable for fail regex, from pass to fail For consistency, add space in output for pass Add tests that find and don't find PASS_REGULAR_EXPRESSION, and a test that finds FAIL_REGULAR_EXPRESSION, whose LastTest.log files are checked using *-check.cmake.
* cmCTest: Remove friend declarationsRegina Pfeifer2019-03-181-3/+6
|
* ctest: refactor some codeGregor Jasny2019-03-051-17/+10
|
* Merge topic 'cmCTestRunTest-compress'Brad King2019-02-121-73/+11
|\ | | | | | | | | | | | | 948c55857e cmCTestRunTest: Remove duplicated compression logic Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2946
| * cmCTestRunTest: Remove duplicated compression logicRegina Pfeifer2019-02-101-73/+11
| |
* | 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.
* ctest: Add option for live progress summary in terminalMichael Wegner2018-09-261-18/+72
|
* cmCTestRunTest: Thread number of completed tests through start APIsMichael Wegner2018-09-251-3/+4
|
* cmCTestRunTest: Buffer test result output before printingMichael Wegner2018-09-251-28/+29
|
* CTest: Improve stop-time implementationBrad King2018-09-121-0/+5
| | | | | | | | | | 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.
* Remove unnecessary c_str() in RegularExpression::find callsVitaly Stakhovsky2018-08-071-5/+5
|
* Fix misc. typosluz.paz2018-06-041-1/+1
| | | | Found via `codespell` and `grep`
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-30/+34
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Merge topic 'cmWorkingDirectory_success_checking'Brad King2018-03-091-5/+40
|\ | | | | | | | | | | | | | | | | | | 5901699672 cmDepends: Remove attempt to change directory that always fails e60e4dfc88 cmWorkingDirectory: Check success of current dir changes e654622aee Tests: Add --build-and-test test case a865f0beb2 Tests: Confirm test working dir set successfully Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1817
| * cmWorkingDirectory: Check success of current dir changesCraig Scott2018-03-081-5/+40
| |
* | CTest: Add options to control test process affinity to CPUsBrad King2018-03-051-3/+6
|/ | | | | | | | | | 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.
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-2/+2
| | | | | | | | | | * Change some functions to take `std::string` instead of `const char*` in the following classes: `cmMakeFile`, `cmake`, `cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator` and a few others. * Greatly reduce using of `const char*` overloads for `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`. * Remove many redundant `c_str()` conversions throughout the code.
* CTest: add safe conversion from cmDuration to integer typesWouter Klouwen2018-01-231-11/+5
| | | | | | | | | | | | | A problem area by recent refactoring of time to std::chrono has been the unsafe conversion from duration<double> to std::chrono::seconds, which is of an unspecified integer type. This commit adds a template function that for a given type provides a safe conversion, effectively clamping a duration<double> into what fits safely in that type. A specialisation for int and unsigned int are provided. It changes the protential problem areas to use this safe function.
* CTest: introduce cmDurationWouter Klouwen2018-01-231-13/+10
| | | | | | | | 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: Re-implement test process handling using libuvBryon Bean2018-01-101-54/+41
| | | | Co-Author: Brad King <brad.king@kitware.com>
* cmProcess: Use explicit enum for process exit exceptionBryon Bean2018-01-101-4/+4
| | | | Translate the values from KWSys Process.
* cmProcess: Use explicit enum for process stateBryon Bean2018-01-101-6/+6
| | | | Translate the values from KWSys Process.
* cmCTestRunTest: Modernize constructor and destructor declsBryon Bean2018-01-101-4/+0
|
* cmCTestMultiProcessHandler: Check stop time more directlyBrad King2018-01-081-7/+3
| | | | | | | | Avoid creating a cmCTestRunTest instance if the stop time has been reached. If the stop time occurs in the small time between creating an instance and computing the child process timeout, we will simply compute a zero timeout. This is already done for the case that we StartAgain after the stop time.
* cmCTestRunTest: Subsume ResolveTimeout into only call siteBrad King2018-01-081-27/+18
|
* cmCTest: Refactor stop time calculationsBrad King2018-01-081-40/+3
| | | | | Calculate the stop time up front instead of re-parsing its string for every test.
* cmCTest: Remove unused member LastStopTimeoutBrad King2018-01-081-3/+1
| | | | | | | This member was added by commit v2.8.2~285 (Better detection of stop_time being passed, 2010-03-19), but its logic has no effect. The member is only used for comparison against a value to which it was just assigned.
* Merge topic 'fix-ctest-chrono'Brad King2017-12-121-16/+4
|\ | | | | | | | | | | | | | | | | | | | | | | ba6caafa CTest: Use integer-representable value for "infinite" timeout 548e8f6f CTest: Simplify std::chrono::duration<double> conversion to double de0035fd cmCTestBuildAndTestHandler: Convert timeout to std::chrono::duration 687a26b7 CTest: Fix regression in build-and-test timeout forwarding e770b1b8 CTest: Fix regression in build-and-test timeout compuatation Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: dublet <github@dublet.org> Merge-request: !1574
| * CTest: Use integer-representable value for "infinite" timeoutBrad King2017-12-111-6/+2
| | | | | | | | | | | | | | | | Refactoring in commit 66419bc046 (CTest: convert timeouts to std::chrono::duration, 2017-11-20) changed out "infinite" timeout to a value not representable by a 64-bit integer. This causes undefined behavior when e.g. KWSys Process converts the duration to a `long` to interact with system APIs. Use the old `1.0e7` maximum value.
| * CTest: Simplify std::chrono::duration<double> conversion to doubleBrad King2017-12-081-10/+2
| | | | | | | | | | | | | | | | | | The ratio of ticks to seconds for this type is 1, so we can just use its `count()` directly. This also avoids converting through the integer representation of `std::chrono::milliseconds`, which has a much smaller allowed range. Drop our `cmsysProcess_SetTimeout` wrapper as it is now very thin.