diff options
author | Thomas Bernard <tbernard@go-engineering.de> | 2020-08-08 13:47:31 (GMT) |
---|---|---|
committer | Thomas Bernard <tbernard@go-engineering.de> | 2020-08-11 05:25:58 (GMT) |
commit | f24e34975a34c7cad6422a517a59c310d6ea00c9 (patch) | |
tree | 296c3c7b95fe34129789b2da705defc899f9bcc4 /Tests | |
parent | bb1b37ea3bbf3ad3b513ad8642ef514099699aac (diff) | |
download | CMake-f24e34975a34c7cad6422a517a59c310d6ea00c9.zip CMake-f24e34975a34c7cad6422a517a59c310d6ea00c9.tar.gz CMake-f24e34975a34c7cad6422a517a59c310d6ea00c9.tar.bz2 |
ExternalProject: retry download on recoverable errors
In order to shorten the download failure of ExternalProject download
steps, a download retry is only done when a recoverable network
error is encountered.
Diffstat (limited to 'Tests')
4 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/ExternalProject/DownloadTimeout-build-result.txt b/Tests/RunCMake/ExternalProject/DownloadTimeout-build-result.txt new file mode 100644 index 0000000..c20fd86 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/DownloadTimeout-build-result.txt @@ -0,0 +1 @@ +^[^0] diff --git a/Tests/RunCMake/ExternalProject/DownloadTimeout-build-stderr.txt b/Tests/RunCMake/ExternalProject/DownloadTimeout-build-stderr.txt new file mode 100644 index 0000000..8d98f9d --- /dev/null +++ b/Tests/RunCMake/ExternalProject/DownloadTimeout-build-stderr.txt @@ -0,0 +1 @@ +.* diff --git a/Tests/RunCMake/ExternalProject/DownloadTimeout.cmake b/Tests/RunCMake/ExternalProject/DownloadTimeout.cmake new file mode 100644 index 0000000..c90b4ba --- /dev/null +++ b/Tests/RunCMake/ExternalProject/DownloadTimeout.cmake @@ -0,0 +1,5 @@ +include(ExternalProject) +set(source_dir "${CMAKE_CURRENT_BINARY_DIR}/DownloadTimeout") +file(REMOVE_RECURSE "${source_dir}") +file(MAKE_DIRECTORY "${source_dir}") +ExternalProject_Add(MyProj URL "http://cmake.org/invalid_file.tar.gz") diff --git a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake index 0d1da26..4d23bf8 100644 --- a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake @@ -38,6 +38,7 @@ set(RunCMake_TEST_OUTPUT_MERGE 0) if(NOT RunCMake_GENERATOR MATCHES "Visual Studio") __ep_test_with_build(LogOutputOnFailure) __ep_test_with_build(LogOutputOnFailureMerged) + __ep_test_with_build(DownloadTimeout) endif() # We can't test the substitution when using the old MSYS due to |