summaryrefslogtreecommitdiffstats
path: root/tools/h5import/CMakeTests.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5import/CMakeTests.cmake')
-rw-r--r--tools/h5import/CMakeTests.cmake64
1 files changed, 22 insertions, 42 deletions
diff --git a/tools/h5import/CMakeTests.cmake b/tools/h5import/CMakeTests.cmake
index 6986aee..39217be 100644
--- a/tools/h5import/CMakeTests.cmake
+++ b/tools/h5import/CMakeTests.cmake
@@ -63,38 +63,18 @@
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
foreach (conf_file ${HDF5_REFERENCE_CONF_FILES})
- set (dest "${PROJECT_BINARY_DIR}/testfiles/${conf_file}")
- #message (STATUS " Copying ${conf_file}")
- add_custom_command (
- TARGET h5import
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${conf_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${conf_file}" "${PROJECT_BINARY_DIR}/testfiles/${conf_file}" "h5import_files")
endforeach (conf_file ${HDF5_REFERENCE_CONF_FILES})
foreach (txt_file ${HDF5_REFERENCE_TXT_FILES})
- set (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}")
- #message (STATUS " Copying ${txt_file}")
- add_custom_command (
- TARGET h5import
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${txt_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${txt_file}" "${PROJECT_BINARY_DIR}/testfiles/${txt_file}" "h5import_files")
endforeach (txt_file ${HDF5_REFERENCE_TXT_FILES})
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}")
- #message (STATUS " Copying ${h5_file}")
- add_custom_command (
- TARGET h5import
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${h5_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5import_files")
endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
-
+ add_custom_target(h5import_files ALL COMMENT "Copying files needed by h5import tests" DEPENDS ${h5import_files_list})
+
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -106,7 +86,7 @@
add_test (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-h5importtest)
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5IMPORT-${testname}-clear-objects
@@ -196,7 +176,7 @@
)
endif ("${ARGN}" STREQUAL "BINARY")
set_tests_properties (H5IMPORT-DUMP-${testname}-H5DMP PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-clear-objects")
-
+
add_test (
NAME H5IMPORT-DUMP-${testname}
COMMAND "${CMAKE_COMMAND}"
@@ -253,7 +233,7 @@
add_test (
NAME H5IMPORT-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
binfp64.bin
binin8.bin
binin8w.bin
@@ -412,7 +392,7 @@
add_test (
NAME H5IMPORT-h5importtest-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
binfp64.bin
binin8.bin
binin8w.bin
@@ -432,22 +412,22 @@
# ----- TESTING "ASCII I32 rank 3 - Output BE " ;
ADD_H5_TEST (ASCII_I32 testfiles/txtin32.txt testfiles/txtin32.conf txtin32.h5)
- # ----- TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended"
+ # ----- TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended"
ADD_H5_TEST (ASCII_I16 testfiles/txtin16.txt testfiles/txtin16.conf txtin16.h5)
- # ----- TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed "
+ # ----- TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed "
ADD_H5_TEST (ASCII_I8 testfiles/txtin8.txt testfiles/txtin8.conf txtin8.h5)
- # ----- TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed "
+ # ----- TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed "
ADD_H5_TEST (ASCII_UI16 testfiles/txtuin16.txt testfiles/txtuin16.conf txtuin16.h5)
- # ----- TESTING "ASCII UI32 - rank 3 - Output BE"
+ # ----- TESTING "ASCII UI32 - rank 3 - Output BE"
ADD_H5_TEST (ASCII_UI32 testfiles/txtuin32.txt testfiles/txtuin32.conf txtuin32.h5)
- # ----- TESTING "ASCII F32 - rank 3 - Output LE "
+ # ----- TESTING "ASCII F32 - rank 3 - Output LE "
ADD_H5_TEST (ASCII_F32 testfiles/txtfp32.txt testfiles/txtfp32.conf txtfp32.h5)
- # ----- TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed "
+ # ----- TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed "
ADD_H5_TEST (ASCII_F64 testfiles/txtfp64.txt testfiles/txtfp64.conf txtfp64.h5)
# ----- TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed "
@@ -458,7 +438,7 @@
ADD_H5_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY)
endif (NOT USE_FILTER_DEFLATE)
- # ----- TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed "
+ # ----- TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed "
ADD_H5_TEST (BINARY_I8 binin8.bin testfiles/binin8.conf binin8.h5)
if (NOT USE_FILTER_DEFLATE)
ADD_H5_SKIP_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY)
@@ -466,27 +446,27 @@
ADD_H5_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY)
endif (NOT USE_FILTER_DEFLATE)
- # ----- TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended "
+ # ----- TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended "
ADD_H5_TEST (BINARY_I16 binin16.bin testfiles/binin16.conf binin16.h5)
ADD_H5_DUMPTEST (BINARY_I16 "/int/bin/16-bit" binin16.h5 BINARY)
- # ----- TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED "
+ # ----- TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED "
ADD_H5_TEST (BINARY_I32 binin32.bin testfiles/binin32.conf binin32.h5)
ADD_H5_DUMPTEST (BINARY_I32 "/int/bin/32-bit" binin32.h5 BINARY)
- # ----- TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED "
+ # ----- TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED "
ADD_H5_TEST (BINARY_UI16 binuin16.bin testfiles/binuin16.conf binuin16.h5)
ADD_H5_DUMPTEST (BINARY_UI16 "/int/buin/16-bit" binuin16.h5 BINARY)
- # ----- TESTING "BINARY UI32 - rank 3 - Output LE "
+ # ----- TESTING "BINARY UI32 - rank 3 - Output LE "
ADD_H5_TEST (BINARY_UI32 binuin32.bin testfiles/binuin32.conf binuin32.h5)
ADD_H5_DUMPTEST (BINARY_UI32 "/int/buin/32-bit" binuin32.h5 BINARY)
- # ----- TESTING "STR"
+ # ----- TESTING "STR"
ADD_H5_TEST (STR testfiles/txtstr.txt testfiles/txtstr.conf txtstr.h5)
ADD_H5_DUMPTEST (STR "/mytext/data" txtstr.h5)
- # ----- TESTING "BINARY I8 CR LF EOF"
+ # ----- TESTING "BINARY I8 CR LF EOF"
ADD_H5_TEST (BINARY_I8_EOF binin8w.bin testfiles/binin8w.conf binin8w.h5)
ADD_H5_DUMPTEST (BINARY_I8_EOF "/dataset0" binin8w.h5 BINARY)