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.
This commit is contained in:
Brad King
2013-01-25 16:39:57 -05:00
parent bcd25808ac
commit 4befecc77c
123 changed files with 554 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
set(ExternalData_SERIES_PARSE "([0-9]+)(_\\.my\\.dat)$")
set(ExternalData_SERIES_MATCH "[0-9]+")
ExternalData_Add_Test(Data2
NAME Data2Check
COMMAND ${CMAKE_COMMAND}
-D Data2=DATA{../Data2.dat}
-D SeriesC=DATA{SeriesC_1_.my.dat,:}
-P ${CMAKE_CURRENT_SOURCE_DIR}/Data2Check.cmake
)
ExternalData_Add_Target(Data2)

View File

@@ -0,0 +1,9 @@
if(NOT EXISTS "${Data2}")
message(SEND_ERROR "Input file:\n ${Data2}\ndoes not exist!")
endif()
foreach(n 1 2 3)
string(REGEX REPLACE "_1_\\.my\\.dat$" "_${n}_.my.dat" SeriesCFile "${SeriesC}")
if(NOT EXISTS "${SeriesCFile}")
message(SEND_ERROR "Input file:\n ${SeriesCFile}\ndoes not exist!")
endif()
endforeach()

View File

@@ -0,0 +1 @@
31eff09e84fca01415f8cd9d82ec432b

View File

@@ -0,0 +1 @@
f7ab5a04aae9cb9a520e70b20b9c8ed7

View File

@@ -0,0 +1 @@
30ba0acdee9096b3b9fc6c69362c6b42