summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestRunTest.cxx
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* | Merge topic 'fix-ctest-chrono'Brad King2017-12-071-3/+4
|\ \ | |/ | | | | | | | | | | | | be470278 CTest: Fix regression in test timeout compuatation Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: dublet <github@dublet.org> Merge-request: !1568
| * CTest: Fix regression in test timeout compuatationBrad King2017-12-071-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring in commit 66419bc046 (CTest: convert timeouts to std::chrono::duration, 2017-11-20) accidentally changed the logic used to compute the timeout for a test when it starts. It incorrectly limits the maximum possible timeout to 2 minutes rather than 2 minutes less than the total allowed test time remaining. Update the new logic to restore the original behavior. Avoid subtracting 2 minutes from our "infinite" timeout value to avoid creating very large timeouts that are not "infinite" and may exceed integer type ranges.
* | Merge topic 'ctest-chrono'Brad King2017-12-051-37/+73
|\ \ | |/ | | | | | | | | | | | | 66419bc0 CTest: convert timeouts to std::chrono::duration 923b8fad IWYU: Add mappings for std::enable_if on chrono durations Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1513
| * CTest: convert timeouts to std::chrono::durationWouter Klouwen2017-12-041-37/+73
| | | | | | | | | | | | | | | | | | 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: Check failed fixture dependencies before test command and argsCraig Scott2017-11-281-2/+6
|/
* CTest: use std::chrono::steady_clock for time keepingWouter Klouwen2017-11-141-4/+6
| | | | | | | | | | | | 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
* Replace empty-string comparisons with checking against `empty()`.Pavel Solodovnikov2017-09-211-2/+2
|
* Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-151-7/+7
|
* Meta: modernize old-fashioned loops to range-based `for` (CTest).Pavel Solodovnikov2017-09-141-40/+18
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* clang-format: format all code as Cpp11Daniel Pfeifer2017-08-301-3/+3
|
* IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-261-1/+0
| | | | Also remove `#include "cmConfigure.h"` from most source files.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-3/+3
|
* CTest: Report more detail about system exceptions in testsBill Hoffman2017-07-121-1/+4
| | | | | This passes the system exception string up to CDash and to the command line instead of just printing "other".
* Access string npos without instancePavel Solodovnikov2017-06-011-2/+1
|
* cmCTestRunTest: do not count skipped tests as failedBen Boeckel2017-04-211-2/+6
| | | | | | | Skipped tests are neither passed nor failed tests, but return codes are based only upon failed tests, so do not count them as such. Fixes #16822.
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-6/+6
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* Add 'DISABLED' test propertyBetsy McPhail2017-03-291-0/+20
| | | | | | When this property is set, the test is skipped and its status is automatically set to 'Not Run'. A disabled test will not be counted in the total number of tests and its completion status will be 'Disabled'.
* CTest: Improve 'Completion Status' reported to CDash for 'Not Run' testsBetsy McPhail2017-03-271-4/+7
| | | | | | Previously, the completion status of not run tests was always set to "Not Run". Make it more descriptive. This value is written to `Test.xml` and then displayed as 'Test Details' in CDash.