summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/file
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-11-17 21:34:48 (GMT)
committerBrad King <brad.king@kitware.com>2022-11-17 21:37:33 (GMT)
commitd6af54c4733a11c345322665fbea0fbe9b0fd2d4 (patch)
tree70a71393633f1d4543d08f774e5f525c7055d77e /Tests/RunCMake/file
parentc5a945dce8e1a4fb1b1db91c2dae03795c74074b (diff)
downloadCMake-d6af54c4733a11c345322665fbea0fbe9b0fd2d4.zip
CMake-d6af54c4733a11c345322665fbea0fbe9b0fd2d4.tar.gz
CMake-d6af54c4733a11c345322665fbea0fbe9b0fd2d4.tar.bz2
Tests: Factor out a RunCMake.file-DOWNLOAD test
Move the `DOWNLOAD-*` cases over from the `RunCMake.file` test.
Diffstat (limited to 'Tests/RunCMake/file')
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-hash-mismatch-result.txt1
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-hash-mismatch-stderr.txt11
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake10
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-hash-mismatch.txt0
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-httpheader-not-set-result.txt1
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-httpheader-not-set-stderr.txt4
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-httpheader-not-set.cmake1
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-netrc-bad-result.txt1
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-netrc-bad-stderr.txt19
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-netrc-bad.cmake15
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-netrc-bad.txt0
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-no-save-hash-result.txt1
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-no-save-hash-stderr.txt4
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-no-save-hash.cmake8
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-no-save-hash.txt0
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-pass-not-set-result.txt1
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-pass-not-set-stderr.txt4
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-pass-not-set.cmake1
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set-result.txt1
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set-stderr.txt4
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set.cmake1
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set-result.txt1
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set-stderr.txt4
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set.cmake1
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-unused-argument-result.txt0
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-unused-argument-stderr.txt5
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake8
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-unused-argument.txt0
-rw-r--r--Tests/RunCMake/file/RunCMakeTest.cmake8
29 files changed, 0 insertions, 115 deletions
diff --git a/Tests/RunCMake/file/DOWNLOAD-hash-mismatch-result.txt b/Tests/RunCMake/file/DOWNLOAD-hash-mismatch-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-hash-mismatch-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/file/DOWNLOAD-hash-mismatch-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-hash-mismatch-stderr.txt
deleted file mode 100644
index 7a356c1..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-hash-mismatch-stderr.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-^CMake Error at DOWNLOAD-hash-mismatch.cmake:[0-9]+ \(file\):
- file DOWNLOAD HASH mismatch
-
- for file: \[.*/Tests/RunCMake/file/DOWNLOAD-hash-mismatch-build/hash-mismatch.txt\]
- expected hash: \[0123456789abcdef0123456789abcdef01234567\]
- actual hash: \[da39a3ee5e6b4b0d3255bfef95601890afd80709\]
-
-Call Stack \(most recent call first\):
- CMakeLists.txt:[0-9]+ \(include\)
-+
-status='1;HASH mismatch: expected: 0123456789abcdef0123456789abcdef01234567 actual: da39a3ee5e6b4b0d3255bfef95601890afd80709'$
diff --git a/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake b/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake
deleted file mode 100644
index a91b217..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^/")
- set(slash /)
-endif()
-file(DOWNLOAD
- "file://${slash}${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-hash-mismatch.txt"
- ${CMAKE_CURRENT_BINARY_DIR}/hash-mismatch.txt
- EXPECTED_HASH SHA1=0123456789abcdef0123456789abcdef01234567
- STATUS status
- )
-message("status='${status}'")
diff --git a/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.txt b/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.txt
deleted file mode 100644
index e69de29..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.txt
+++ /dev/null
diff --git a/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set-result.txt b/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set-stderr.txt
deleted file mode 100644
index 247923b..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-^CMake Error at DOWNLOAD-httpheader-not-set.cmake:[0-9]+ \(file\):
- file DOWNLOAD missing string for HTTPHEADER.
-Call Stack \(most recent call first\):
- CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set.cmake b/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set.cmake
deleted file mode 100644
index 6efc958..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set.cmake
+++ /dev/null
@@ -1 +0,0 @@
-file(DOWNLOAD "" "" HTTPHEADER "Content-Type: application/x-compressed-tar" HTTPHEADER)
diff --git a/Tests/RunCMake/file/DOWNLOAD-netrc-bad-result.txt b/Tests/RunCMake/file/DOWNLOAD-netrc-bad-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-netrc-bad-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/file/DOWNLOAD-netrc-bad-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-netrc-bad-stderr.txt
deleted file mode 100644
index 96ce62a..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-netrc-bad-stderr.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-^CMake Error at DOWNLOAD-netrc-bad\.cmake:[0-9]+ \(file\):
- file DOWNLOAD missing level value for NETRC\.
-Call Stack \(most recent call first\):
- CMakeLists\.txt:[0-9]+ \(include\)
-+
-CMake Error at DOWNLOAD-netrc-bad\.cmake:[0-9]+ \(file\):
- file DOWNLOAD missing file value for NETRC_FILE\.
-Call Stack \(most recent call first\):
- CMakeLists\.txt:[0-9]+ \(include\)
-+
-CMake Error at DOWNLOAD-netrc-bad\.cmake:[0-9]+ \(file\):
- file NETRC accepts OPTIONAL, IGNORED or REQUIRED but got: INVALID
-Call Stack \(most recent call first\):
- CMakeLists\.txt:[0-9]+ \(include\)
-+
-CMake Error at DOWNLOAD-netrc-bad\.cmake:[0-9]+ \(file\):
- file NETRC accepts OPTIONAL, IGNORED or REQUIRED but got: FALSE
-Call Stack \(most recent call first\):
- CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/file/DOWNLOAD-netrc-bad.cmake b/Tests/RunCMake/file/DOWNLOAD-netrc-bad.cmake
deleted file mode 100644
index 6a62df9..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-netrc-bad.cmake
+++ /dev/null
@@ -1,15 +0,0 @@
-if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^/")
- set(slash /)
-endif()
-file(DOWNLOAD "" "" NETRC)
-file(DOWNLOAD "" "" NETRC_FILE)
-set(CMAKE_NETRC FALSE)
-file(DOWNLOAD
- "file://${slash}${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-netrc-bad.txt"
- "${CMAKE_CURRENT_BINARY_DIR}/netrc-bad.txt"
- NETRC INVALID
- )
-file(DOWNLOAD
- "file://${slash}${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-netrc-bad.txt"
- "${CMAKE_CURRENT_BINARY_DIR}/netrc-bad.txt"
- )
diff --git a/Tests/RunCMake/file/DOWNLOAD-netrc-bad.txt b/Tests/RunCMake/file/DOWNLOAD-netrc-bad.txt
deleted file mode 100644
index e69de29..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-netrc-bad.txt
+++ /dev/null
diff --git a/Tests/RunCMake/file/DOWNLOAD-no-save-hash-result.txt b/Tests/RunCMake/file/DOWNLOAD-no-save-hash-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-no-save-hash-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/file/DOWNLOAD-no-save-hash-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-no-save-hash-stderr.txt
deleted file mode 100644
index b0f0d19..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-no-save-hash-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-^CMake Error at DOWNLOAD-no-save-hash\.cmake:[0-9]+ \(file\):
- file DOWNLOAD cannot calculate hash if file is not saved\.
-Call Stack \(most recent call first\):
- CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/file/DOWNLOAD-no-save-hash.cmake b/Tests/RunCMake/file/DOWNLOAD-no-save-hash.cmake
deleted file mode 100644
index ce959a7..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-no-save-hash.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^/")
- set(slash /)
-endif()
-file(DOWNLOAD
- "file://${slash}${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-no-save-md5.txt"
- EXPECTED_HASH MD5=55555555555555555555555555555555
- STATUS status
- )
diff --git a/Tests/RunCMake/file/DOWNLOAD-no-save-hash.txt b/Tests/RunCMake/file/DOWNLOAD-no-save-hash.txt
deleted file mode 100644
index e69de29..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-no-save-hash.txt
+++ /dev/null
diff --git a/Tests/RunCMake/file/DOWNLOAD-pass-not-set-result.txt b/Tests/RunCMake/file/DOWNLOAD-pass-not-set-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-pass-not-set-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/file/DOWNLOAD-pass-not-set-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-pass-not-set-stderr.txt
deleted file mode 100644
index 2fa2731..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-pass-not-set-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-^CMake Error at DOWNLOAD-pass-not-set.cmake:[0-9]+ \(file\):
- file DOWNLOAD missing string for USERPWD.
-Call Stack \(most recent call first\):
- CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/file/DOWNLOAD-pass-not-set.cmake b/Tests/RunCMake/file/DOWNLOAD-pass-not-set.cmake
deleted file mode 100644
index 61eff6d..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-pass-not-set.cmake
+++ /dev/null
@@ -1 +0,0 @@
-file(DOWNLOAD "" "" USERPWD)
diff --git a/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set-result.txt b/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set-stderr.txt
deleted file mode 100644
index 1552baa..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-^CMake Error at DOWNLOAD-tls-cainfo-not-set.cmake:[0-9]+ \(file\):
- file DOWNLOAD missing file value for TLS_CAINFO.
-Call Stack \(most recent call first\):
- CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set.cmake b/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set.cmake
deleted file mode 100644
index b476425..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set.cmake
+++ /dev/null
@@ -1 +0,0 @@
-file(DOWNLOAD "" "" TLS_CAINFO)
diff --git a/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set-result.txt b/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set-stderr.txt
deleted file mode 100644
index 2f46c0c..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-^CMake Error at DOWNLOAD-tls-verify-not-set.cmake:[0-9]+ \(file\):
- file DOWNLOAD missing bool value for TLS_VERIFY.
-Call Stack \(most recent call first\):
- CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set.cmake b/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set.cmake
deleted file mode 100644
index 919368c..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set.cmake
+++ /dev/null
@@ -1 +0,0 @@
-file(DOWNLOAD "" "" TLS_VERIFY)
diff --git a/Tests/RunCMake/file/DOWNLOAD-unused-argument-result.txt b/Tests/RunCMake/file/DOWNLOAD-unused-argument-result.txt
deleted file mode 100644
index e69de29..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-unused-argument-result.txt
+++ /dev/null
diff --git a/Tests/RunCMake/file/DOWNLOAD-unused-argument-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-unused-argument-stderr.txt
deleted file mode 100644
index 82a78c9..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-unused-argument-stderr.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-^CMake Warning \(dev\) at DOWNLOAD-unused-argument.cmake:[0-9]+ \(file\):
- Unexpected argument: JUNK
-Call Stack \(most recent call first\):
- CMakeLists.txt:[0-9]+ \(include\)
-This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake b/Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake
deleted file mode 100644
index 2fa5482..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^/")
- set(slash /)
-endif()
-file(DOWNLOAD
- "file://${slash}${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-unused-argument.txt"
- "${CMAKE_CURRENT_BINARY_DIR}/unused-argument.txt"
- JUNK
- )
diff --git a/Tests/RunCMake/file/DOWNLOAD-unused-argument.txt b/Tests/RunCMake/file/DOWNLOAD-unused-argument.txt
deleted file mode 100644
index e69de29..0000000
--- a/Tests/RunCMake/file/DOWNLOAD-unused-argument.txt
+++ /dev/null
diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake
index 4ad00ff..fcfb1d2 100644
--- a/Tests/RunCMake/file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file/RunCMakeTest.cmake
@@ -4,14 +4,6 @@ run_cmake(CREATE_LINK)
run_cmake(CREATE_LINK-COPY_ON_ERROR)
run_cmake(CREATE_LINK-noarg)
run_cmake(CREATE_LINK-noexist)
-run_cmake(DOWNLOAD-hash-mismatch)
-run_cmake(DOWNLOAD-unused-argument)
-run_cmake(DOWNLOAD-httpheader-not-set)
-run_cmake(DOWNLOAD-netrc-bad)
-run_cmake(DOWNLOAD-tls-cainfo-not-set)
-run_cmake(DOWNLOAD-tls-verify-not-set)
-run_cmake(DOWNLOAD-pass-not-set)
-run_cmake(DOWNLOAD-no-save-hash)
run_cmake(TOUCH)
run_cmake(TOUCH-error-in-source-directory)
run_cmake(TOUCH-error-missing-directory)