summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/CMakeLists.txt2
-rw-r--r--test/CMakeTests.cmake106
2 files changed, 108 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 772f790..f335fa2 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -236,6 +236,7 @@ set (H5_TESTS
extend
direct_chunk # compression lib link
external
+ external_env
efc
objcopy
links
@@ -255,6 +256,7 @@ set (H5_TESTS
enc_dec_plist_cross_platform
getname
vfd
+ vfd_env
ntypes
dangle
dtransform
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index c606eb1..40984b5 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -542,8 +542,10 @@ set (H5TEST_SEPARATE_TESTS
testhdf5
cache
cache_image
+ external_env
flush1
flush2
+ vds_env
)
foreach (h5_test ${H5_TESTS})
if (NOT h5_test IN_LIST H5TEST_SEPARATE_TESTS)
@@ -679,6 +681,49 @@ set_tests_properties (H5TEST-cache_image PROPERTIES
)
endif ()
+#-- Adding test for external_env
+add_test (
+ NAME H5TEST-clear-external_env-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ extern_1r.raw
+ extern_2r.raw
+ extern_3r.raw
+ extern_4r.raw
+ extern_1w.raw
+ extern_2w.raw
+ extern_3w.raw
+ extern_4w.raw
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+set_tests_properties (H5TEST-clear-external_env-objects PROPERTIES FIXTURES_SETUP external_env_clear_objects)
+add_test (NAME H5TEST-external_env COMMAND $<TARGET_FILE:external_env>)
+set_tests_properties (H5TEST-external_env PROPERTIES
+ FIXTURES_REQUIRED external_env_clear_objects
+ ENVIRONMENT "HDF5_EXTFILE_PREFIX=\${ORIGIN}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+
+#-- Adding test for vds_env
+add_test (
+ NAME H5TEST-clear-vds_env-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ vds_virt_0.h5
+ vds_virt_3.h5
+ vds_src_2.h5
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+set_tests_properties (H5TEST-clear-vds_env-objects PROPERTIES FIXTURES_SETUP vds_env_clear_objects)
+add_test (NAME H5TEST-vds_env COMMAND $<TARGET_FILE:vds_env>)
+set_tests_properties (H5TEST-vds_env PROPERTIES
+ FIXTURES_REQUIRED vds_env_clear_objects
+ ENVIRONMENT "HDF5_VDS_PREFIX=\${ORIGIN}/tmp"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+
if (BUILD_SHARED_LIBS)
#-- Adding test for cache
if (NOT CYGWIN AND NOT WIN32)
@@ -1041,6 +1086,67 @@ if (BUILD_SHARED_LIBS)
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
+ #-- Adding test for external_env
+ add_test (NAME H5TEST-shared-clear-external_env-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ extern_1r.raw
+ extern_2r.raw
+ extern_3r.raw
+ extern_4r.raw
+ extern_1w.raw
+ extern_2w.raw
+ extern_3w.raw
+ extern_4w.raw
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ set_tests_properties (H5TEST-shared-clear-external_env-objects PROPERTIES FIXTURES_SETUP shared_external_env_clear_objects)
+ add_test (NAME H5TEST-shared-external_env COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:external_env-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_ENV_VAR:STRING=HDF5_EXTFILE_PREFIX"
+ -D "TEST_ENV_VALUE:STRING=\${ORIGIN}"
+ -D "TEST_EXPECT=0"
+ -D "TEST_OUTPUT=external_env.txt"
+ -D "TEST_REFERENCE=external_env.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5TEST-shared-external_env PROPERTIES
+ FIXTURES_REQUIRED shared_external_env_clear_objects
+ ENVIRONMENT "HDF5_EXTFILE_PREFIX=\${ORIGIN}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+
+ #-- Adding test for vds_env
+ add_test (NAME H5TEST-shared-clear-vds_env-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ vds_virt_0.h5
+ vds_virt_3.h5
+ vds_src_2.h5
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ set_tests_properties (H5TEST-shared-clear-vds_env-objects PROPERTIES FIXTURES_SETUP shared_vds_env_clear_objects)
+ add_test (NAME H5TEST-shared-vds_env COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:vds_env-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_ENV_VAR:STRING=HDF5_VDS_PREFIX"
+ -D "TEST_ENV_VALUE:STRING=\${ORIGIN}/tmp"
+ -D "TEST_EXPECT=0"
+ -D "TEST_OUTPUT=vds_env.txt"
+ -D "TEST_REFERENCE=vds_env.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5TEST-shared-vds_env PROPERTIES
+ FIXTURES_REQUIRED shared_vds_env_clear_objects
+ ENVIRONMENT "HDF5_VDS_PREFIX=\${ORIGIN}/tmp"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+
#-- Adding test for libinfo
add_test (NAME H5TEST-shared-testlibinfo
COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIBSH_TARGET}>" -P "${GREP_RUNNER}"