summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'ctest_start_function_scope'Brad King2018-01-291-0/+2
|\ | | | | | | | | | | | | | | 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-261-0/+2
| | | | | | | | | | | | | | | | | | | | 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.
* | CTest: introduce cmDurationWouter Klouwen2018-01-231-15/+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.
* cmCTest: Refactor stop time calculationsBrad King2018-01-081-5/+5
| | | | | Calculate the stop time up front instead of re-parsing its string for every test.
* cmCTest: Remove unused member LastStopTimeoutBrad King2018-01-081-2/+0
| | | | | | | This member was added by commit v2.8.2~285 (Better detection of stop_time being passed, 2010-03-19), but its logic has no effect. The member is only used for comparison against a value to which it was just assigned.
* Merge topic 'fix-ctest-chrono'Brad King2017-12-121-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | ba6caafa CTest: Use integer-representable value for "infinite" timeout 548e8f6f CTest: Simplify std::chrono::duration<double> conversion to double de0035fd cmCTestBuildAndTestHandler: Convert timeout to std::chrono::duration 687a26b7 CTest: Fix regression in build-and-test timeout forwarding e770b1b8 CTest: Fix regression in build-and-test timeout compuatation Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: dublet <github@dublet.org> Merge-request: !1574
| * CTest: Use integer-representable value for "infinite" timeoutBrad King2017-12-111-0/+2
| | | | | | | | | | | | | | | | Refactoring in commit 66419bc046 (CTest: convert timeouts to std::chrono::duration, 2017-11-20) changed out "infinite" timeout to a value not representable by a 64-bit integer. This causes undefined behavior when e.g. KWSys Process converts the duration to a `long` to interact with system APIs. Use the old `1.0e7` maximum value.
* | CTest: Remove unfinished batch test modeBrad King2017-12-081-4/+0
|/ | | | | This was partially implemented by commit v2.8.0~154 (Added some ctest batch capabilities, 2009-09-10) but never finished.
* CTest: convert timeouts to std::chrono::durationWouter Klouwen2017-12-041-11/+18
| | | | | | | | | 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.
* cmCTest: Remove dead codeBetsy McPhail2017-11-071-1/+0
| | | | The option 'ctest-config' is ignored.
* pass arguments as vector to cmCTest::RunCommand()Rolf Eike Beer2017-09-151-6/+1
| | | | | | | 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.
* IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-261-1/+1
| | | | Also remove `#include "cmConfigure.h"` from most source files.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-4/+4
|
* Display subproject timing summaryBetsy McPhail2017-07-101-0/+3
| | | | Use the '--no-subproject-summary' option to disable timing summary.
* Add CTEST_LABELS_FOR_SUBPROJECTS as a CTest module and script variableBetsy McPhail2017-07-101-0/+3
| | | | | Use this variable to specify a list of labels that will be reported to CDash as subprojects.
* 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'
* cmCTest: Move macros to bottom of fileDaniel Pfeifer2017-03-231-16/+16
| | | | | Since the class name is used in the macros, the iwyu tool gets confused wheter it needs a forward declaration or not.
* fix some include-what-you-use diagnosticsDaniel Pfeifer2017-02-171-1/+0
|
* clang-tidy: apply modernize-use-bool-literals fixesDaniel Pfeifer2016-12-121-2/+2
|
* clang-tidy: apply performance-unnecessary-value-param fixesDaniel Pfeifer2016-12-121-1/+1
|
* iwyu: Fix more findingsDaniel Pfeifer2016-11-281-0/+1
|
* Add Encoding option for RunChild, RunMakeCommand and RunProcessDāvis Mosāns2016-11-141-3/+8
|
* Do not query CDash for versionZack Galbreath2016-11-081-8/+0
| | | | | | | | | | | | | | | | | | This check was not functioning properly for the following reasons: * The "DropSite" and "DropLocation" CTest Configurations do not get set until ctest_submit() is called. So if ctest_submit() was not called before ctest_test() we would end up with uncompressed output, even if the CDash server was new enough to support this feature. * CDash's API is now versioned. The current location to query is now /api/v1/getversion.php, not /api/getversion.php. As a result of these issues, CTest would not compress test/memcheck output when it should. Rather than fix this check, we now assume that CTest is communicating with a new enough version of CDash. This behavior can be controlled through the use of the --no-compress-output command-line argument.
* 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-8/+8
|
* cmCTest: don't redefine cout and cerrDaniel Pfeifer2016-09-031-10/+0
| | | | | | | | The definitions have been introduced to ensure that cout and cerr are not used in certain files. However, this limitation does not apply to all source files that require cmCTest.h to be included. Furthermore, the definitions cause side effects depending on the include order. In total, the definitions do more harm than good. Remove them.
* make sure to include cmConfigure.h before cmStandardIncludes.hDaniel Pfeifer2016-09-031-0/+2
|
* cmCTest: Update doxygen to be consistentJean-Christophe Fillion-Robin2016-07-051-62/+91
|
* cmCTest: Rename "ProcessTests()" to "ProcessSteps()" and improve doxygenJean-Christophe Fillion-Robin2016-07-051-4/+9
|
* cmCTest: Improve readability adding "HandleTest(Action|Model)Argument()"Jean-Christophe Fillion-Robin2016-07-051-0/+8
|
* cmCTest: Improve readability adding "RunCMakeAndTest()" and "ExecuteTests()"Jean-Christophe Fillion-Robin2016-07-051-0/+3
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-4/+4
|
* Pass arguments that are not modified as const&.Daniel Pfeifer2016-05-261-6/+6
| | | | | | | Use clang-tidy's performance-unnecessary-value-param checker to find value parameter declarations of expensive to copy types that are not modified inside the function. Ignore findings in kwsys. After applying the fix-its, manually change `const T&` to `T const&`.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-117/+127
| | | | | | | | | | | | | 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.
* Source: Stabilize include orderBrad King2016-04-291-0/+1
| | | | | Each source file has a logical first include file. Include it in an isolated block so that tools that sort includes do not move them.
* CTest: hide progress ticks in verbose outputDaniel Pfeifer2015-07-061-0/+1
| | | | | | | | | | The progress ticks and information about the length of the output are useful when the actual output is not visible. When the output is printed, the progress ticks * add no useful information, * do not look pretty, and * make the output hard to parse for tools.
* ctest: Optionally avoid starting tests that may exceed a given CPU loadBetsy McPhail2015-06-301-0/+5
| | | | | | | | | | | | | | 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>
* cmCTest: Drop unused method overloadsDaniel Pfeifer2015-05-261-3/+0
| | | | | | The StartXML, EndXML, and AddSiteProperties overloads that take a stream directly are no longer called anywhere. All clients hvae been ported to cmXMLWriter. Drop the old overloads.
* cmCTest: Port GenerateNotesFile to cmXMLWriterDaniel Pfeifer2015-05-261-1/+1
|
* cmCTest: Port to cmXMLWriterDaniel Pfeifer2015-05-261-0/+4
| | | | | Re-implement StartXML, EndXML, and AddSiteProperties using cmXMLWriter. Leave the old overloads behind for use by CTest/* until they are ported.
* ctest: Add a new --repeat-until-fail optionBill Hoffman2015-03-231-3/+9
| | | | | 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.
* CTest: Add cmCTestOptionalLog macroZack Galbreath2015-02-231-3/+13
| | | | | | | | | cmCTestOptionalLog takes a boolean argument that indicates whether or not the message should be suppressed. Note that error messages will still be printed, even if suppression is requested. This macro will allow us to provide more fine-grained control over what messages CTest prints to the console.
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-1/+1
| | | | All compilers hosting CMake support the std class.
* Change output to be a reference and not a pointer.Bill Hoffman2014-08-041-1/+1
| | | | | This avoids having to check the pointer value at each use which was not being done.
* Remove extra semicolons from C++ code.Stephen Kelly2014-04-031-3/+3
| | | | | Clang based tools running over the code complain about these, but clang has a fixit for removing them.
* strings: Remove cmStdString referencesBen Boeckel2014-03-081-10/+10
| | | | | | | | | | | Casts from std::string -> cmStdString were high on the list of things taking up time. Avoid such implicit casts across function calls by just using std::string everywhere. The comment that the symbol name is too long is no longer relevant since modern debuggers alias the templates anyways and the size is a non-issue since the underlying methods are generated since it's inherited.
* stringapi: Use strings for test namesBen Boeckel2014-03-081-3/+3
|
* stringapi: Use strings for variable namesBen Boeckel2014-03-081-4/+4
| | | | Variable names are always generated by CMake and should never be NULL.
* Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.Clinton Stimpson2014-01-071-1/+1
| | | | | Also use SystemTools::Fopen() instead of fopen(). This is to eventually support utf-8 filenames.
* Refactor internal resource location APIs and initializationBrad King2013-11-121-9/+0
| | | | | | | | | | | | | | | | | | | | Rename cmSystemTools::FindExecutableDirectory to FindCMakeResources. Teach it to compute the locations of cmake, ctest, cpack, ccmake, and cmake-gui executables, and the location of CMAKE_ROOT. Provide this information from static cmSystemTools::Get<resource>() methods. Refactor code that needs these locations to use the new APIs. Teach FindCMakeResources to use the OS X system API to lookup the executable location. When running from the CMake build tree itself, leave a file in the tree that FindCMakeResources can use to read the location of the source tree. This avoids the need to compile the source tree location into a binary that may be installed and used without the source tree. Teach the QtDialog on OS X to create a "cmake-gui" symlink in the build tree next to "cmake" and the other tools, as is already done in the install tree for the application bundle. This ensures a consistent set of executables are available in one directory.