summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestCoverageHandler.cxx
Commit message (Collapse)AuthorAgeFilesLines
* CTest: Exit coverage handling early if no binary dirJoseph Snyder2021-06-021-0/+7
| | | | | | | | Check for the existence of the Binary directory string before checking for coverage files. If the directory is not specified, write an error message and do not do any checking. Fixes: #22102
* clang-tidy: fix `readability-make-member-function-const` warningsBen Boeckel2021-01-271-1/+1
|
* Code style: add missed explicit 'this->'Oleksandr Koval2021-01-051-4/+4
| | | | | CMake uses explicit 'this->' style. Using custom clang-tidy check we can detect and fix places where 'this->' was missed.
* cmCTest: Members accept std::string parametersVitaly Stakhovsky2020-07-271-11/+10
|
* CTest: Handle non-coverage lines in gcov filesTobias Ellinghaus2020-05-291-2/+8
| | | | This implements a TODO in gcov file handling.
* replace "substr(0, xx) ==" with cmHasPrefix()Rolf Eike Beer2020-03-231-3/+4
|
* PyCoverage: avoid repeated string splitting, especially for uncovered linesRolf Eike Beer2020-03-231-20/+17
|
* Refactoring: use append functions from cmext/algorithmMarc Chevrier2019-12-171-6/+7
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-14/+15
| | | | | 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.
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-2/+2
|
* clang-tidy: modernize-use-autoRegina Pfeifer2019-09-101-7/+6
| | | | | | 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.
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-23/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)`
* avoid adding multiple consecutive string literals to std::stringRolf Eike Beer2019-08-181-2/+1
| | | | While at it change some single character additions to be of type char.
* Cleanups: Use cmHas{Prefix,Suffix} instead of String{Starts,Ends}WithSebastian Holtermann2019-08-011-1/+2
|
* Use cmAppend to append ranges to std::vector instancesSebastian Holtermann2019-05-231-10/+6
|
* cmSystemTools: More functions accept `std::string` paramsVitaly Stakhovsky2019-02-201-2/+2
|
* Delete some default constructors and assignment operatorsAlbert Astals Cid2019-02-151-0/+5
| | | | | | They are unused, but if someone used them they would lead to problems since they would copy the internal raw pointers and the destructor would cause double delete
* cmSystemTools: More methods accept `std::string` paramsVitaly Stakhovsky2019-02-111-7/+5
|
* Prefer front/back/data over dereferencing begin/rbegin iterArtur Ryt2019-02-061-1/+1
| | | | Changed for sequenced containers: vector, list, string and array
* Merge topic 'tidy-use-equals-default'Brad King2019-01-291-3/+1
|\ | | | | | | | | | | | | | | | | 094f01d0f0 cleanup: Prefer compiler provided special member functions 55671b41d2 clang-tidy: Use `= default` Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Brad King <brad.king@kitware.com> Merge-request: !2841
| * clang-tidy: Use `= default`Regina Pfeifer2019-01-251-3/+1
| | | | | | | | | | | | Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and `Source/cmUVHandlePtr.h` where a few older compilers require a user-defined default constructor (with `{}`).
* | Merge topic 'cmake-files-directory'Brad King2019-01-251-2/+1
|\ \ | |/ |/| | | | | | | | | | | 3e867ed400 cmake: inlined files dir constant and removed it from cmake.h Acked-by: Kitware Robot <kwrobot@kitware.com> Rejected-by: vvs31415 <vstakhovsky@fastmail.com> Merge-request: !2655
| * cmake: inlined files dir constant and removed it from cmake.hBruno Manganelli2019-01-211-2/+1
| |
* | clang-tidy: Use emplaceRegina Pfeifer2019-01-171-5/+4
|/
* Fix most clang -Wextra-semi-stmt warnings in C++ filesSean McBride2019-01-151-1/+0
| | | | Suppress one in code generated by flex.
* Remove unnecessary c_str() in RegularExpression::find callsVitaly Stakhovsky2018-08-071-8/+8
|
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-50/+59
| | | | | | | | | | | | 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.
* CTest: The "Could not find gcov." message should not be a warningBetsy McPhail2018-03-281-1/+2
| | | | It now matches the log level of other coverage messages.
* cmWorkingDirectory: Check success of current dir changesCraig Scott2018-03-081-1/+21
|
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-10/+10
| | | | | | | | | | * 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: introduce cmDurationWouter Klouwen2018-01-231-10/+11
| | | | | | | | 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: Simplify std::chrono::duration<double> conversion to doubleBrad King2017-12-081-2/+1
| | | | | | | | | 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: convert timeouts to std::chrono::durationWouter Klouwen2017-12-041-9/+12
| | | | | | | | | 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-10/+6
| | | | | | | | | | | | | | | | | | 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-11/+14
| | | | | | | | | | | | 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
* Merge topic 'CTest-cov-string'Brad King2017-09-201-9/+8
|\ | | | | | | | | | | | | 062776e7 CTest: pass std::string to cmCTestCoverageHandler::ShouldIDoCoverage() Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1290
| * CTest: pass std::string to cmCTestCoverageHandler::ShouldIDoCoverage()Rolf Eike Beer2017-09-191-9/+8
| | | | | | | | Avoid needless conversion back and forth.
* | Merge topic 'CTest-crash-missing-glob'Brad King2017-09-201-0/+2
|\ \ | |/ |/| | | | | | | | | 6db63012 CTest: fix crash if source file for coverage cannot be found Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1289
| * CTest: fix crash if source file for coverage cannot be foundRolf Eike Beer2017-09-191-0/+2
| | | | | | | | | | | | The opened XML elements were not closed, so an assert was triggered when the file was finally closed. If CMake is built with assertions disabled then an invalid XML file will be produced.
* | Merge topic 'string-clear'Brad King2017-09-191-5/+5
|\ \ | | | | | | | | | | | | | | | | | | 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-5/+5
| | |
* | | pass arguments as vector to cmCTest::RunCommand()Rolf Eike Beer2017-09-151-9/+36
|/ / | | | | | | | | | | | | The only 2 callers took care to construct a properly escaped string, but not using the documented way, and that string was passed only to be immediately split into tokens again. Start with a vector and join it only for logging, avoiding needless quotes during that.
* | Meta: modernize old-fashioned loops to range-based `for` (CTest).Pavel Solodovnikov2017-09-141-109/+79
| | | | | | | | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* | Use C++11 nullptrDaniel Pfeifer2017-08-241-5/+5
|/
* Access string npos without instancePavel Solodovnikov2017-06-011-6/+7
|
* clang-tidy: remove else after break and continueDaniel Pfeifer2017-04-211-1/+2
|
* 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'
* cmWorkingDirectory: use the new classBen Boeckel2017-03-061-15/+5
| | | | | | 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.
* cmCTest, cmCTestCoverageHandler: remove cwd danceBen Boeckel2017-03-061-5/+0
| | | | The working directory changes here didn't really accomplish anything.