summaryrefslogtreecommitdiffstats
path: root/Tests/Module/ExternalData/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-01-25 21:39:57 (GMT)
committerBrad King <brad.king@kitware.com>2013-01-30 15:04:54 (GMT)
commit4befecc77caa97aeb450d9a2b6bcbe0985dc4054 (patch)
tree466fb00e26d9db362d64b530bc7bda952106e3d8 /Tests/Module/ExternalData/CMakeLists.txt
parentbcd25808ac540d279a36a9e0f1b60f152fc0d6bb (diff)
downloadCMake-4befecc77caa97aeb450d9a2b6bcbe0985dc4054.zip
CMake-4befecc77caa97aeb450d9a2b6bcbe0985dc4054.tar.gz
CMake-4befecc77caa97aeb450d9a2b6bcbe0985dc4054.tar.bz2
ExternalData: Add tests covering interfaces and errors
Add a Module.ExternalData test to verify data retrieval and test argument DATA{} references. Add a RunCMake.ExternalData test to verify error handling and automatic transformation of a raw data to a content link and staged object.
Diffstat (limited to 'Tests/Module/ExternalData/CMakeLists.txt')
-rw-r--r--Tests/Module/ExternalData/CMakeLists.txt32
1 files changed, 32 insertions, 0 deletions
diff --git a/Tests/Module/ExternalData/CMakeLists.txt b/Tests/Module/ExternalData/CMakeLists.txt
new file mode 100644
index 0000000..5532610
--- /dev/null
+++ b/Tests/Module/ExternalData/CMakeLists.txt
@@ -0,0 +1,32 @@
+cmake_minimum_required(VERSION 2.8.10.20130115)
+project(ExternalDataTest NONE)
+
+include(CTest)
+
+include(ExternalData)
+set(ExternalData_URL_TEMPLATES
+ "file:///${CMAKE_CURRENT_SOURCE_DIR}/%(algo)/%(hash)"
+ )
+set(ExternalData_BINARY_ROOT "${CMAKE_CURRENT_BINARY_DIR}/ExternalData")
+file(REMOVE_RECURSE ${ExternalData_BINARY_ROOT}) # clean test
+
+ExternalData_Add_Test(Data1
+ NAME Data1Check
+ COMMAND ${CMAKE_COMMAND}
+ -D Data=DATA{Data.dat}
+ -D SeriesA=DATA{SeriesA.dat,:}
+ -D SeriesB=DATA{SeriesB.dat,:}
+ -D SeriesC=DATA{SeriesC.dat,:}
+ -D SeriesD=DATA{SeriesD.dat,:}
+ -D SeriesAn=DATA{SeriesAn1.dat,:}
+ -D SeriesBn=DATA{SeriesBn_1.dat,:}
+ -D SeriesCn=DATA{SeriesCn.1.dat,:}
+ -D SeriesDn=DATA{SeriesDn-1.dat,:}
+ -D Paired=DATA{PairedA.dat,PairedB.dat}
+ -D Meta=DATA{MetaTop.dat,REGEX:Meta[ABC].dat}
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/Data1Check.cmake
+ )
+ExternalData_Add_Target(Data1)
+
+add_subdirectory(Data2)
+add_subdirectory(Data3)