Commit Graph

32 Commits

Author SHA1 Message Date
Daniel Pfeifer
caa449493b cmCTest*Command: Fortify argument parsing
Fix tests that pass `CDASH_UPLOAD` or `SCHEDULE_RANDOM` without an argument.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer
ff2ec0387a cmCTest*Command: Generalize argument parsing and checking
Move the instantiation of unparsed arguments as well as the `parser.Parse` call
behind an abstraction.  Merge checks on `captureCMakeError`.
2024-11-05 10:20:12 +01:00
Brad King
f4aa34daa7 Tests/RunCMake: Update cmake_minimum_required versions to 3.10
For policy-specific tests, use the version before the policy was
introduced.  Otherwise, use 3.10 where possible.
2024-10-03 11:52:22 -04:00
Brad King
7139944264 ctest: Fall back to CMake environment variable for TLS server verification
Use `ENV{CMAKE_TLS_VERIFY}` if `CTEST_TLS_VERIFY` or `CMAKE_TLS_VERIFY`
is not set.

Issue: #23608
2024-03-30 09:22:05 -04:00
Brad King
c295df53c6 ctest: Test fallback to CMake options for TLS server verification 2024-03-30 09:22:05 -04:00
Brad King
6c44abb6e0 Tests: Update cmake_minimum_required version in RunCMake ctest cases
This was missed in commit 1edf138506 (Tests/RunCMake: Update
cmake_minimum_required versions, 2023-02-06, v3.27.0-rc1~508^2~1).
2024-03-29 14:17:58 -04:00
Brad King
aeb8bcc055 ctest: Fall back to CMake options for TLS version
Use `CMAKE_TLS_VERSION` or `ENV{CMAKE_TLS_VERSION}` if
`CTEST_TLS_VERSION` is not set.

Issue: #25701
2024-03-12 10:47:08 -04:00
Brad King
56e319ce4a ctest: Fall back to CMake options for TLS server verification
Use `CMAKE_TLS_VERIFY` if `CTEST_TLS_VERIFY` is not set.
2024-03-12 10:46:42 -04:00
Brad King
6671f17f65 ctest: Add explicit options for TLS version
Add a dedicated `TLSVersion` ctest option and a `CTEST_TLS_VERSION`
variable to control it.

Issue: #25701
2024-03-12 10:46:23 -04:00
Brad King
0aba13a2f3 ctest: Add explicit options for TLS server verification
Add a dedicated `TLSVerify` ctest option and a `CTEST_TLS_VERIFY`
variable to control it.  Deprecate `CurlOptions` because it exposes
internal implementation details.
2024-03-12 10:46:11 -04:00
Brad King
713182de39 Tests: Make RunCMake.ctest_submit invalid host name case more robust
Use a well-defined `.invalid` top-level domain.  This follows the
pattern from commit 65a3c68259 (Tests: Make CMake.FileDownload invalid
host name case more robust, 2020-01-21, v3.17.0-rc1~120^2).

Add the invalid name to `ENV{no_proxy}` because DNS lookup failure is
expected.  This follows the pattern from commit c0b1f5f30c (Tests: Add
host to ENV{no_proxy} when DNS lookup failure is expected, 2021-01-29,
v3.20.0-rc1~79^2).
2024-03-12 10:41:09 -04:00
Brad King
01a9325027 Tests: Match curl 8.6.0 error in RunCMake.ctest_submit FailDrop-https case 2024-02-01 08:09:21 -05:00
Brad King
1edf138506 Tests/RunCMake: Update cmake_minimum_required versions
For policy-specific tests, use the version before the policy was
introduced.  Otherwise, use 3.5 where possible.

Also, remove `cmake_minimum_required()` and `project()` calls from
individual cases where they are handled by `CMakeLists.txt`.
2023-02-11 06:24:22 -05:00
william.r.dieter
c0b1f5f30c Tests: Add host to ENV{no_proxy} when DNS lookup failure is expected
DNS lookup of an invalid host name fails with a different error in a proxy
environment than it does in an environment without proxy.  Many tools,
including curl, use the `no_proxy` environment variable to provid a list
of hosts for which proxy should not be used.

To make lookup failure consistent, add invalid host names to the
`no_proxy` environment variable in tests that attempt to look up invalid
host names.  This way the lookup will fail consistently regardless of
whether proxy is generally used or not.

Signed-off-by: william.r.dieter <william.r.dieter@intel.com>
2021-01-29 16:22:15 -05:00
Zack Galbreath
ba7e44eb7a ctest_submit: Add option BUILD_ID
Fixes: #18968
2019-03-22 09:37:08 -04:00
Regina Pfeifer
2bedd5fb7c ctest_submit: Remove submit method from log output 2019-01-16 10:34:08 -05:00
Regina Pfeifer
a688c6b928 CTest: Remove submit method 'ftp' 2018-11-29 00:29:13 +01:00
Regina Pfeifer
c339b64cf2 CTest: Remove submit method 'scp' 2018-11-29 00:29:13 +01:00
Regina Pfeifer
aebdad399e CTest: Remove submit method 'cp' 2018-11-29 00:29:13 +01:00
Regina Pfeifer
c2f6872c4e CTest: Remove submit method 'xmlrpc' 2018-11-29 00:29:12 +01:00
Regina Pfeifer
1ca53f5ef1 Remove unnecessary CTEST_PROJECT_NAME variables 2018-11-20 21:43:27 +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
Zack Galbreath
c49d13f94b ctest: only create buildid when submitting from Testing/ dir
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.
2018-09-28 10:49:45 -04:00
Zack Galbreath
7f530cc54e ctest_submit: pass additional info to CDash
Specify buildname, site, and buildstamp to CDash upon submission.
CDash will use this extra info to assign and report back a buildid.
2018-09-17 10:38:33 -04:00
Zack Galbreath
71f27c04b0 ctest_submit: show headers as debug info
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.
2018-06-27 15:08:14 -04:00
Zack Galbreath
1a7d00bd12 ctest_submit: Add HTTPHEADER option
Allow CTest script writers to specify additional HTTP headers to be sent
to CDash during submission.

The motivating case for this feature is a corresponding change in CDash.
This will allow projects to refuse submissions from any site not bearing
a valid authentication token.
2017-05-04 12:21:21 -04:00
Zack Galbreath
5614a5cd1f ctest_submit: Allow RETRY_COUNT for CDASH_UPLOAD
Teach the CDASH_UPLOAD signature of ctest_submit() to honor the
RETRY_COUNT and RETRY_DELAY options.

Also teach HttpRequest() to honor the default 120 second timeout
for curl connections.
2017-01-20 11:37:27 -05:00
Orion Poplawski
2859d9ef6b Tests: Extend ctest_submit host lookup failure matching (#15958)
Match this message:

    Could not resolve host: -no-site-; Name or service not known
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2016-02-08 09:25:21 -05:00
Zack Galbreath
6bf130979e CTest: Drop "Error in read script" message at end of testing
A more-specific error message is always displayed earlier in the
output if any real error occurred.  This final summary message
is distracting to readers searching through the output for the
word "error".  Simply drop it.
2015-02-27 10:31:02 -05:00
Zack Galbreath
1643b905e0 ctest_submit: Add QUIET option
Specifying this option prevents CTest from printing any non-error
messages to the console for this call to ctest_submit().
2015-02-23 10:01:58 -05:00
Brad King
b04c8ec3f8 Tests: Match curl error in RunCMake.ctest_submit FailDrop-* cases
Port the regexes over from the CTestTestFailedSubmit tests for ftp,
http, and https.  No such match is needed for the other protocols.
2015-02-23 10:01:57 -05:00
Brad King
d7662141a7 Tests: Rename RunCMake.{CTestSubmit => ctest_submit}
Follow the convention of naming tests after the command they test.
2015-02-19 11:33:32 -05:00