220 Commits

Author SHA1 Message Date
Regina Pfeifer
5a72dbd40c cmCTest: Remove dead code 2019-03-20 11:41:29 -04:00
Regina Pfeifer
a5eeb0310d cmCTest: Cleanup typedefs 2019-03-20 11:41:29 -04:00
Regina Pfeifer
71a3391b5f cmCTest: Use default member initialization 2019-03-20 11:41:29 -04:00
Regina Pfeifer
b172a81d55 cmCTest: Use concrete accessor functions for TestingHandlers 2019-03-20 11:39:14 -04:00
Regina Pfeifer
da5ee509b2 cmCTest: Move all data members to private implementation struct 2019-03-18 22:55:50 +01:00
Regina Pfeifer
670d27da64 cmCTest: Remove friend declarations 2019-03-18 22:25:50 +01:00
Regina Pfeifer
9406844616 cmCTest: De-inline all member functions 2019-03-18 22:25:50 +01:00
Vitaly Stakhovsky
4e315e9449 cmSystemTools: More functions accept std::string params 2019-02-20 14:53:39 -05:00
Albert Astals Cid
ae5e97a005 Delete some default constructors and assignment operators
They are unused, but if someone used them they would lead to
problems since they would copy the internal raw pointers
and the destructor would cause double delete
2019-02-15 07:25:47 -05:00
Regina Pfeifer
094f01d0f0 cleanup: Prefer compiler provided special member functions 2019-01-25 06:45:00 -05:00
Regina Pfeifer
55671b41d2 clang-tidy: Use = default
Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and
`Source/cmUVHandlePtr.h` where a few older compilers require a
user-defined default constructor (with `{}`).
2019-01-25 06:44:32 -05:00
Regina Pfeifer
65f1fc9d63 CTest: Add function GetSubmitURL 2019-01-16 10:34:08 -05:00
Justin Goshi
fc41a95f08 CTest: Add --show-only[=format] option to print test info
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.
2019-01-10 07:37:32 -05:00
Regina Pfeifer
b2aa3aedea clang-tidy: Use default member initialization 2018-12-15 10:52:37 +01:00
Regina Pfeifer
9501a6145d CTest: Remove special case for Dart version <= 1 2018-11-29 00:29:13 +01:00
Regina Pfeifer
a2648dda97 Mark operator bool explicit 2018-11-19 23:35:09 +01:00
Sylvain Joubert
ffdec37a19 CTest: Add colored output on tests summary where supported
- Number of passed/failed tests is colored according to the whole outcome
- Individual listed tested are colored according to their completion status:
  * Disabled: blue
  * Failed: red
  * Not Run: yellow
2018-11-09 18:57:41 +01:00
Betsy McPhail
a6e0158712 ctest_submit: Add support for a "Done" part
Teach CTest to submit Done.xml. Submission of this file indicates to
CDash that a build is complete and no more files will be uploaded. It
contains the build id returned by CDash and the current time.

This file is submitted last for a given build when using the
`ctest_submit()` command.

If submitting by PARTS, use `ctest_submit(PARTS Done)`.
2018-10-10 06:55:59 -04:00
Michael Wegner
b3d5b8b3fb ctest: Add option for live progress summary in terminal 2018-09-26 11:47:49 -04:00
Brad King
b41b30f16e Update use of KWSys SystemTools::SplitString for new signature 2018-06-22 13:38:18 -04:00
luz.paz
be28106880 Fix misc. typos
Found via `codespell` and `grep`
2018-06-04 10:32:49 -04:00
Kyle Edwards
563781099f ctest_start: read model from TAG file
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.
2018-05-09 08:22:55 -04:00
luz.paz
32f6b7a43b Fix misc typos in documentation and comments 2018-03-07 10:54:46 -05:00
Brad King
18153217e2 Merge topic 'ctest_start_function_scope'
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
2018-01-29 08:04:59 -05:00
Kyle Edwards
74092d92bf cmCTestScriptHandler: Add new field ShouldRunCurrentScript
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.
2018-01-26 09:27:22 -05:00
Wouter Klouwen
695951bc46 CTest: introduce cmDuration
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.
2018-01-23 10:04:38 -05:00
Brad King
2567e5df69 cmCTest: Refactor stop time calculations
Calculate the stop time up front instead of re-parsing its string for
every test.
2018-01-08 12:55:00 -05:00
Brad King
1138feb38f cmCTest: Remove unused member LastStopTimeout
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.
2018-01-08 12:55:00 -05:00
Brad King
1f5b2a8de9 Merge topic 'fix-ctest-chrono'
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
2017-12-12 08:02:33 -05:00
Brad King
ba6caafa42 CTest: Use integer-representable value for "infinite" timeout
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.
2017-12-11 10:41:48 -05:00
Brad King
f984296ba8 CTest: Remove unfinished batch test mode
This was partially implemented by commit v2.8.0~154 (Added some ctest
batch capabilities, 2009-09-10) but never finished.
2017-12-08 11:23:33 -05:00
Wouter Klouwen
66419bc046 CTest: convert timeouts to std::chrono::duration
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.
2017-12-04 10:43:14 -05:00
Betsy McPhail
e80dc2ad7f cmCTest: Remove dead code
The option 'ctest-config' is ignored.
2017-11-07 14:15:20 -05:00
Rolf Eike Beer
69fac3c3d5 pass arguments as vector to cmCTest::RunCommand()
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.
2017-09-15 17:50:56 +02:00
Daniel Pfeifer
ca2233e31f IWYU: Mark cmConfigure.h with pragma: keep
Also remove `#include "cmConfigure.h"` from most source files.
2017-08-26 07:41:04 +02:00
Daniel Pfeifer
5962db4389 Use C++11 nullptr 2017-08-24 23:39:47 +02:00
Betsy McPhail
47b3a57c9b Display subproject timing summary
Use the '--no-subproject-summary' option to disable timing summary.
2017-07-10 16:25:18 -04:00
Betsy McPhail
d08ec4d25a Add CTEST_LABELS_FOR_SUBPROJECTS as a CTest module and script variable
Use this variable to specify a list of labels that will be reported to
CDash as subprojects.
2017-07-10 16:25:18 -04:00
Daniel Pfeifer
1d829c862c Use quotes for non-system includes
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'
2017-04-11 22:35:21 +02:00
Daniel Pfeifer
bcd08aa383 cmCTest: Move macros to bottom of file
Since the class name is used in the macros, the iwyu tool gets confused
wheter it needs a forward declaration or not.
2017-03-23 23:08:56 +01:00
Daniel Pfeifer
ee72803e9f fix some include-what-you-use diagnostics 2017-02-17 22:12:21 +01:00
Daniel Pfeifer
2988abd939 clang-tidy: apply modernize-use-bool-literals fixes 2016-12-12 14:04:14 -05:00
Daniel Pfeifer
7c9db8f813 clang-tidy: apply performance-unnecessary-value-param fixes 2016-12-12 14:04:12 -05:00
Daniel Pfeifer
7b4244aceb iwyu: Fix more findings 2016-11-28 14:06:40 -05:00
Dāvis Mosāns
40bd42dfbc Add Encoding option for RunChild, RunMakeCommand and RunProcess 2016-11-15 01:00:46 +02:00
Zack Galbreath
d3633731ab Do not query CDash for version
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.
2016-11-08 15:58:50 -05:00
Brad King
86578eccf2 Simplify CMake per-source license notices
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.
2016-09-27 15:14:44 -04:00
Daniel Pfeifer
efed6468ed fix a load of include-what-you-use violations 2016-09-03 08:04:56 -04:00
Daniel Pfeifer
bd3d0eafbb cmCTest: don't redefine cout and cerr
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.
2016-09-03 08:04:22 -04:00
Daniel Pfeifer
3838a0d5fb make sure to include cmConfigure.h before cmStandardIncludes.h 2016-09-03 08:04:22 -04:00