summaryrefslogtreecommitdiffstats
path: root/Source/ctest.cxx
Commit message (Collapse)AuthorAgeFilesLines
* ctest: Add support for writing test results in JUnit XML formatZack Galbreath2021-04-261-0/+1
| | | | Addresses #18654
* ctest: Support multiple -L and -LE options to mean "AND"Adriaan de Groot2021-03-281-4/+6
| | | | Fixes: #21087
* ctest: Add support for '--prefix=<prefix>' form of the argumentBrad King2021-02-231-1/+2
| | | | | | | The main `cmake --preset` argument for configure presets supports both forms, so support it for `ctest --preset` too. Fixes: #21855
* cmake-presets: Add build and test presetsSam Freed2021-02-011-0/+2
| | | | Fixes: #21391
* Ctest: Support build tree on command lineAsit Dhal2020-12-171-0/+1
| | | | Fixes: #21268
* cmConsoleBuf: Factor out cout/cerr console buffer managementBrad King2020-10-141-9/+5
|
* clang-format: Fix include block order in ctest.cxx and cpack.cxxBrad King2020-10-141-4/+5
|
* ctest: add option --stop-on-failureJohnny Jazeix2020-04-201-0/+1
| | | | | | To stop the tests once one has failed Fixes: #16628
* Add --no-tests=<[error|ignore]> option to CTestStefan Dinkelacker2020-01-311-0/+2
| | | | | | | | | 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>
* Merge topic 'ctest-repeat'Craig Scott2019-11-191-3/+3
|\ | | | | | | | | | | | | 32c165d263 CTest: Consolidate '--repeat-* n' options as `--repeat *:n` Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4053
| * CTest: Consolidate '--repeat-* n' options as `--repeat *:n`Brad King2019-11-151-3/+3
| | | | | | | | | | | | | | 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.
* | Windows: Restore suppression of error report popups in CI buildsBrad King2019-11-151-1/+0
|/ | | | | | | | | | | | | On Windows, libuv uses `_CrtSetReportHook` to install a handler it uses to suppress assertions on invalid file descriptors in `_get_osfhandle`. This removes the handler we install in CI environments to suppress interactive popups. Move installation of our handler to after libuv is initialized so that our handler is actually used. Unfortunately this also removes libuv's handler and so may cause Debug builds under CI to abort on invalid file descriptors instead of simply converting them to `INVALID_HANDLE_VALUE`. If this becomes a problem we may need to modify libuv to make its hook more configurable.
* Merge branch 'backport-ctest-resource-groups'Brad King2019-11-051-1/+1
|\
| * CTest: Rename hardware -> resources for CMake variables, command optionsCraig Scott2019-11-051-1/+1
| | | | | | | | | | | | 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/+2
| | | | | | | | | | 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-2/+3
|/ | | | | | | | | 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/+1
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-3/+4
| | | | | 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-1/+1
|
* ctest: rename TRACK to GROUPZack Galbreath2019-08-221-1/+3
| | | | | | | | | | 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.
* Refactor: Convert all instances of CMAKE_BUILD_WITH_CMAKE to CMAKE_BOOTSTRAPKitware Robot2019-08-091-2/+2
|
* Ensure stdin, stdout, and stderr pipes are always openBrad King2019-05-021-0/+1
| | | | | | | | | | | | | On non-Windows platforms libuv assumes that file descriptors 0-2 are always used for standard pipes and never for anything else. Otherwise, libuv may re-use one of these descriptors and then fail an assertion when closing it. Similarly, On Windows platforms our ConsoleBuf implementation assumes that the standard handles are always open. If CMake is run with any standard pipes closed, open them with `/dev/null` or `NUL` to satisfy these assumptions. Fixes: #19219
* cmCTest: Use concrete accessor functions for TestingHandlersRegina Pfeifer2019-03-201-2/+1
|
* clang-tidy: Use emplaceRegina Pfeifer2019-01-171-1/+1
|
* CTest: Add --show-only[=format] option to print test infoJustin Goshi2019-01-101-1/+4
| | | | | | format can be 'human' to print the current text format or 'json-v1' to print the test object model in json format and is useful for IDEs who want to gather information about the tests. Defaults to 'human' format.
* Help: clarify documentation of ctest --timeoutRegina Pfeifer2018-12-091-1/+1
|
* ctest: Add option for live progress summary in terminalMichael Wegner2018-09-261-0/+1
|
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-40/+57
| | | | | | | | | | | | 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.
* Extend libuv file translate mode workaround to all executablesBrad King2018-01-231-0/+1
| | | | | | | | | | | | | | | Since libuv commit v1.14.1~7 (win: add uv__once_init() calls, 2017-08-30) the libuv initialization of the file translate mode may take place even if we do not use a uv loop. This change was included in our libuv update commit f4a26c748b (libuv 2018-01-19). Therefore use of libuv even through `cmSystemTools::GetRealPath` in any executable may trigger its file translate mode setting. Factor out the logic added to `cmake.exe` by commit v3.9.0-rc4~10^2 (cmake: Fix default file translate mode when using libuv, 2017-06-13) and re-use to initialize all executables. Issue: #16962
* cmCTest: Remove dead codeBetsy McPhail2017-11-071-2/+0
| | | | The option 'ctest-config' is ignored.
* Improve several occurrences of vector::push_back in loopsMatthias Maennich2017-09-281-0/+1
| | | | | | | Fix issues diagnosed by clang-tidy by pre-allocating the vector capacity before the loop [performance-inefficient-vector-operation]. Signed-off-by: Matthias Maennich <matthias@maennich.net>
* IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-261-1/+0
| | | | Also remove `#include "cmConfigure.h"` from most source files.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-5/+5
|
* Display subproject timing summaryBetsy McPhail2017-07-101-0/+2
| | | | Use the '--no-subproject-summary' option to disable timing summary.
* ctest: remove unused cmake instanceDaniel Pfeifer2017-05-081-6/+0
|
* Add ctest options for limiting which tests fixtures addCraig Scott2017-05-011-0/+12
| | | | | The new options allow the user to restrict the setup and cleanup tests automatically added for fixtures.
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-3/+3
| | | | | | | | | | | | | 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'
* Windows: Use UTF-8 for pipes in CMake, CTest and CPackDāvis Mosāns2016-11-291-0/+2
| | | | | Applications which process CMake output will need to decode it as UTF-8 instead of console's codepage.
* Enable Unicode output to Windows consolesDāvis Mosāns2016-10-261-0/+8
| | | | | | Use KWSys ConsoleBuf to replace the `streambuf` on `std::cout` and `std::cerr` so that process output can be encoded correctly for display in a Windows console.
* Do not define cout/cerr preprocessor symbolsBrad King2016-10-041-4/+0
| | | | | | Apply the change from commit bd3d0eaf (cmCTest: don't redefine cout and cerr, 2016-09-01) to the rest of ctest and cpack. These definitions are no longer needed because our conventions are well established.
* 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.
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-6/+11
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-5/+6
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-123/+113
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * 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.
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | Modern editors provide plenty of ways to visually separate functions. Drop the explicit comments that previously served this purpose. Use the following command to automate the change: $ git ls-files -z -- \ "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" | egrep -z -v "^Source/cmCommandArgumentLexer\." | egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmDependsJavaLexer\." | egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmExprLexer\." | egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmFortranLexer\." | egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmListFileLexer\." | egrep -z -v "^Source/cm_sha2" | egrep -z -v "^Source/(kwsys|CursesDialog/form)/" | egrep -z -v "^Utilities/(KW|cm).*/" | xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}' This avoids modifying third-party sources and generated sources.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* CTest: Add options to limit output of passed and failed testsRoman Wüger2015-09-181-0/+4
| | | | | | | | | | Add ctest command-line options: --test-output-size-passed <n> --test-output-size-failed <n> to set the amount of test output to store in Test.xml as a command-line dashboard client.
* ctest: Optionally avoid starting tests that may exceed a given CPU loadBetsy McPhail2015-06-301-0/+1
| | | | | | | | | | | | | | Add a TestLoad setting to CTest that can be set via a new --test-load command-line option, CTEST_TEST_LOAD variable, or TEST_LOAD option to the ctest_test command. Teach cmCTestMultiProcessHandler to measure the CPU load and avoid starting tests that may take more than the spare load currently available. The expression <current_load> + <test_processors> <= <max-load> must be true to start a new test. Co-Author: Zack Galbreath <zack.galbreath@kitware.com>
* cmState: Compute and store directory components.Stephen Kelly2015-05-161-0/+2
| | | | | | | | | | | | | There is no need to duplicate these in all cmLocalGenerators. Rename the symbols according to current conventions. Add explicit calls to Set{Source,Binary}Directory with empty strings in order to trigger the population of the components containers with the current working directory in cmLocalGenerator. Having directories set to empty is a special case in CMake, which is relied on for the `if(CMAKE_BINARY_DIR)` condition at the end of CMakeDetermineSystem.cmake.
* ctest: Add a new --repeat-until-fail optionBill Hoffman2015-03-231-0/+2
| | | | | This option tells ctest to run each test N times until the test fails or the N times have run. This is useful for finding random failing tests.