mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-05 16:20:10 +08:00
HDF5 zstd testing requires shell script testing to set the plugin path
This commit is contained in:
parent
8020753959
commit
d2ade6ae6a
@ -7,13 +7,6 @@
|
||||
|
||||
SET(H5TESTS tst_h_files tst_h_files2 tst_h_files4 tst_h_atts tst_h_atts3 tst_h_atts4 tst_h_vars tst_h_vars2 tst_h_vars3 tst_h_grps tst_h_compounds tst_h_compounds2 tst_h_wrt_cmp tst_h_vl tst_h_opaques tst_h_strings tst_h_strings1 tst_h_strings2 tst_h_ints tst_h_dimscales tst_h_dimscales1 tst_h_dimscales2 tst_h_dimscales3 tst_h_enums tst_h_dimscales4 tst_h_rename)
|
||||
|
||||
# If zstd is enabled, run a test for it.
|
||||
if(NETCDF_ENABLE_PLUGINS)
|
||||
if(NETCDF_ENABLE_FILTER_ZSTD)
|
||||
set(H5TESTS ${H5TESTS} tst_h_zstd)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.h5 ${CMAKE_CURRENT_SOURCE_DIR}/*.nc)
|
||||
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
|
||||
|
||||
@ -31,3 +24,13 @@ IF(TEST_PARALLEL4)
|
||||
build_bin_test(tst_h_par_compress)
|
||||
add_sh_test(h5_test run_par_tests)
|
||||
ENDIF()
|
||||
|
||||
# If zstd is enabled, run a test for it.
|
||||
if(NETCDF_ENABLE_PLUGINS)
|
||||
if(NETCDF_ENABLE_FILTER_ZSTD)
|
||||
build_bin_test(tst_h_zstd)
|
||||
add_sh_test(h5_test runz_zstd_tests)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
|
@ -26,19 +26,20 @@ if BUILD_BENCHMARKS
|
||||
H5TESTS += tst_h_mem
|
||||
endif # BUILD_BENCHMARKS
|
||||
|
||||
# If zstd is enabled, run a test for it.
|
||||
if NETCDF_ENABLE_PLUGINS
|
||||
if HAVE_ZSTD
|
||||
H5TESTS += tst_h_zstd
|
||||
endif # HAVE_ZSTD
|
||||
endif # NETCDF_ENABLE_PLUGINS
|
||||
|
||||
# List of tests to compile.
|
||||
check_PROGRAMS = $(H5TESTS)
|
||||
|
||||
# List of tests to run.
|
||||
TESTS = $(H5TESTS)
|
||||
|
||||
# If zstd is enabled, run a test for it.
|
||||
if NETCDF_ENABLE_PLUGINS
|
||||
if HAVE_ZSTD
|
||||
check_PROGRAMS += tst_h_zstd
|
||||
TESTS += run_zstd_tests.sh
|
||||
endif # HAVE_ZSTD
|
||||
endif # NETCDF_ENABLE_PLUGINS
|
||||
|
||||
# The parallel program is run from a script.
|
||||
if TEST_PARALLEL4
|
||||
check_PROGRAMS += tst_h_par tst_h_par_compress
|
||||
|
26
h5_test/run_zstd_tests.sh
Normal file
26
h5_test/run_zstd_tests.sh
Normal file
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
# Copyright 2024 University Corporation for Atmospheric
|
||||
# Research/Unidata. See netcdf-c/COPYRIGHT file for more info.
|
||||
|
||||
# This shell runs the zstandard tests.
|
||||
|
||||
# Ed Hartnett
|
||||
|
||||
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
||||
. ../test_common.sh
|
||||
|
||||
# Load the findplugins function
|
||||
. ${builddir}/findplugin.sh
|
||||
echo "findplugin.sh loaded"
|
||||
echo "${HDF5_PLUGIN_DIR}"
|
||||
export HDF5_PLUGIN_PATH="${HDF5_PLUGIN_DIR}"
|
||||
echo "HDF5_PLUGIN_PATH=$HDF5_PLUGIN_PATH"
|
||||
|
||||
findplugin h5zstd
|
||||
echo ""
|
||||
echo "Testing zstandard I/O with HDF5..."
|
||||
|
||||
./tst_h_zstd
|
||||
echo "SUCCESS!!!"
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user