summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestTestHandler.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
|
* Simplify CMake per-source license noticesBrad King2016-09-271-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* CTest: Add support for test fixturesCraig Scott2016-09-201-0/+187
| | | | | | | | | | | Add new test properties: * FIXTURES_SETUP * FIXTURES_CLEANUP * FIXTURES_REQUIRED to specify the roles and dependencies of tests providing/using test fixtures.
* CTest: fix include-what-you-use violationsDaniel Pfeifer2016-08-251-6/+12
|
* CTest: don't use else after returnDaniel Pfeifer2016-08-181-12/+10
|
* Make sure unnused parameters are /*named*/Daniel Pfeifer2016-08-161-11/+12
|
* Avoid using KWSys auto_ptr by adopting it ourselvesBrad King2016-06-291-1/+1
| | | | | | | | | | | | Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to our own implementation adopted from the KWSys auto_ptr implementation. Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers that do not warn about it. Automate the client site conversions: git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \ 's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
* use CM_NULLPTRDaniel Pfeifer2016-06-281-7/+8
|