summaryrefslogtreecommitdiffstats
path: root/test/CMakeTests.cmake
diff options
context:
space:
mode:
authorRay Lu <songyulu@hdfgroup.org>2019-04-18 15:25:18 (GMT)
committerRay Lu <songyulu@hdfgroup.org>2019-04-18 15:25:18 (GMT)
commitbdb11caa5372a0bec531b38497891934b6cefa9b (patch)
treeb0571082a09cbe54295f9f67cbd71cf936ffe9b4 /test/CMakeTests.cmake
parent90efe04beef7073edbe2d5cc5adc535ed3d6ce80 (diff)
parentb5ef82a1786605ae86502bc82086047720b7d4ca (diff)
downloadhdf5-bdb11caa5372a0bec531b38497891934b6cefa9b.zip
hdf5-bdb11caa5372a0bec531b38497891934b6cefa9b.tar.gz
hdf5-bdb11caa5372a0bec531b38497891934b6cefa9b.tar.bz2
Merge pull request #1600 in HDFFV/hdf5 from ~SONGYULU/hdf5_ray:HDFFV-10658-performance-drop-from-1-8 to develop
* commit 'b5ef82a1786605ae86502bc82086047720b7d4ca': (21 commits) Moving the handling of null prefix into H5_combine_path. Changing the prefix of external file and VDS from empty string to null for performance improvement. Improving the condition checking of empty string. Replacing string operation strdup with assignment for empty string. Adding back links_env.out which I accidentally removed in my previous commit. Taking out two unnecessary diff output files. Taking out unnecessary diff files for output. Adding some comments. Some coding style changes. Adding the standard output files for the external_env.c and vds_env.c tests. Small correction for my previous commit. Forgot to add external_common.c and external_common.h. Updated CMake for the splitting of external.c and vds.c. Minor fix: removal of unnecessary enum values. Minor fixes: updating the test vds_env.c according to the set up of vds.c. Left out this file in previous commit. HDFFV-10658 - setting and getting properties in API context: 1. switched to use the existing H5F_prefix_open_t for enum type; 2. put the common private function used by external.c and external_env.c into external_common.c This commit basically has the following changes: 1. restored the datatype, dataspace, and LCPL of the dataset for VOL connector back to the properties. 2. splitted external.c and vds.c because they called HDsetenv in the program, instead using shell scripts to set the environment variables. 3. changed H5CX_get_vds_prefix and H5CX_get_ext_file_prefix to use H5P_peek instead of H5P_get. HDFFV-10658: I left out this file in my previous commit. HDFFV-10658: 1. moving HDgetenv to dataset initialization stage to reduce the overhead; 2. restoring the retrieval of three vol properties to H5P_get instead of using API context to prepare for Quincey's upcoming refactoring work. ...
Diffstat (limited to 'test/CMakeTests.cmake')
-rw-r--r--test/CMakeTests.cmake128
1 files changed, 128 insertions, 0 deletions
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 2ae6fec..470feef 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,71 @@ set_tests_properties (H5TEST-cache_image PROPERTIES
)
endif ()
+#-- Adding test for external_env
+add_test (
+ NAME H5TEST-clear-external_env-objects
+ COMMAND ${CMAKE_COMMAND}
+ -D "TEST_PROGRAM=$<TARGET_FILE:external_env>"
+ -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"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ -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
+ external_env.txt
+ external_env.out
+ 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 "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+
+#-- Adding test for vds_env
+add_test (
+ NAME H5TEST-clear-vds_env-objects
+ COMMAND ${CMAKE_COMMAND}
+ -D "TEST_PROGRAM=$<TARGET_FILE:vds_env>"
+ -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"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ -E remove
+ vds_virt_0.h5
+ vds_virt_3.h5
+ vds_src_2.h5
+ vds_env.txt
+ vds_env.out
+ 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 "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+
if (BUILD_SHARED_LIBS)
#-- Adding test for cache
if (NOT CYGWIN AND NOT WIN32)
@@ -1045,6 +1112,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 "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
+ 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 "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
+ 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}"