mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
Move h5repacktst file generation to h5repackgentest (#5564)
This commit is contained in:
@@ -52,6 +52,7 @@ foreach(tool ${HDF5_TOOLS};${HDF5_TOOLS_MISC})
|
||||
${HDF5_LIB_TARGET}
|
||||
${HDF5_TOOLS_LIB_TARGET}
|
||||
${HDF5_REQUIRED_LIBRARIES} # For math lib
|
||||
${HDF5_TEST_LIB_TARGET}
|
||||
)
|
||||
else ()
|
||||
TARGET_C_PROPERTIES(${tool}gentest SHARED)
|
||||
@@ -59,6 +60,7 @@ foreach(tool ${HDF5_TOOLS};${HDF5_TOOLS_MISC})
|
||||
${HDF5_LIBSH_TARGET}
|
||||
${HDF5_TOOLS_LIBSH_TARGET}
|
||||
${HDF5_REQUIRED_LIBRARIES}
|
||||
${HDF5_TEST_LIBSH_TARGET}
|
||||
)
|
||||
endif ()
|
||||
|
||||
@@ -67,7 +69,7 @@ foreach(tool ${HDF5_TOOLS};${HDF5_TOOLS_MISC})
|
||||
)
|
||||
|
||||
target_link_libraries(h5gentest PRIVATE ${tool}gentest)
|
||||
endforeach()
|
||||
endforeach ()
|
||||
|
||||
set_target_properties (h5gentest PROPERTIES FOLDER generator/tools)
|
||||
|
||||
|
||||
@@ -340,6 +340,7 @@ gen_h5repack_files(void)
|
||||
nerrors += (generate_f32le(external) < 0 ? 1 : 0);
|
||||
} /* end for external data storage or not */
|
||||
|
||||
nerrors += (make_h5repack_testfiles() < 0 ? 1 : 0);
|
||||
return nerrors;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,19 +27,19 @@ set (REPACK_COMMON_SOURCES
|
||||
${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack_verify.c
|
||||
${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack.c
|
||||
)
|
||||
# Add h5repack test executable
|
||||
add_executable (h5repacktest ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/h5repacktst.c)
|
||||
target_include_directories (h5repacktest
|
||||
PRIVATE "${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR};${HDF5_TOOLS_ROOT_DIR}/lib;${HDF5_SRC_INCLUDE_DIRS};${HDF5_TEST_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
|
||||
)
|
||||
if (BUILD_STATIC_LIBS)
|
||||
if (HDF5_BUILD_STATIC_TOOLS)
|
||||
TARGET_C_PROPERTIES (h5repacktest STATIC)
|
||||
target_link_libraries (h5repacktest PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
|
||||
target_link_libraries (h5repacktest PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} h5repackgentest)
|
||||
else ()
|
||||
TARGET_C_PROPERTIES (h5repacktest SHARED)
|
||||
target_link_libraries (h5repacktest PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET})
|
||||
target_link_libraries (h5repacktest PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET} h5repackgentest)
|
||||
endif ()
|
||||
set_target_properties (h5repacktest PROPERTIES FOLDER tools)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# If plugin library tests can be tested
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
@@ -108,4 +108,4 @@ endmacro ()
|
||||
# Run test with different Virtual File Driver
|
||||
foreach (vfd ${VFD_LIST})
|
||||
ADD_VFD_TEST (${vfd} 0)
|
||||
endforeach ()
|
||||
endforeach ()
|
||||
File diff suppressed because it is too large
Load Diff
@@ -20,5 +20,116 @@ int generate_int32le_2d(bool external);
|
||||
int generate_int32le_3d(bool external);
|
||||
int generate_uint8be(bool external);
|
||||
int generate_f32le(bool external);
|
||||
int make_h5repack_testfiles(void);
|
||||
int verify_userblock(const char *filename);
|
||||
|
||||
/* fill value test */
|
||||
#define H5REPACK_FNAME0 "h5repack_fill.h5"
|
||||
#define H5REPACK_FNAME0OUT "h5repack_fill_out.h5"
|
||||
/* HDF5 objects and all dataset datatypes */
|
||||
#define H5REPACK_FNAME1 "h5repack_objs.h5"
|
||||
#define H5REPACK_FNAME1OUT "h5repack_objs_out.h5"
|
||||
/* attributes, all datatypes */
|
||||
#define H5REPACK_FNAME2 "h5repack_attr.h5"
|
||||
#define H5REPACK_FNAME2OUT "h5repack_attr_out.h5"
|
||||
/* hard links */
|
||||
#define H5REPACK_FNAME3 "h5repack_hlink.h5"
|
||||
#define H5REPACK_FNAME3OUT "h5repack_hlink_out.h5"
|
||||
/* layout */
|
||||
#define H5REPACK_FNAME4 "h5repack_layout.h5"
|
||||
#define H5REPACK_FNAME4OUT "h5repack_layout_out.h5"
|
||||
/* H5D_ALLOC_TIME_EARLY */
|
||||
#define H5REPACK_FNAME5 "h5repack_early.h5"
|
||||
#define H5REPACK_FNAME5OUT "h5repack_early_out.h5"
|
||||
#define H5REPACK_FNAME6 "h5repack_early2.h5"
|
||||
#ifdef H5_HAVE_FILTER_SZIP
|
||||
/* SZIP filter */
|
||||
#define H5REPACK_FNAME7 "h5repack_szip.h5"
|
||||
#define H5REPACK_FNAME7OUT "h5repack_szip_out.h5"
|
||||
#endif
|
||||
/* GZIP filter */
|
||||
#define H5REPACK_FNAME8 "h5repack_deflate.h5"
|
||||
#define H5REPACK_FNAME8OUT "h5repack_deflate_out.h5"
|
||||
/* GZIP filter */
|
||||
#define H5REPACK_FNAME9 "h5repack_shuffle.h5"
|
||||
#define H5REPACK_FNAME9OUT "h5repack_shuffle_out.h5"
|
||||
/* Fletcher filter */
|
||||
#define H5REPACK_FNAME10 "h5repack_fletcher.h5"
|
||||
#define H5REPACK_FNAME10OUT "h5repack_fletcher_out.h5"
|
||||
/* All filters */
|
||||
#define H5REPACK_FNAME11 "h5repack_filters.h5"
|
||||
#if defined(H5_HAVE_FILTER_DEFLATE)
|
||||
#define H5REPACK_FNAME11OUT "h5repack_filters_out.h5"
|
||||
#endif
|
||||
/* NBit filter */
|
||||
#define H5REPACK_FNAME12 "h5repack_nbit.h5"
|
||||
#define H5REPACK_FNAME12OUT "h5repack_nbit_out.h5"
|
||||
/* Scale Offset filter */
|
||||
#define H5REPACK_FNAME13 "h5repack_soffset.h5"
|
||||
#define H5REPACK_FNAME13OUT "h5repack_soffset_out.h5"
|
||||
/* Big file to test read by hyperslabs */
|
||||
#define H5REPACK_FNAME14 "h5repack_big.h5"
|
||||
#define H5REPACK_FNAME14OUT "h5repack_big_out.h5"
|
||||
/* external file */
|
||||
#define H5REPACK_FNAME15 "h5repack_ext.h5"
|
||||
#define H5REPACK_FNAME15OUT "h5repack_ext_out.h5"
|
||||
/* File w/userblock */
|
||||
#define H5REPACK_FNAME16 "h5repack_ub.h5"
|
||||
#define H5REPACK_FNAME16OUT "h5repack_ub_out.h5"
|
||||
/* Named datatypes */
|
||||
#define H5REPACK_FNAME17 "h5repack_named_dtypes.h5"
|
||||
#define H5REPACK_FNAME17OUT "h5repack_named_dtypes_out.h5"
|
||||
|
||||
#define H5REPACK_FNAME18 "h5repack_layout2.h5"
|
||||
|
||||
#define H5REPACK_FNAME19 "h5repack_layout3.h5"
|
||||
|
||||
#define H5REPACK_FNAME_UB "ublock.bin"
|
||||
|
||||
/* obj and region references */
|
||||
#define H5REPACK_FNAME_REF "h5repack_refs.h5"
|
||||
|
||||
/* obj and region references in attr of compound and vlen type */
|
||||
#define H5REPACK_FNAME_ATTR_REF "h5repack_attr_refs.h5"
|
||||
|
||||
#define FSPACE_OUT "h5repack_fspace_OUT.h5" /* The output file */
|
||||
|
||||
#define H5REPACK_EXTFILE "h5repack_ext.bin"
|
||||
|
||||
/* Filenames for generated h5repack test HDF5 files */
|
||||
static const char *H5REPACK_TEST_H5_FILES[] = {
|
||||
H5REPACK_FNAME0, H5REPACK_FNAME0OUT, H5REPACK_FNAME1, H5REPACK_FNAME1OUT,
|
||||
H5REPACK_FNAME2, H5REPACK_FNAME2OUT, H5REPACK_FNAME3, H5REPACK_FNAME3OUT,
|
||||
H5REPACK_FNAME4, H5REPACK_FNAME4OUT, H5REPACK_FNAME5, H5REPACK_FNAME5OUT,
|
||||
H5REPACK_FNAME6,
|
||||
#ifdef H5_HAVE_FILTER_SZIP
|
||||
H5REPACK_FNAME7, H5REPACK_FNAME7OUT,
|
||||
#endif
|
||||
H5REPACK_FNAME8, H5REPACK_FNAME8OUT, H5REPACK_FNAME9, H5REPACK_FNAME9OUT,
|
||||
H5REPACK_FNAME10, H5REPACK_FNAME10OUT, H5REPACK_FNAME11,
|
||||
#if defined(H5_HAVE_FILTER_SZIP) && defined(H5_HAVE_FILTER_DEFLATE)
|
||||
H5REPACK_FNAME11OUT,
|
||||
#endif
|
||||
H5REPACK_FNAME12, H5REPACK_FNAME12OUT, H5REPACK_FNAME13, H5REPACK_FNAME13OUT,
|
||||
H5REPACK_FNAME14, H5REPACK_FNAME14OUT, H5REPACK_FNAME15, H5REPACK_FNAME15OUT,
|
||||
H5REPACK_FNAME16, H5REPACK_FNAME16OUT, H5REPACK_FNAME17, H5REPACK_FNAME17OUT,
|
||||
H5REPACK_FNAME18, H5REPACK_FNAME19, H5REPACK_FNAME_REF, H5REPACK_FNAME_ATTR_REF,
|
||||
FSPACE_OUT,
|
||||
};
|
||||
|
||||
static const char *H5REPACK_FSPACE_FNAMES[] = {
|
||||
"h5repack_latest.h5", /* 0 */
|
||||
"h5repack_default.h5", /* 1 */
|
||||
"h5repack_page_persist.h5", /* 2 */
|
||||
"h5repack_fsm_aggr_persist.h5", /* 3 */
|
||||
"h5repack_page_threshold.h5", /* 4 */
|
||||
"h5repack_fsm_aggr_threshold.h5", /* 5 */
|
||||
"h5repack_aggr.h5", /* 6 */
|
||||
"h5repack_none.h5" /* 7 */
|
||||
};
|
||||
|
||||
static const char *H5REPACK_TEST_MISC_FILES[] = {H5REPACK_FNAME_UB, H5REPACK_EXTFILE};
|
||||
|
||||
#define USERBLOCK_SIZE 2048
|
||||
|
||||
#endif /* H5REPACK_GENTEST_H */
|
||||
+220
-5751
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user