summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestTestHandler.cxx
Commit message (Collapse)AuthorAgeFilesLines
* IWYU: Fix handling of <memory> standard headerBrad King2019-07-101-1/+1
| | | | | | | | 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.
* Modernize: Prefer .substr in place of .c_str() + intArtur Ryt2019-03-301-2/+2
| | | | | | A lot of temporary/local strings were created out of C-strings substr can utilize current string size, so in theory be a little more efficient.
* cmSystemTools::RunSingleCommand: Accept std::string argumentVitaly Stakhovsky2019-02-061-1/+1
|
* Merge topic 'read-list-file'Brad King2019-01-211-2/+2
|\ | | | | | | | | | | | | 25caf7bafe cmMakefile::ReadListFile() accepts std::string argument Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2821
| * cmMakefile::ReadListFile() accepts std::string argumentVitaly Stakhovsky2019-01-171-2/+2
| | | | | | | | Same for cmMakefile::ReadDependentFile(); some cleanup
* | clang-tidy: Use emplaceRegina Pfeifer2019-01-171-7/+7
|/
* Properties: Add CMAKE_ROLE global propertyKyle Edwards2019-01-171-1/+1
| | | | | This property allows scripts to determine whether they're in project mode, script mode, find-package mode, CTest, or CPack.
* TestGenerator: Record support file and line where test was addedJustin Goshi2019-01-081-0/+26
| | | | | Add internal test properties that ctest can use to report where the test was added in CMake code.
* clang-tidy: Enable checks from bugprone setRegina Pfeifer2018-11-211-2/+2
|
* CTest: Add colored output on tests summary where supportedSylvain Joubert2018-11-091-9/+30
| | | | | | | | - Number of passed/failed tests is colored according to the whole outcome - Individual listed tested are colored according to their completion status: * Disabled: blue * Failed: red * Not Run: yellow
* Merge topic 'set_directory_properties-script-mode'Brad King2018-10-301-0/+1
|\ | | | | | | | | | | | | 50572d638b set_directory_properties: Restore in script mode Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2544
| * set_directory_properties: Restore in script modeBrad King2018-10-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Since commit v3.10.0-rc1~391^2~3 (Add directory property 'LABELS' and CMAKE_DIRECTORY_LABELS variable, 2017-06-23) this command was accidentally not allowed in script mode. It was dropped because `ctest -S` mode needs to start with CMake's normal script mode and then replace the `set_directory_properties` implementation. Restore the normal `set_directory_properties` in script mode and then add special logic to replace it in ctest. Also add a test case. Fixes: #18523
* | Remove unnecessary c_str() callsVitaly Stakhovsky2018-09-051-4/+4
| | | | | | | | Use the new IsOn(),IsOff() overloads.
* | Remove unnecessary c_str() in RegularExpression::find callsVitaly Stakhovsky2018-08-071-3/+3
| |
* | Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-46/+63
| | | | | | | | | | | | | | | | | | | | | | | | 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-1/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+6
| | |
* | | 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
|