summaryrefslogtreecommitdiffstats
path: root/Source/CTest
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-3117-80/+74
| | | | | | | | | | * 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-297-36/+25
|\ | | | | | | | | | | | | 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-267-36/+25
| | | | | | | | | | - Use `std::move` while inserting temporary results into vectors. - Change `push_back` to `emplace_back` where appropriate.
* | Merge topic 'ctest_start_function_scope'Brad King2018-01-293-3/+14
|\ \ | | | | | | | | | | | | | | | | | | | | | 13347740 Help: add release notes, documentation for CTEST_RUN_CURRENT_SCRIPT behavior 74092d92 cmCTestScriptHandler: Add new field ShouldRunCurrentScript Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1703
| * | cmCTestScriptHandler: Add new field ShouldRunCurrentScriptKyle Edwards2018-01-263-3/+14
| |/ | | | | | | | | | | | | | | | | | | This is to avoid scope issues with CTEST_RUN_CURRENT_SCRIPT. If ctest_start() is called within a function scope, the value of CTEST_RUN_CURRENT_SCRIPT that it sets doesn't make it to the global scope. With this change, ctest_start() no longer sets CTEST_RUN_CURRENT_SCRIPT, and instead sets a field directly in cmCTestScriptHandler. The old behavior of CTEST_RUN_CURRENT_SCRIPT has also been kept for projects and tests that rely on setting it.
* | Merge topic 'dedup-uv-signal-hack'Brad King2018-01-261-37/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | 3ec5f7c1 De-duplicate cmUVSignalHackRAII 1ad58d30 cmUVSignalHackRAII: Use nullptr instead of NULL Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1699
| * | De-duplicate cmUVSignalHackRAIIBrad King2018-01-251-37/+2
| | | | | | | | | | | | | | | | | | This was added separately in `cmCTestMultiProcessHandler` and `cmQtAutoGenerator`. Factor out the duplicate code into a common header for re-use.
| * | cmUVSignalHackRAII: Use nullptr instead of NULLBrad King2018-01-251-2/+2
| |/
* | Make use of std::chrono throughout every componentWouter Klouwen2018-01-232-7/+11
| | | | | | | | | | | | | | | | This commit continues the changes made in CTest to support std::chrono by applying it throughout every component where a duration was used. No functional change intended.
* | CTest: add safe conversion from cmDuration to integer typesWouter Klouwen2018-01-233-30/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | A problem area by recent refactoring of time to std::chrono has been the unsafe conversion from duration<double> to std::chrono::seconds, which is of an unspecified integer type. This commit adds a template function that for a given type provides a safe conversion, effectively clamping a duration<double> into what fits safely in that type. A specialisation for int and unsigned int are provided. It changes the protential problem areas to use this safe function.
* | CTest: introduce cmDurationWouter Klouwen2018-01-2316-76/+78
|/ | | | | | | | 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: Fix process output read error casesBrad King2018-01-171-0/+5
| | | | | | | The libuv documentation states that the stream read callback may be called with `nread == 0` for EAGAIN. Handle this gracefully. It also states that the callee is responsible for closing the stream on error. Always close the stream for `nread < 0`.
* CTest: Fix decoding of MBCS character split by bufferingBrad King2018-01-172-9/+10
| | | | | | Use a single `cmProcessOutput` instance persistently to decode all output of a test process so that partial character bytes can be buffered.
* CTest: Re-implement test process handling using libuvBryon Bean2018-01-106-195/+695
| | | | Co-Author: Brad King <brad.king@kitware.com>
* cmProcess: Use explicit enum for process exit exceptionBryon Bean2018-01-103-7/+33
| | | | Translate the values from KWSys Process.
* cmProcess: Use explicit enum for process stateBryon Bean2018-01-103-13/+40
| | | | Translate the values from KWSys Process.
* cmProcess: Remove unused ReportStatus methodBryon Bean2018-01-102-61/+0
|
* cmCTestRunTest: Modernize constructor and destructor declsBryon Bean2018-01-102-6/+3
|