summaryrefslogtreecommitdiffstats
path: root/Tests/Module
diff options
context:
space:
mode:
authorMatt McCormick <matt.mccormick@kitware.com>2016-10-12 18:57:32 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-18 15:16:45 (GMT)
commit33a9aaa89b437da29a70f27d25b267242b6f982c (patch)
tree6e381dc1c48d3f8c2fe6498497b20e45c7beb3dd /Tests/Module
parent96f6fe6b5737494fc560e126b7c797d232d9307e (diff)
downloadCMake-33a9aaa89b437da29a70f27d25b267242b6f982c.zip
CMake-33a9aaa89b437da29a70f27d25b267242b6f982c.tar.gz
CMake-33a9aaa89b437da29a70f27d25b267242b6f982c.tar.bz2
ExternalData: Add support for multiple hash algorithms
Add support for projects to have `Data.txt.md5` *and* `Data.txt.sha512` where the content links hold hashes for the same file. Check all `ExternalData_URL_TEMPLATES` entries in order for all available hashes. The data acquisition is considered a failure if none of the available URL resources has any of the given hashes. This makes it possible to have multiple data server resources where all servers do not support all hashing algorithms.
Diffstat (limited to 'Tests/Module')
-rw-r--r--Tests/Module/ExternalData/CMakeLists.txt2
-rw-r--r--Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.md51
-rw-r--r--Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.sha11
-rw-r--r--Tests/Module/ExternalData/MultipleAlgorithmNoSHA1.dat.md51
-rw-r--r--Tests/Module/ExternalData/MultipleAlgorithmNoSHA1.dat.sha11
5 files changed, 6 insertions, 0 deletions
diff --git a/Tests/Module/ExternalData/CMakeLists.txt b/Tests/Module/ExternalData/CMakeLists.txt
index 1018dd8..737e17a 100644
--- a/Tests/Module/ExternalData/CMakeLists.txt
+++ b/Tests/Module/ExternalData/CMakeLists.txt
@@ -45,6 +45,8 @@ ExternalData_Add_Test(Data1
-D Meta=DATA{MetaTop.dat,REGEX:Meta[ABC].dat}
-D Directory=DATA{Directory/,A.dat,REGEX:[BC].dat}
-D DirRecurse=DATA{DirRecurse/,RECURSE:,A.dat,REGEX:[BC].dat}
+ -D MultipleAlgorithmNoSHA1=DATA{MultipleAlgorithmNoSHA1.dat}
+ -D MultipleAlgorithmNoMD5=DATA{MultipleAlgorithmNoMD5.dat}
-D "Semicolons=DATA{Data.dat}\\;DATA{Data.dat}"
-P ${CMAKE_CURRENT_SOURCE_DIR}/Data1Check.cmake
)
diff --git a/Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.md5 b/Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.md5
new file mode 100644
index 0000000..a956f36
--- /dev/null
+++ b/Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.md5
@@ -0,0 +1 @@
+29848e54a4d0343f138ab14419b863de
diff --git a/Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.sha1 b/Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.sha1
new file mode 100644
index 0000000..43a3540
--- /dev/null
+++ b/Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.sha1
@@ -0,0 +1 @@
+2af59a7022024974f3b8521b7ed8137c996a79f1
diff --git a/Tests/Module/ExternalData/MultipleAlgorithmNoSHA1.dat.md5 b/Tests/Module/ExternalData/MultipleAlgorithmNoSHA1.dat.md5
new file mode 100644
index 0000000..1906cbf
--- /dev/null
+++ b/Tests/Module/ExternalData/MultipleAlgorithmNoSHA1.dat.md5
@@ -0,0 +1 @@
+08cfcf221f76ace7b906b312284e73d7
diff --git a/Tests/Module/ExternalData/MultipleAlgorithmNoSHA1.dat.sha1 b/Tests/Module/ExternalData/MultipleAlgorithmNoSHA1.dat.sha1
new file mode 100644
index 0000000..65781b2
--- /dev/null
+++ b/Tests/Module/ExternalData/MultipleAlgorithmNoSHA1.dat.sha1
@@ -0,0 +1 @@
+223b134e6e3a9bf34aa7531c009d97cff6b0d8a3