summaryrefslogtreecommitdiffstats
path: root/Source/CTest
Commit message (Collapse)AuthorAgeFilesLines
* CTest: Restore inheritance of stdin by test processesBrad King2018-11-151-1/+2
| | | | | | | | | | | Since commit v3.11.0-rc1~117^2 (CTest: Re-implement test process handling using libuv, 2017-12-10) we do not give the child test processes any stdin. Prior to that change we let the child test processes inherit stdin from ctest itself. Tests that run serially might be able to use the real stdin meaningfully, so restore that behavior and add a test case. Fixes: #18591
* Merge branch 'set_directory_properties-script-mode' into release-3.13Brad King2018-10-291-0/+1
|\ | | | | | | 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
* | Fix misc. typosluz.paz2018-10-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via `codespell -q 3 -I ../cmake-whitelist.txt --skip="./Utilities"` where the whitelist consists of ``` aci ans behaviour buil convertor dum earch ect emmited emmitted helpfull iff isnt ith lowercased mose nd nknown nto objext ot pathes pevents splitted substract superceded supercedes te tim todays uint upto whitespaces ```
* | Merge topic 'ctest-num-width'Brad King2018-10-031-2/+6
|\ \ | | | | | | | | | | | | | | | | | | 6d28884617 cmCTestRunTest: Avoid float/int conversions in number width logic Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2433
| * | cmCTestRunTest: Avoid float/int conversions in number width logicBrad King2018-10-021-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use of `std::log10` added by commit 02c5091c90 (cmCTestRunTest: Simplify number width computation, 2018-09-08) broke our number width computation on some platforms where static_cast<int>(std::log10(static_cast<size_t>(10))) somehow produces `0` instead of `1`. Re-implement the logic to avoid floating-point computations.
* | | Merge topic 'no_buildid_for_files'Brad King2018-10-011-20/+28
|\ \ \ | |/ / |/| | | | | | | | | | | | | | c49d13f94b ctest: only create buildid when submitting from Testing/ dir Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2423
| * | ctest: only create buildid when submitting from Testing/ dirZack Galbreath2018-09-281-20/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 7f530cc we taught CTest to pass extra information to CDash at submit time. This extra info is used by CDash to initialize a buildid. `ctest_submit(FILES)` can be used to send specific files to CDash. These files are not necessarily associated with the build currently being performed. For this reason, we modify the behavior of ctest_submit() to only specify this extra info when we are submitting files from the current build's Testing directory.
* | | Merge topic 'add_progress_summary_console_logging_mode'Brad King2018-10-013-58/+111
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b3d5b8b3fb ctest: Add option for live progress summary in terminal 62fbe5002a cmCTestRunTest: Thread number of completed tests through start APIs 02c5091c90 cmCTestRunTest: Simplify number width computation 6a285bb737 cmCTestRunTest: Buffer test result output before printing Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2240
| * | | ctest: Add option for live progress summary in terminalMichael Wegner2018-09-262-18/+75
| | | |
| * | | cmCTestRunTest: Thread number of completed tests through start APIsMichael Wegner2018-09-253-7/+8
| | | |
| * | | cmCTestRunTest: Simplify number width computationMichael Wegner2018-09-251-8/+2
| | | | | | | | | | | | | | | | Use a real logarithm implementation.
| * | | cmCTestRunTest: Buffer test result output before printingMichael Wegner2018-09-251-28/+29
| | | |
* | | | ctest: Fix generator platform under --build-nocmakeBrad King2018-09-251-3/+9
| |/ / |/| | | | | | | | | | | | | | | | | | | | When constructing a global generator instance in `--build-and-test` mode we need to set the platform passed by `--build-generator-platform` directly on the generator. The old code that set it on the `cmake` class instance did nothing because that only affects cache initialization, which is not done by `--build-nocmake`.
* | | Merge topic 'ctest-more_submit_params'Brad King2018-09-191-0/+23
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 7f530cc54e ctest_submit: pass additional info to CDash Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2380
| * | | ctest_submit: pass additional info to CDashZack Galbreath2018-09-171-0/+23
| | | | | | | | | | | | | | | | | | | | Specify buildname, site, and buildstamp to CDash upon submission. CDash will use this extra info to assign and report back a buildid.
* | | | Merge topic 'getsafedef-stdstring'Brad King2018-09-181-2/+2
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | f4ff60a803 cmMakefile: Make GetSafeDefinition return std::string const& Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2350
| * | | cmMakefile: Make GetSafeDefinition return std::string const&Vitaly Stakhovsky2018-09-181-2/+2
| |/ /
* | | CTest: Improve stop-time implementationBrad King2018-09-124-18/+44
|/ / | | | | | | | | | | | | | | | | | | The CTestTestStopTime test has been failing sporadically because the stop time causes the first internal test to have a timeout short enough that we might hit it and start the second test just before the stop time is reached. Instead we should track when a timeout is shortened in order to stay within the stop time. If a test times out for this reason then we should consider the stop time reached and not start any more tests.
* | Merge topic 'ctest-fix-test-load'Brad King2018-09-112-20/+44
|\ \ | | | | | | | | | | | | | | | | | | 292ec157b6 CTest: Fix --test-load regression Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2362
| * | CTest: Fix --test-load regressionBrad King2018-09-102-20/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `ctest --test-load` option is implemented in `StartNextTests` by not starting any tests when the load is too high and instead sleeping and then returning. Prior to commit v3.11.0-rc1~117^2 (CTest: Re-implement test process handling using libuv, 2017-12-10) our outer loop in `RunTests` would immediately call `StartNextTests` again. However, now the `uv_run` loop may simply terminate if there are no tests running because no events are left pending. Fix this by converting the sleep in `StartNextTests` into a libuv timer that it starts instead. This avoids leaving `uv_run` with no pending events. In the case that there are other running tests this also allows CTest to detect when they finish even if it during the wait period where we previously slept. This regression was not caught by the test suite because it only verified that we do not start new tests when the load was too high and not that we proceed to start tests when the load drops. Revise the test suite to cover both. Fixes: #18338
* | | Remove unnecessary c_str() callsVitaly Stakhovsky2018-09-054-7/+7
| | | | | | | | | | | | Use the new IsOn(),IsOff() overloads.
* | | Merge topic 'no-sanitizer-logfile'Brad King2018-08-311-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 5aaaee5e9e ctest_memcheck: Change failure to find log file from error to warning Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2323
| * | | ctest_memcheck: Change failure to find log file from error to warningBetsy McPhail2018-08-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sanitizers do not create a log file when no defects are found. Therefore, it is currently impossible for ctest_memcheck to set both `CAPTURE_CMAKE_ERROR` and `RETURN_VALUE` to zero. With defects, `CAPTURE_CMAKE_ERROR`=0 and `RETURN_VALUE`=-1, as expected. With no defects, `CAPTURE_CMAKE_ERROR`=-1 and `RETURN_VALUE`=0.
* | | | CTest: Add error exception for sphinx-build WARNING messagesTim2018-08-301-0/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sphinx-build warnings look like this: ../path/to/file.rst:105: WARNING: This is not an error. CTest detects these as errors by this regex: ([^ :]+):([0-9]+): ([^ \\t]) Add an exception as we already have for lower-case `: warning`.
* | | ctest: allow cdash submissions using alternate authentication methodsClinton Stimpson2018-08-171-0/+4
| | |
* | | Merge topic 'cleanup-find-cstr'Brad King2018-08-095-18/+18
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 69ca85cc7f Remove unnecessary c_str() in RegularExpression::find calls Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2271
| * | | Remove unnecessary c_str() in RegularExpression::find callsVitaly Stakhovsky2018-08-075-18/+18
| | | |
* | | | cmGeneratedFileStream: clang-tidy applied to remove redundant ``c_str`` callsSebastian Holtermann2018-08-074-6/+6
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After changing the ``cmGeneratedFileStream`` methods to accept ``std::string const&`` instead of ``const char*`` we don't need to call ``std::string::c_str`` anymore when passing a ``std::string`` to a ``cmGeneratedFileStream`` method. This patch removes all redundant ``std::string::c_str`` calls when passing a string to a ``cmGeneratedFileStream`` method. It was generated by building CMake with clang-tidy enabled using the following options: -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-4.0;-checks=-*,readability-redundant-string-cstr;-fix;-fix-errors
* | | Merge topic 'ctest_submit-https'Brad King2018-06-292-3/+5
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | 71f27c04b0 ctest_submit: show headers as debug info 4464ef21da ctest_submit: Check CA file during CDASH_UPLOAD Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2171
| * | ctest_submit: show headers as debug infoZack Galbreath2018-06-272-3/+3
| | | | | | | | | | | | | | | | | | | | | Hide any headers specified by `ctest_submit(HTTPHEADER ...)` unless ctest is run with --debug. This option is used to present bearer tokens to CDash. We do not want to inadvertently expose this secret data in the console output log.
| * | ctest_submit: Check CA file during CDASH_UPLOADZack Galbreath2018-06-271-0/+2
| | | | | | | | | | | | | | | | | | | | | This fixes a bug where ctest(SUBMIT CDASH_UPLOAD ...) would fail when attemping to submit to a site bearing a genuine SSL certificate. This code path was missing a call to cmCurlSetCAInfo() which loads the certificate authority file.
* | | Update use of KWSys SystemTools::SplitString for new signatureBrad King2018-06-221-3/+2
|/ /
* | Fix misc. typosluz.paz2018-06-043-3/+3
| | | | | | | | Found via `codespell` and `grep`
* | Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-0131-452/+573
| | | | | | | | | | | | | | | | | | | | | | | | 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 'parallel_build_option'Brad King2018-05-291-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | 1ab3881ec9 cmake: Add options for parallel builds to --build mode Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Henry Schreiner <henryschreineriii@gmail.com> Merge-request: !1962
| * | cmake: Add options for parallel builds to --build modeFlorian Maushart2018-05-251-3/+3
| | | | | | | | | | | | | | | | | | | | | While we already support `cmake --build . -- -j`, the options after `--` are specific to the native build tool. Add new options `--parallel [<N>]` and `-j [<N>]` to abstract this and map to the proper option for the native build tool.
* | | Merge topic 'xml-element-enhance'Brad King2018-05-142-61/+51
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | ff13b0cdc2 cmCTestLaunch: use cmXMLElement for XML generation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2057
| * | | cmCTestLaunch: use cmXMLElement for XML generationVitaly Stakhovsky2018-05-112-61/+51
| |/ / | | | | | | | | | class `cmXMLElement` enhanced with more members; its use demonstrated
* | | ctest_start: read model from TAG fileKyle Edwards2018-05-091-27/+46
|/ / | | | | | | | | | | | | | | This change reworks ctest_start() so that simply calling ctest_start(APPEND) will read all the information from the TAG file. On top of that, it relaxes the argument parsing for ctest_start() to allow greater flexibility in the argument ordering, and the documentation for ctest_start() has been cleaned up.
* | cmCTestCurl: Fix UploadFile declared parameter namesjrp20142018-04-051-1/+1
| | | | | | | | Match the order used in the definition.
* | Merge topic 'gcov-warning-message'Brad King2018-03-291-1/+2
|\ \ | | | | | | | | | | | | | | | | | | ae1cbff07f CTest: The "Could not find gcov." message should not be a warning Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1894
| * | 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.
* | | Merge topic 'ctest_update-memory-problems'Brad King2018-03-281-1/+3
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 27f033550a ctest_update: Fix crash when handling svn externals 75e8af3354 cmSystemTools: Fix ParseArguments out-of-bounds read Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1893
| * | ctest_update: Fix crash when handling svn externalsBrad King2018-03-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring in commit v3.9.0-rc1~156^2 (c++: prefer vectors over lists, 2017-05-04) switched `cmCTestSVN::Repositories` from `std::list` to `std::vector`. This can cause re-allocation when svn externals are processed and break the `RootInfo` pointer that is supposed to point at the first repository element. Switch back to `std::list` so that the address remains stable. Fixes: #17854
* | | Merge topic 'cmWorkingDirectory_success_checking'Brad King2018-03-098-13/+139
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-088-13/+139
| |/ /
* | | Merge topic 'misc-typos'Brad King2018-03-081-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 32f6b7a43b Fix misc typos in documentation and comments Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1826
| * | | Fix misc typos in documentation and commentsluz.paz2018-03-071-1/+1
| |/ /
* | | CTest: Add options to control test process affinity to CPUsBrad King2018-03-058-6/+62
|/ / | | | | | | | | | | | | | | | | | | 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.