summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestTestHandler.cxx
Commit message (Collapse)AuthorAgeFilesLines
* CTest: Add options to control test process affinity to CPUsBrad King2018-03-051-0/+4
| | | | | | | | | | 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-6/+6
| | | | | | | | | | * 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.
* Merge topic 'reduce-temporaries'Brad King2018-01-291-9/+3
|\ | | | | | | | | | | | | c85bb007 Reduce allocation of temporary values on heap. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1698
| * Reduce allocation of temporary values on heap.Pavel Solodovnikov2018-01-261-9/+3
| | | | | | | | | | - Use `std::move` while inserting temporary results into vectors. - Change `push_back` to `emplace_back` where appropriate.
* | CTest: introduce cmDurationWouter Klouwen2018-01-231-9/+8
|/ | | | | | | | 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.
* Merge topic 'fix-ctest-chrono'Brad King2017-12-121-13/+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: Simplify std::chrono::duration<double> conversion to doubleBrad King2017-12-081-13/+4
| | | | | | | | | | | | | | | | | | 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.
* | CTest: Remove unfinished batch test modeBrad King2017-12-081-4/+1
|/ | | | | 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-6/+17
| | | | | | | | | 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.
* IWYU: Add mappings for std::enable_if on chrono durationsBrad King2017-11-281-1/+0
| | | | | | | | IWYU incorrectly classifies this internal STL type as not internal, and suggests including `<type_traits>` for it. Work around the problem by mapping the offending names to a file that we always include. See include-what-you-use issue 434.
* 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-9/+16
| | | | | | | | | | | | 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
* Retire std::auto_ptr and its macro CM_AUTO_PTRMatthias Maennich2017-09-251-5/+5
| | | | Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Replace empty-string comparisons with checking against `empty()`.Pavel Solodovnikov2017-09-211-2/+2
|
* Merge topic 'string-clear'Brad King2017-09-191-7/+7
|\ | | | | | | | | | | | | 5db3aac1 Meta: replace empty-string assignments with `clear()`. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1276
| * Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-151-7/+7
| |
* | Use C++11 override instead of CM_OVERRIDEBrad King2017-09-151-10/+10
|/ | | | | | | | 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-249/+181
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* CTest: Weight reported test times by PROCESSORS in summariesBill Hoffman2017-09-081-2/+2
| | | | | | This commit changes the times reported by labels and subprojects to be weighted by the PROCESSORS property. It is reported with `sec*proc` instead of just `sec`.
* CTest: Split out labels and subproject labels in summary outputBill Hoffman2017-09-081-97/+36
| | | | | | | | 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
|
* Replace C-style castsDaniel Pfeifer2017-08-271-3/+3
|
* Use C++11 nullptrDaniel Pfeifer2017-08-241-8/+8
|
* Add the test property PROCESSORS to the CDash xml as a NamedMeasurement.Bill Hoffman2017-07-181-0/+6
| | | | | | This commit forwards the test property PROCESSORS to CDash in the xml produced by ctest. This is to allow CDash to know how much processor time was allocated to a test.
* Merge topic 'better-exception-reporting'Brad King2017-07-131-12/+14
|\ | | | | | | | | | | | | 0c650f39 CTest: Report more detail about system exceptions in tests Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1046
| * CTest: Report more detail about system exceptions in testsBill Hoffman2017-07-121-12/+14
| | | | | | | | | | This passes the system exception string up to CDash and to the command line instead of just printing "other".
* | Display subproject timing summaryBetsy McPhail2017-07-101-1/+84
| | | | | | | | Use the '--no-subproject-summary' option to disable timing summary.
* | Add directory property 'LABELS' and CMAKE_DIRECTORY_LABELS variableBetsy McPhail2017-07-101-1/+94
| | | | | | | | | | The specified LABELS will be passed down to subdirectories as well as any targets or tests in the directory.
* | Add CTEST_LABELS_FOR_SUBPROJECTS as a CTest module and script variableBetsy McPhail2017-07-101-0/+1
|/ | | | | Use this variable to specify a list of labels that will be reported to CDash as subprojects.
* Access string npos without instancePavel Solodovnikov2017-06-011-6/+6
|
* cmCommand: remove unused methods from interface and all implementationsDaniel Pfeifer2017-05-111-20/+0
|
* CTest: use new methods for builtin commandsDaniel Pfeifer2017-05-111-5/+5
|
* cmake: initialize with Role that controls which commands to registerDaniel Pfeifer2017-05-081-1/+1
|
* Add ctest options for limiting which tests fixtures addCraig Scott2017-05-011-27/+101
| | | | | The new options allow the user to restrict the setup and cleanup tests automatically added for fixtures.
* Merge topic 'clang-tidy-2'Brad King2017-04-271-1/+1
|\ | | | | | | | | | | | | | | | | | | 9a740f1b cmCPackIFWInstaller: fix validation of WizardStyle option a168b4cc cmServerProtocol: avoid copies in range for 1ef22a26 cmDocumentation: use ofstream local variable ba8571ff clang-tidy: use operators for string comparison Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !738
| * clang-tidy: use operators for string comparisonDaniel Pfeifer2017-04-261-1/+1
| |
* | Merge topic 'ctest_test-ignore-skipped-tests'Brad King2017-04-271-4/+12
|\ \ | |/ |/| | | | | | | | | | | | | | | | | 851b6c15 cmCTestTestHandler: indicate why a test did not run 25a7f14f Help: add release notes ab8bbef9 cmCTestTestHandler: count skipped tests as disabled 202a44a4 cmCTestRunTest: do not count skipped tests as failed Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Craig Scott <craig.scott@crascit.com> Merge-request: !741
| * cmCTestTestHandler: indicate why a test did not runBen Boeckel2017-04-241-3/+8
| |
| * cmCTestTestHandler: count skipped tests as disabledBen Boeckel2017-04-241-1/+4
| | | | | | | | | | | | The `Skipped` status is basically a runtime version of the `Disabled` status (set as a property on the test by the configure step), so treat them the same.
* | cmCTestTestHandler: use pointers to static memoryBen Boeckel2017-04-211-4/+4
|/ | | | There's no need to reserve 100 bytes for each of these strings.
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-4/+4
| | | | | | | | | | | | | 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-7/+43
| | | | | | 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-7/+8
| | | | | | 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.
* cmWorkingDirectory: use the new classBen Boeckel2017-03-061-35/+35
| | | | | | These functions just need to change the directory for a block of code and then go back to the caller's expected location. Use cmWorkingDirectory to ensure that all return paths are handled.
* CTest: Ensure setup/cleanup ordering even when fixture not requiredCraig Scott2017-01-161-22/+60
| | | | Closes: #16558
* clang-tidy: apply readability-redundant-string-init fixesDaniel Pfeifer2016-12-121-2/+2
|
* cmCTestTestHandler: use multimapDaniel Pfeifer2016-12-031-27/+20
|
* iwyu: Fix more findingsDaniel Pfeifer2016-11-281-15/+15
|
* Make cmCommand not inherit from cmObjectDaniel Pfeifer2016-10-221-8/+0
|
* cmListFileCache: Remove cmState header includeStephen Kelly2016-10-191-0/+1
| | | | | Include it in dependents which have previously relied on it transitively.