Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to match develop and allow hdf5 as subdirectory build #49

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/cmake-ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- uses: actions/checkout@v3

- name: Set up JDK 19
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '19'
distribution: 'temurin'
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
- uses: actions/checkout@v3

- name: Set up JDK 19
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '19'
distribution: 'temurin'
Expand Down Expand Up @@ -232,7 +232,7 @@ jobs:
- uses: actions/checkout@v3

- name: Set up JDK 19
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '19'
distribution: 'temurin'
Expand Down
2 changes: 1 addition & 1 deletion C/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.12)
PROJECT (HDF5Examples_C)
project (HDF5Examples_C C)

#-----------------------------------------------------------------------------
# Build the C Examples
Expand Down
47 changes: 27 additions & 20 deletions C/H5D/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -221,33 +221,40 @@ if (H5EX_BUILD_TESTING)
-E remove
${testname}.h5
)
add_test (
NAME ${EXAMPLE_VARNAME}_${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${EXAMPLE_VARNAME}_${testname}>"
-D "TEST_ARGS:STRING="
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_EXPECT=0"
-D "TEST_OUTPUT=${testname}.out"
-D "TEST_REFERENCE=${testname}.tst"
-D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}"
-P "${H5EX_RESOURCES_DIR}/runTest.cmake"
)
set_tests_properties (${EXAMPLE_VARNAME}_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_${testname}-clearall)
if (HDF5_BUILD_TOOLS)
if (HDF5_USING_ANALYSIS_TOOL)
add_test (NAME ${EXAMPLE_VARNAME}_${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${EXAMPLE_VARNAME}_${testname}>)
set_tests_properties (${EXAMPLE_VARNAME}_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_${testname}-clearall)
else ()
add_test (
NAME ${EXAMPLE_VARNAME}_H5DUMP-${testname}
NAME ${EXAMPLE_VARNAME}_${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=${H5EX_HDF5_DUMP_EXECUTABLE}"
-D "TEST_ARGS:STRING=${ARGN};${testname}.h5"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:${EXAMPLE_VARNAME}_${testname}>"
-D "TEST_ARGS:STRING="
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testname}.ddl.out"
-D "TEST_EXPECT=0"
-D "TEST_REFERENCE=${testname}.ddl"
-D "TEST_OUTPUT=${testname}.out"
-D "TEST_REFERENCE=${testname}.tst"
-D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}"
-P "${H5EX_RESOURCES_DIR}/runTest.cmake"
)
set_tests_properties (${EXAMPLE_VARNAME}_H5DUMP-${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_${testname})
set_tests_properties (${EXAMPLE_VARNAME}_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_${testname}-clearall)
if (HDF5_BUILD_TOOLS)
add_test (
NAME ${EXAMPLE_VARNAME}_H5DUMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=${H5EX_HDF5_DUMP_EXECUTABLE}"
-D "TEST_ARGS:STRING=${ARGN};${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testname}.ddl.out"
-D "TEST_EXPECT=0"
-D "TEST_REFERENCE=${testname}.ddl"
-D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}"
-P "${H5EX_RESOURCES_DIR}/runTest.cmake"
)
set_tests_properties (${EXAMPLE_VARNAME}_H5DUMP-${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_${testname})
endif ()
endif ()
endmacro ()

Expand Down
10 changes: 4 additions & 6 deletions C/H5D/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the files COPYING and Copyright.html. COPYING can be found at the root
# of the source code distribution tree; Copyright.html can be found at the
# root level of an installed copy of the electronic HDF5 document set and
# is linked from the top-level documents page. It can also be found at
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
# access to either file, you may request a copy from [email protected].
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# [email protected].
##
## Makefile.am
## Run automake to generate a Makefile.in from this file.
Expand Down
10 changes: 4 additions & 6 deletions C/H5D/test.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the files COPYING and Copyright.html. COPYING can be found at the root
# of the source code distribution tree; Copyright.html can be found at the
# root level of an installed copy of the electronic HDF5 document set and
# is linked from the top-level documents page. It can also be found at
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
# access to either file, you may request a copy from [email protected].
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# [email protected].

srcdir=@srcdir@

Expand Down
26 changes: 20 additions & 6 deletions C/H5FLT/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ else ()
set (BLOSC_AVAILABLE 0)
endif ()

option (ENABLE_BLOSC2 "Enable Library Building for blosc2 plugin" ON)
if (ENABLE_BLOSC2)
set (BLOSC_AVAILABLE 1)
set (dyn_examples ${dyn_examples} h5ex_d_blosc2)
else ()
set (BLOSC_AVAILABLE 0)
endif ()

option (ENABLE_BSHUF "Enable Library Building for bshuf plugin" ON)
if (ENABLE_BSHUF)
if (NOT CMAKE_C_COMPILER_ID STREQUAL "Intel")
Expand Down Expand Up @@ -188,6 +196,7 @@ if (H5EX_BUILD_TESTING)
add_test (
NAME ${EXAMPLE_VARNAME}_${testname}-ERR
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:${EXAMPLE_VARNAME}_${testname}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
Expand Down Expand Up @@ -215,6 +224,7 @@ if (H5EX_BUILD_TESTING)
add_test (
NAME ${EXAMPLE_VARNAME}_${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:${EXAMPLE_VARNAME}_${testname}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
Expand All @@ -234,7 +244,8 @@ if (H5EX_BUILD_TESTING)
add_test (
NAME ${EXAMPLE_VARNAME}_H5DUMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=${H5EX_HDF5_DUMP_EXECUTABLE}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=${H5EX_HDF5_DUMP_EXECUTABLE}"
-D "TEST_ARGS:STRING=--enable-error-stack;-p;${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testname}.ddl.out"
Expand All @@ -251,6 +262,7 @@ if (H5EX_BUILD_TESTING)
add_test (
NAME ${EXAMPLE_VARNAME}_H5DUMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=${H5EX_HDF5_DUMP_EXECUTABLE}"
-D "TEST_ARGS:STRING=--enable-error-stack;-p;${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
Expand Down Expand Up @@ -287,11 +299,13 @@ if (H5EX_BUILD_TESTING)
add_custom_target(${EXAMPLE_VARNAME}_example_files ALL COMMENT "Copying files needed by example tests" DEPENDS ${example_files_list})

foreach (h5_file ${dyn_examples})
if (${h5_file} MATCHES "h5ex_d_zfp")
## special filter
ADD_H5_TEST (h5ex_d_zfp FILTERALL)
else ()
ADD_H5_TEST (${h5_file})
if (NOT HDF5_USING_ANALYSIS_TOOL)
if (${h5_file} MATCHES "h5ex_d_zfp")
## special filter
ADD_H5_TEST (h5ex_d_zfp FILTERALL)
else ()
ADD_H5_TEST (${h5_file})
endif ()
endif ()
endforeach ()

Expand Down
2 changes: 1 addition & 1 deletion C/H5FLT/h5ex_d_blosc.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ main(void)
herr_t status;
htri_t avail;
H5Z_filter_t filter_id = 0;
char filter_name[80];
char filter_name[128];
hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1};
size_t nelmts = 7; /* number of elements in cd_values */
unsigned int flags;
Expand Down
Loading
Loading