summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Single location for cmProp typedefVitaly Stakhovsky2020-06-011-0/+1
|
* Refactoring: Third-parties public headers are under cm3p prefixMarc Chevrier2020-05-071-3/+3
| | | | Fixes: #20666
* Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view>Marc Chevrier2020-04-301-2/+1
|
* ctest: add option --stop-on-failureJohnny Jazeix2020-04-201-0/+15
| | | | | | To stop the tests once one has failed Fixes: #16628
* clang-tidy: address bugprone-branch-clone lintsBen Boeckel2020-04-131-7/+5
| | | | | | | | | Arguably, many of these are bugs in `clang-tidy`. An if/else tree with other conditionals between cloned blocks may be relying on the intermediate logic to fall out of the case and inverting this logic may be non-trivial. See: https://bugs.llvm.org/show_bug.cgi?id=44165
* Merge topic 'cmprop-getglobalprop'Brad King2020-03-271-7/+6
|\ | | | | | | | | | | | | c84cf42897 cmState::GetGlobalProperty: return cmProp Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4521
| * cmState::GetGlobalProperty: return cmPropVitaly Stakhovsky2020-03-251-7/+6
| |
* | use _s to construct static string_views at several placesRolf Eike Beer2020-03-241-62/+67
| | | | | | | | This should avoid the runtime strlen() call.
* | use string_views to avoid memory allocationsRolf Eike Beer2020-03-241-3/+6
| |
* | replace std::string::substr() with operations that do not allocate memoryRolf Eike Beer2020-03-231-2/+2
| | | | | | | | | | Modify the original string instead of creating a new copy with substr() when it is not used for anything else afterwards.
* | replace "std::string::find(x) == 0" with cmHasPrefix()Rolf Eike Beer2020-03-231-1/+1
| |
* | allow cmCTest::CleanString() to skip input charactersRolf Eike Beer2020-03-231-3/+4
| | | | | | | | | | This entirely avoids that one needs to call std::string::substr() for the input.
* | CTest: avoid repeated string comparesRolf Eike Beer2020-03-231-80/+63
|/ | | | | | Only one key can match per iteration, avoid any further compares when one match was already found. While at it entirely avoid that the key and value strings are copied.
* Modernize memory managementMarc Chevrier2020-02-271-13/+8
| | | | Update internals of various classes
* Add --no-tests=<[error|ignore]> option to CTestStefan Dinkelacker2020-01-311-0/+20
| | | | | | | | | If no tests were found, the default behavior of CTest is to always log an error message but to return an error code in script mode only. This option unifies the behavior of CTest by either returning an error code if no tests were found or by ignoring it. Signed-off-by: Stefan Dinkelacker <s.dinkelacker@dkfz-heidelberg.de>
* Refactoring: use append functions from cmext/algorithmMarc Chevrier2019-12-171-5/+5
|
* CTest: Consolidate '--repeat-* n' options as `--repeat *:n`Brad King2019-11-151-34/+24
| | | | | | | Combine `--repeat-until-fail`, `--repeat-until-pass`, and `--repeat-after-timeout` to create a single `--repeat <mode>:<n>` option. Retain `--repeat-until-fail` too because that has been available in previous releases.
* CTest: Rename internal APIs for --repeat optionsBrad King2019-11-071-15/+15
| | | | Replace use of the term "rerun" with "repeat" to match the public names.
* Merge branch 'backport-ctest-resource-groups'Brad King2019-11-051-3/+3
|\
| * CTest: Rename hardware -> resources for CMake variables, command optionsCraig Scott2019-11-051-3/+3
| | | | | | | | | | | | Only changes the user-visible effects of renaming hardware allocation to resource allocation. Code changes are the minimum needed to achieve that.
* | ctest: Add --repeat-after-timeout optionBrad King2019-10-291-0/+22
| | | | | | | | | | Add an option to re-run tests if they timeout. This will help tolerate sporadic timeouts on busy machines.
* | ctest: Add --repeat-until-pass optionBrad King2019-10-291-4/+31
|/ | | | | | | | | Add an option to re-run tests if they fail. This will help tolerate sporadic failures. Issue: #17010 Co-Author: Ben Boeckel <ben.boeckel@kitware.com> Co-Author: Chuck Atkins <chuck.atkins@kitware.com>
* CTest: Allocate hardware to testsKyle Edwards2019-10-021-0/+9
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-8/+10
| | | | | 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.
* cmstd: Modernize CMake system headersMarc Chevrier2019-09-201-1/+1
| | | | | | | | | | | | | | Provide a standardized way to handle the C++ "standard" headers customized to be used with current CMake C++ standard constraints. Offer under directory `cm` headers which can be used as direct replacements of the standard ones. For example: #include <cm/string_view> can be used safely for CMake development in place of the `<string_view>` standard header. Fixes: #19491
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-5/+5
|
* clang-tidy: modernize-use-autoRegina Pfeifer2019-09-101-2/+1
| | | | | | 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.
* Merge topic 'ctest-CLICOLOR_FORCE'Brad King2019-08-271-0/+5
|\ | | | | | | | | | | | | 074a6a8cf6 CTest: Add env var CLICOLOR_FORCE to force color output Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3733
| * CTest: Add env var CLICOLOR_FORCE to force color outputMarin Baron2019-08-261-0/+5
| | | | | | | | | | Base impl on `Source/kwsys/Terminal.c:kwsysTerminalStreamIsVT100`. This enables pipes/logs with colors.
* | Merge topic 'source_sweep_ostringstream_single'Brad King2019-08-261-3/+1
|\ \ | | | | | | | | | | | | | | | | | | 3b2b02825d Source sweep: Replace std::ostringstream when used with a single append Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3726
| * | Source sweep: Replace std::ostringstream when used with a single appendSebastian Holtermann2019-08-231-3/+1
| |/ | | | | | | | | | | | | This replaces `std::ostringstream`, when it is written to only once. If the single written argument was numeric, `std::to_string` is used instead. Otherwise, the single written argument is used directly instead of the `std::ostringstream::str()` invocation.
* | Merge topic 'source_sweep_cmExpandedList'Brad King2019-08-261-4/+2
|\ \ | | | | | | | | | | | | | | | | | | aaf59120bf Source sweep: Replace cmExpandList with the shorter cmExpandedList Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3725
| * | Source sweep: Replace cmExpandList with the shorter cmExpandedListSebastian Holtermann2019-08-231-4/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | This replaces the code pattern ``` std::vector<std::string> args; cmExpandList(valueStr, args, ...) ``` with ``` std::vector<std::string> args = cmExpandedList(valueStr, ...) ```
* | Merge topic 'group_not_track'Brad King2019-08-261-21/+27
|\ \ | |/ |/| | | | | | | | | | | 2a71a0390c ctest: rename TRACK to GROUP Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Zack Galbreath <zack.galbreath@kitware.com> Merge-request: !3707
| * ctest: rename TRACK to GROUPZack Galbreath2019-08-221-21/+27
| | | | | | | | | | | | | | | | | | | | Update command-line options, script variables, and documentation to use the term "group" instead of "track". The old terms are still available for now, but they are now undocumented. This makes our terminology more consistent with CDash. The goal of this change is to make it more clear to our users how CTest and CDash interact with each other.
* | Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-18/+11
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)`
* Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-5/+4
| | | | | | | | | This replaces invocations of - `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn` - `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND` - `cmSystemTools::IsOn` with `cmIsOn` - `cmSystemTools::IsOff` with `cmIsOff`
* Merge topic 'cmExpandList'Kyle Edwards2019-08-161-3/+3
|\ | | | | | | | | | | | | | | | | 2f6495e24e cmSystemTools: Remove ExpandListArgument methods f4f3c68926 Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgument ff42dec891 cmStringAlgorithms: Add cmExpandList functions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3682
| * Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-3/+3
| |
* | Merge topic 'cmStringAlgorithms_ulong'Kyle Edwards2019-08-161-5/+5
|\ \ | |/ |/| | | | | | | | | 935fbe0b04 cmStringAlgorithms: Add cmStrToLong and cmStrToULong Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3681
| * cmStringAlgorithms: Add cmStrToLong and cmStrToULongSebastian Holtermann2019-08-101-5/+5
| | | | | | | | | | | | | | | | This adds the following functions to cmStringAlgorithms: - `cmStrToLong`: moved from `cmSystemTools::StringToLong` - `cmStrToULong`: moved from `cmSystemTools::StringToULong` Overloads of the given functions for `std::string` are added as well.
* | Refactor: Convert all instances of CMAKE_BUILD_WITH_CMAKE to CMAKE_BOOTSTRAPKitware Robot2019-08-091-1/+1
|/
* Cleanups: Use cmHas{Prefix,Suffix} instead of String{Starts,Ends}WithSebastian Holtermann2019-08-011-2/+2
|
* cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.hSebastian Holtermann2019-07-291-0/+1
| | | | | This adds the `cmStringAlgorithms.h` header and moves all string functions from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
* Introduce memory management helper: cm_memory.hxxMarc Chevrier2019-07-141-1/+2
|
* Merge topic 'cleanup-statics-stream-flush'Craig Scott2019-07-131-14/+10
|\ | | | | | | | | | | | | | | | | | | af75ab7645 Refactor: Use anonymous namespace instead of `static`s in `cpack.cxx` 0db458a0ce Refactor: Use anonymous namespace instead of `static`s 0328b64efd Refactor: Remove one-time used macros b821f9ad62 Refactor: Optimize some stream output operations Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3535
| * Refactor: Optimize some stream output operationsAlex Turbov2019-07-091-14/+10
| | | | | | | | | | | | | | - remove redundant `std::flush` right after `std::endl` - join some string literals Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
* | 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.
* cmSystemTools: std::string parameters for tar functionsVitaly Stakhovsky2019-05-291-2/+2
|
* Use cmAppend to append ranges to std::vector instancesSebastian Holtermann2019-05-231-5/+4
|