summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt63
-rw-r--r--test/cache_tagging.c6
-rw-r--r--test/tmisc.c2
3 files changed, 64 insertions, 7 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 3149454..4c79110 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -35,7 +35,9 @@ if (NOT ONLY_SHARED_LIBS)
)
target_compile_options(${HDF5_TEST_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(${HDF5_TEST_LIB_TARGET}
- PRIVATE "H5_TEST_EXPRESS_LEVEL_DEFAULT=${H5_TEST_EXPRESS_LEVEL_DEFAULT}"
+ PRIVATE
+ "H5_TEST_EXPRESS_LEVEL_DEFAULT=${H5_TEST_EXPRESS_LEVEL_DEFAULT}"
+ $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
)
TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_TEST_LIB_TARGET}
@@ -57,8 +59,11 @@ if (BUILD_SHARED_LIBS)
)
target_compile_options(${HDF5_TEST_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(${HDF5_TEST_LIBSH_TARGET}
- PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
- PRIVATE "H5_TEST_EXPRESS_LEVEL_DEFAULT=${H5_TEST_EXPRESS_LEVEL_DEFAULT}"
+ PUBLIC
+ "H5_BUILT_AS_DYNAMIC_LIB"
+ PRIVATE
+ "H5_TEST_EXPRESS_LEVEL_DEFAULT=${H5_TEST_EXPRESS_LEVEL_DEFAULT}"
+ $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
)
TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_TEST_LIBSH_TARGET}
@@ -392,6 +397,10 @@ macro (ADD_H5_EXE file)
add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
target_include_directories (${file} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_compile_definitions(${file}
+ PRIVATE
+ $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ )
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (${file} STATIC)
target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -432,6 +441,10 @@ endforeach ()
#-- Adding test for chunk_info
add_executable (chunk_info ${HDF5_TEST_SOURCE_DIR}/chunk_info.c)
target_compile_options(chunk_info PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_compile_definitions(chunk_info
+ PRIVATE
+ $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+)
target_include_directories (chunk_info PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_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)
@@ -452,6 +465,10 @@ endif ()
#-- Adding test for direct_chunk
add_executable (direct_chunk ${HDF5_TEST_SOURCE_DIR}/direct_chunk.c)
target_compile_options(direct_chunk PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_compile_definitions(direct_chunk
+ PRIVATE
+ $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+)
target_include_directories (direct_chunk PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (direct_chunk STATIC)
@@ -473,6 +490,10 @@ endif ()
#-- Adding test for testhdf5
add_executable (testhdf5 ${testhdf5_SOURCES})
target_compile_options(testhdf5 PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_compile_definitions(testhdf5
+ PRIVATE
+ $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+)
target_include_directories (testhdf5 PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (testhdf5 STATIC)
@@ -493,6 +514,10 @@ endif ()
#-- Adding test for cache_image
add_executable (cache_image ${cache_image_SOURCES})
target_compile_options(cache_image PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_compile_definitions(cache_image
+ PRIVATE
+ $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+)
target_include_directories (cache_image PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (cache_image STATIC)
@@ -513,6 +538,10 @@ endif ()
#-- Adding test for ttsafe
add_executable (ttsafe ${ttsafe_SOURCES})
target_compile_options(ttsafe PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_compile_definitions(ttsafe
+ PRIVATE
+ $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+)
target_include_directories (ttsafe PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (ttsafe STATIC)
@@ -539,6 +568,10 @@ endif ()
#-- Adding test for thread_id
add_executable (thread_id ${HDF5_TEST_SOURCE_DIR}/thread_id.c)
target_compile_options(thread_id PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_compile_definitions(thread_id
+ PRIVATE
+ $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+)
target_include_directories (thread_id PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (thread_id STATIC)
@@ -645,6 +678,10 @@ macro (ADD_H5_VDS_EXE file)
add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c ${HDF5_TEST_SOURCE_DIR}/vds_swmr.h)
target_include_directories (${file} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_compile_definitions(${file}
+ PRIVATE
+ $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ )
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (${file} STATIC)
target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -671,6 +708,10 @@ endforeach ()
# and it can't be renamed (i.e., no <foo>-shared).
add_executable (accum_swmr_reader ${HDF5_TEST_SOURCE_DIR}/accum_swmr_reader.c)
target_compile_options(accum_swmr_reader PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_compile_definitions(accum_swmr_reader
+ PRIVATE
+ $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+)
target_include_directories (accum_swmr_reader PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (accum_swmr_reader STATIC)
@@ -741,6 +782,10 @@ endif ()
set (use_append_chunk_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_chunk.c ${HDF5_TEST_SOURCE_DIR}/use_common.c ${HDF5_TEST_SOURCE_DIR}/use.h)
add_executable (use_append_chunk ${use_append_chunk_SOURCES})
target_compile_options(use_append_chunk PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_compile_definitions(use_append_chunk
+ PRIVATE
+ $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+)
target_include_directories (use_append_chunk PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (use_append_chunk STATIC)
@@ -762,6 +807,10 @@ if (HDF5_BUILD_UTILS) # requires mirror server
set (use_append_chunk_mirror_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_chunk_mirror.c ${HDF5_TEST_SOURCE_DIR}/use_common.c ${HDF5_TEST_SOURCE_DIR}/use.h)
add_executable (use_append_chunk_mirror ${use_append_chunk_mirror_SOURCES})
target_compile_options(use_append_chunk_mirror PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_compile_definitions(use_append_chunk_mirror
+ PRIVATE
+ $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ )
target_include_directories (use_append_chunk_mirror PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (use_append_chunk_mirror STATIC)
@@ -783,6 +832,10 @@ endif ()
set (use_append_mchunks_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_mchunks.c ${HDF5_TEST_SOURCE_DIR}/use_common.c ${HDF5_TEST_SOURCE_DIR}/use.h)
add_executable (use_append_mchunks ${use_append_mchunks_SOURCES})
target_compile_options(use_append_mchunks PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_compile_definitions(use_append_mchunks
+ PRIVATE
+ $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+)
target_include_directories (use_append_mchunks PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (use_append_mchunks STATIC)
@@ -803,6 +856,10 @@ endif ()
set (use_disable_mdc_flushes_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_disable_mdc_flushes.c)
add_executable (use_disable_mdc_flushes ${use_disable_mdc_flushes_SOURCES})
target_compile_options(use_disable_mdc_flushes PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_compile_definitions(use_disable_mdc_flushes
+ PRIVATE
+ $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+)
target_include_directories (use_disable_mdc_flushes PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (use_disable_mdc_flushes STATIC)
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 6d15ee0..71260a8 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -4454,7 +4454,7 @@ error:
static unsigned
check_invalid_tag_application(void)
{
-#if H5C_DO_TAGGING_SANITY_CHECKS
+#ifdef H5C_DO_TAGGING_SANITY_CHECKS
/* Variables */
H5F_t *f = NULL;
hid_t fid = -1;
@@ -4467,7 +4467,7 @@ check_invalid_tag_application(void)
/* Testing Macro */
TESTING("failure on invalid tag application");
-#if H5C_DO_TAGGING_SANITY_CHECKS
+#ifdef H5C_DO_TAGGING_SANITY_CHECKS
/* Create Fapl */
if ((fapl = h5_fileaccess_flags(H5_FILEACCESS_LIBVER)) < 0)
TEST_ERROR;
@@ -4537,7 +4537,7 @@ check_invalid_tag_application(void)
return 0;
-#if H5C_DO_TAGGING_SANITY_CHECKS
+#ifdef H5C_DO_TAGGING_SANITY_CHECKS
error:
if (api_ctx_pushed)
H5CX_pop(FALSE);
diff --git a/test/tmisc.c b/test/tmisc.c
index db48c11..c8da98c 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -5909,7 +5909,7 @@ test_misc35(void)
ret = H5get_free_list_sizes(&reg_size_start, &arr_size_start, &blk_size_start, &fac_size_start);
CHECK(ret, FAIL, "H5get_free_list_sizes");
-#if !defined H5_USING_MEMCHECKER
+#if !defined H5_NO_FREE_LISTS && !defined H5_USING_MEMCHECKER
/* All the free list values should be >0 */
CHECK(reg_size_start, 0, "H5get_free_list_sizes");
CHECK(arr_size_start, 0, "H5get_free_list_sizes");