diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2019-09-04 07:09:35 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2019-09-04 07:09:35 (GMT) |
commit | 339bf241bebfc7b9634e1880899acc23b055949a (patch) | |
tree | ccc79bc92d7b6c62752bc0036a2e599f75b7deda /test | |
parent | 714804b28018c8096f65debbbb9f57f7dab2a7f6 (diff) | |
parent | b1dab421dec1b7be64ef2c804a7e0e9b68630fc9 (diff) | |
download | hdf5-339bf241bebfc7b9634e1880899acc23b055949a.zip hdf5-339bf241bebfc7b9634e1880899acc23b055949a.tar.gz hdf5-339bf241bebfc7b9634e1880899acc23b055949a.tar.bz2 |
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~bmribler/hdf5-bmr into develop
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 15 | ||||
-rw-r--r-- | test/flushrefreshTest.cmake | 14 | ||||
-rw-r--r-- | test/h5test.c | 2 |
3 files changed, 22 insertions, 9 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c1ac44c..8184d7f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -242,7 +242,7 @@ set (H5_TESTS page_buffer dtypes dsets - chunk_info + chunk_info # compression lib link cmpd_dset filter_fail extend @@ -302,6 +302,7 @@ macro (ADD_H5_EXE file) endmacro () set (H5_TESTS_MULTIPLE + chunk_info direct_chunk testhdf5 cache_image @@ -318,6 +319,18 @@ endforeach () ### M U L T I P L E S O U R C E T E S T S ### ############################################################################## ######### Also special handling of link libs ############# +#-- Adding test for chunk_info +add_executable (chunk_info ${HDF5_TEST_SOURCE_DIR}/chunk_info.c) +target_include_directories (chunk_info PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") +if (NOT BUILD_SHARED_LIBS) + TARGET_C_PROPERTIES (chunk_info STATIC) + target_link_libraries (chunk_info PRIVATE ${HDF5_TEST_LIB_TARGET} ${LINK_COMP_LIBS}) +else () + TARGET_C_PROPERTIES (chunk_info SHARED) + target_link_libraries (chunk_info PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${LINK_COMP_LIBS}) +endif () +set_target_properties (chunk_info PROPERTIES FOLDER test) + #-- Adding test for direct_chunk add_executable (direct_chunk ${HDF5_TEST_SOURCE_DIR}/direct_chunk.c) target_include_directories (direct_chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") diff --git a/test/flushrefreshTest.cmake b/test/flushrefreshTest.cmake index 01faad5..6faf37b 100644 --- a/test/flushrefreshTest.cmake +++ b/test/flushrefreshTest.cmake @@ -30,11 +30,11 @@ if (NOT PERL_EXECUTABLE) message (STATUS "Require PERL_EXECUTABLE to be defined") endif () -if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}) +if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}") file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}) endif () -if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err) +if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err") file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err) endif () @@ -69,10 +69,10 @@ endif () set (verification_done "0") while (verification_done LESS "1") message (STATUS "checking first stage:${TEST_FOLDER}/${TEST_ARGS1}") - if (EXISTS ${TEST_FOLDER}/${TEST_ERR}) + if (EXISTS "${TEST_FOLDER}/${TEST_ERR}") # Error exit script set (verification_done "3") - elseif (EXISTS ${TEST_FOLDER}/${TEST_ARGS1}) + elseif (EXISTS "${TEST_FOLDER}/${TEST_ARGS1}") file (STRINGS ${TEST_FOLDER}/${TEST_ARGS1} v1) list (LENGTH v1 len_v1) message (STATUS "v1:${v1} len_v1:${len_v1}") @@ -112,10 +112,10 @@ endwhile () while (verification_done LESS "2") message (STATUS "checking second stage:${TEST_FOLDER}/${TEST_ARGS1}") - if (EXISTS ${TEST_FOLDER}/${TEST_ERR}) + if (EXISTS "${TEST_FOLDER}/${TEST_ERR}") # Error exit script set (verification_done "3") - elseif (EXISTS ${TEST_FOLDER}/${TEST_ARGS1}) + elseif (EXISTS "${TEST_FOLDER}/${TEST_ARGS1}") file (STRINGS ${TEST_FOLDER}/${TEST_ARGS1} v1) list (LENGTH v1 len_v1) message (STATUS "v1:${v1} len_v1:${len_v1}") @@ -158,7 +158,7 @@ message (STATUS "COMMAND Result: ${TEST_RESULT}") # if the return value is !=${TEST_EXPECT} bail out if (NOT TEST_RESULT EQUAL TEST_EXPECT) if (NOT TEST_NOERRDISPLAY) - if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}) + if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}") file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) message (STATUS "Output :\n${TEST_STREAM}") endif () diff --git a/test/h5test.c b/test/h5test.c index 7cb5345..dd8d906 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -1193,7 +1193,7 @@ h5_show_hostname(void) #endif #ifdef H5_HAVE_GETHOSTNAME - if (gethostname(hostname, (size_t)80) < 0) + if (HDgethostname(hostname, (size_t)80) < 0) HDprintf(" gethostname failed\n"); else HDprintf(" hostname=%s\n", hostname); |