summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/file-DOWNLOAD
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-11-18 14:09:36 (GMT)
committerBrad King <brad.king@kitware.com>2022-11-18 14:09:36 (GMT)
commit28513a5fbaa5e1ea326c54b4e5edd1d302c257dd (patch)
tree26f3636a89b5a86704f52ec6a5bd82eee4da76c3 /Tests/RunCMake/file-DOWNLOAD
parent52b9c7b958a9e184ccfa023ad85cf8fde4308afd (diff)
downloadCMake-28513a5fbaa5e1ea326c54b4e5edd1d302c257dd.zip
CMake-28513a5fbaa5e1ea326c54b4e5edd1d302c257dd.tar.gz
CMake-28513a5fbaa5e1ea326c54b4e5edd1d302c257dd.tar.bz2
Tests: Honor CMake_TEST_NO_NETWORK in RunCMake.file-DOWNLOAD
Most of the test uses `file://` URLs instead of hitting the network. However, a case covering an invalid hostname does try to make a real connection, expecting it to fail DNS resolution. Turn off that case if we are asked not to hit the network during testing.
Diffstat (limited to 'Tests/RunCMake/file-DOWNLOAD')
-rw-r--r--Tests/RunCMake/file-DOWNLOAD/RunCMakeTest.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Tests/RunCMake/file-DOWNLOAD/RunCMakeTest.cmake b/Tests/RunCMake/file-DOWNLOAD/RunCMakeTest.cmake
index 01da3fc..565f440 100644
--- a/Tests/RunCMake/file-DOWNLOAD/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file-DOWNLOAD/RunCMakeTest.cmake
@@ -14,10 +14,13 @@ run_cmake(tls-verify-not-set)
run_cmake(pass-not-set)
run_cmake(no-save-hash)
-run_cmake(bad-hostname)
run_cmake(basic)
run_cmake(EXPECTED_HASH)
run_cmake(file-without-path)
run_cmake(no-file)
run_cmake(range)
run_cmake(SHOW_PROGRESS)
+
+if(NOT CMake_TEST_NO_NETWORK)
+ run_cmake(bad-hostname)
+endif()