summaryrefslogtreecommitdiffstats
path: root/c++/test/CMakeTests.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'c++/test/CMakeTests.cmake')
-rw-r--r--c++/test/CMakeTests.cmake15
1 files changed, 9 insertions, 6 deletions
diff --git a/c++/test/CMakeTests.cmake b/c++/test/CMakeTests.cmake
index c725f69..91c36b0 100644
--- a/c++/test/CMakeTests.cmake
+++ b/c++/test/CMakeTests.cmake
@@ -1,3 +1,5 @@
+HDFTEST_COPY_FILE("${HDF5_CPP_TEST_SOURCE_DIR}/th5s.h5" "${PROJECT_BINARY_DIR}/th5s.h5" "cpp_testhdf5_files")
+add_custom_target(cpp_testhdf5_files ALL COMMENT "Copying files needed by cpp_testhdf5 tests" DEPENDS ${cpp_testhdf5_files_list})
##############################################################################
##############################################################################
@@ -8,7 +10,7 @@
add_test (
NAME CPP_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
tattr_basic.h5
tattr_compound.h5
tattr_dtype.h5
@@ -30,17 +32,18 @@ if (HDF5_TEST_VFD)
multi
family
)
-
+
if (DIRECT_VFD)
set (VFD_LIST ${VFD_LIST} direct)
endif (DIRECT_VFD)
MACRO (ADD_VFD_TEST vfdname resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}")
add_test (
NAME CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
tattr_basic.h5
tattr_compound.h5
tattr_dtype.h5
@@ -49,21 +52,21 @@ if (HDF5_TEST_VFD)
tfattrs.h5
)
add_test (
- NAME CPP_VFD-${vfdname}-cpp_testhdf5
+ NAME CPP_VFD-${vfdname}-cpp_testhdf5
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:cpp_testhdf5>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_OUTPUT=cpp_testhdf5"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects)
set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES TIMEOUT 30)
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_VFD_TEST)
-
+
# Run test with different Virtual File Driver
foreach (vfd ${VFD_LIST})
ADD_VFD_TEST (${vfd} 0)