2013-08-20 05:49:44 +08:00
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
##############################################################################
|
|
|
|
### T E S T I N G ###
|
|
|
|
##############################################################################
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
# Make testfiles dir under build dir
|
2014-03-19 00:21:46 +08:00
|
|
|
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
|
2013-08-20 05:49:44 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# copy test files from source to build dir
|
|
|
|
#
|
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
add_custom_command (
|
2013-08-20 05:49:44 +08:00
|
|
|
TARGET gif2h5
|
|
|
|
POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND}
|
|
|
|
ARGS -E copy_if_different ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/testfiles/image1.gif ${PROJECT_BINARY_DIR}/testfiles/image1.gif
|
|
|
|
)
|
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
add_custom_command (
|
2013-08-20 05:49:44 +08:00
|
|
|
TARGET h52gif
|
|
|
|
POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND}
|
|
|
|
ARGS -E copy_if_different ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/testfiles/h52giftst.h5 ${PROJECT_BINARY_DIR}/testfiles/h52giftst.h5
|
|
|
|
)
|
|
|
|
|
|
|
|
# Remove any output file left over from previous test run
|
2014-03-12 06:07:13 +08:00
|
|
|
add_test (
|
2013-08-20 05:49:44 +08:00
|
|
|
NAME HL_TOOLS-clear-objects
|
|
|
|
COMMAND ${CMAKE_COMMAND}
|
|
|
|
-E remove
|
|
|
|
image1.gif
|
|
|
|
image1.h5
|
|
|
|
)
|
|
|
|
|
2014-03-12 06:07:13 +08:00
|
|
|
add_test (NAME HL_TOOLS_h52gif COMMAND $<TARGET_FILE:h52gif> testfiles/h52giftst.h5 image1.gif -i image)
|
2013-08-20 05:49:44 +08:00
|
|
|
|
2014-03-12 06:07:13 +08:00
|
|
|
add_test (NAME HL_TOOLS_gif2h5 COMMAND $<TARGET_FILE:gif2h5> testfiles/image1.gif image1.h5)
|