summaryrefslogtreecommitdiffstats
path: root/tools/test/h5copy/CMakeTests.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/h5copy/CMakeTests.cmake')
-rw-r--r--tools/test/h5copy/CMakeTests.cmake32
1 files changed, 19 insertions, 13 deletions
diff --git a/tools/test/h5copy/CMakeTests.cmake b/tools/test/h5copy/CMakeTests.cmake
index 85a8788..856aa72 100644
--- a/tools/test/h5copy/CMakeTests.cmake
+++ b/tools/test/h5copy/CMakeTests.cmake
@@ -45,6 +45,12 @@
endforeach ()
add_custom_target(h5copy_files ALL COMMENT "Copying files needed by h5copy tests" DEPENDS ${h5copy_files_list})
+ if (NOT BUILD_SHARED_LIBS)
+ set (tgt_ext "")
+ else ()
+ set (tgt_ext "-shared")
+ endif ()
+
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -52,7 +58,7 @@
##############################################################################
#
- # Perform h5copy according to passing parmeters
+ # Perform h5copy according to passing parameters
#
macro (ADD_H5_F_TEST testname resultcode infile fparam vparam sparam srcname dparam dstname)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -67,7 +73,7 @@
add_test (
NAME H5COPY_F-${testname}
- COMMAND $<TARGET_FILE:h5copy> -f ${fparam} -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ COMMAND $<TARGET_FILE:h5copy${tgt_ext}> -f ${fparam} -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
if (last_test)
@@ -81,7 +87,7 @@
if (NOT ${resultcode} EQUAL 2)
add_test (
NAME H5COPY_F-${testname}-DIFF
- COMMAND $<TARGET_FILE:h5diff> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ COMMAND $<TARGET_FILE:h5diff${tgt_ext}> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname})
if (${resultcode} EQUAL 1)
@@ -103,7 +109,7 @@
add_test (
NAME H5COPY-${testname}
- COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ COMMAND $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
if (last_test)
@@ -117,7 +123,7 @@
if (NOT ${resultcode} EQUAL 2)
add_test (
NAME H5COPY-${testname}-DIFF
- COMMAND $<TARGET_FILE:h5diff> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ COMMAND $<TARGET_FILE:h5diff${tgt_ext}> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
if (${resultcode} EQUAL 1)
@@ -149,7 +155,7 @@
add_test (
NAME H5COPY-${testname}-prefill
- COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
+ COMMAND $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
if (last_test)
@@ -161,14 +167,14 @@
add_test (
NAME H5COPY-${testname}
- COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ COMMAND $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-prefill)
# resultcode=2 will cause the test to skip the diff test
if (NOT ${resultcode} EQUAL 2)
add_test (
NAME H5COPY-${testname}-DIFF
- COMMAND $<TARGET_FILE:h5diff> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ COMMAND $<TARGET_FILE:h5diff${tgt_ext}> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
if (${resultcode} EQUAL 1)
@@ -190,7 +196,7 @@
add_test (
NAME H5COPY_SAME-${testname}-prefill
- COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${pfile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
+ COMMAND $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${pfile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
if (last_test)
@@ -202,14 +208,14 @@
add_test (
NAME H5COPY_SAME-${testname}
- COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${testname}.out.h5 -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ COMMAND $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${testname}.out.h5 -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
set_tests_properties (H5COPY_SAME-${testname} PROPERTIES DEPENDS H5COPY_SAME-${testname}-prefill)
# resultcode=2 will cause the test to skip the diff test
if (NOT ${resultcode} EQUAL 2)
add_test (
NAME H5COPY_SAME-${testname}-DIFF
- COMMAND $<TARGET_FILE:h5diff> -v ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ COMMAND $<TARGET_FILE:h5diff${tgt_ext}> -v ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
set_tests_properties (H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname})
if (${resultcode} EQUAL 1)
@@ -225,7 +231,7 @@
macro (ADD_H5_CMP_TEST testname resultcode infile vparam sparam srcname dparam dstname)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5COPY-CMP-${testname} COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN})
+ add_test (NAME H5COPY-CMP-${testname} COMMAND $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN})
if (${resultcode} EQUAL 1)
set_tests_properties (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true")
endif ()
@@ -245,7 +251,7 @@
add_test (
NAME H5COPY-CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5copy>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5copy${tgt_ext}>"
-D "TEST_ARGS=-i;./testfiles/${infile};-o;./testfiles/${testname}.out.h5;${vparam};${sparam};${srcname};${dparam};${dstname}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=./testfiles/${testname}.out.out"