From 162f01292c70304e799fe0feeb633714d7fe305c Mon Sep 17 00:00:00 2001
From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com>
Date: Thu, 20 Jun 2024 16:01:43 -0500
Subject: [PATCH] Rework the TestExpress usage and refactor dead code (#4590)
---
.github/workflows/abi-report.yml | 2 +-
.github/workflows/cmake-bintest.yml | 12 ++--
.github/workflows/testxpr-cmake.yml | 2 +
c++/test/dsets.cpp | 1 -
c++/test/tlinks.cpp | 3 +-
config/cmake/LIBAEC/CMakeLists.txt | 8 +--
config/cmake/LIBAEC/CPack.Info.plist.in | 2 +-
config/cmake/ZLIB/CMakeLists.txt | 2 +-
java/src/hdf/overview.html | 2 +-
test/accum.c | 2 +-
test/accum_swmr_reader.c | 2 +-
test/app_ref.c | 6 +-
test/big.c | 9 ++-
test/btree2.c | 16 +++---
test/cache_logging.c | 5 +-
test/chunk_info.c | 2 +-
test/cmpd_dset.c | 2 +-
test/cross_read.c | 2 +-
test/del_many_dense_attrs.c | 2 +-
test/dsets.c | 2 +-
test/dt_arith.c | 34 ++++++------
test/dtypes.c | 38 ++++++-------
test/earray.c | 22 ++++----
test/efc.c | 3 +-
test/enum.c | 2 +-
test/err_compat.c | 3 +-
test/error_test.c | 3 +-
test/event_set.c | 2 +-
test/evict_on_close.c | 2 +-
test/extend.c | 2 +-
test/external.c | 2 +-
test/external_env.c | 2 +-
test/farray.c | 22 ++++----
test/fheap.c | 18 +++---
test/file_image.c | 22 +++++---
test/filenotclosed.c | 2 +-
test/fillval.c | 2 +-
test/filter_fail.c | 2 +-
test/filter_plugin.c | 12 ++--
test/flush1.c | 2 +-
test/flush2.c | 2 +-
test/freespace.c | 2 +-
test/getname.c | 2 +-
test/gheap.c | 2 +-
test/h5test.c | 73 ++-----------------------
test/h5test.h | 33 ++++++++---
test/hdfs.c | 2 +-
test/istore.c | 2 +-
test/lheap.c | 2 +-
test/links.c | 2 +-
test/links_env.c | 2 +-
test/mdset.c | 2 +-
test/mf.c | 2 +-
test/mirror_vfd.c | 2 +-
test/mount.c | 2 +-
test/mtime.c | 2 +-
test/ntypes.c | 2 +-
test/objcopy.c | 10 ++--
test/objcopy_ref.c | 6 +-
test/ohdr.c | 2 +-
test/onion.c | 2 +-
test/page_buffer.c | 5 +-
test/ros3.c | 2 +-
test/s3comms.c | 2 +-
test/select_io_dset.c | 2 +-
test/set_extent.c | 2 +-
test/stab.c | 2 +-
test/swmr.c | 2 +-
test/testframe.c | 2 +-
test/tfile.c | 12 ++--
test/timer.c | 2 +-
test/tsohm.c | 4 +-
test/unlink.c | 2 +-
test/unregister.c | 2 +-
test/vds.c | 8 ++-
test/vds_env.c | 2 +-
test/vfd.c | 2 +-
test/vfd_plugin.c | 2 +-
test/vol.c | 2 +-
test/vol_plugin.c | 2 +-
testpar/t_filters_parallel.c | 3 +-
testpar/t_mpi.c | 3 +-
testpar/t_pflush2.c | 6 +-
testpar/t_pmulti_dset.c | 2 +-
testpar/t_select_io_dset.c | 2 +-
testpar/t_shapesame.c | 3 +-
testpar/t_subfiling_vfd.c | 2 +-
testpar/testphdf5.c | 3 +-
tools/test/h5repack/h5repacktst.c | 3 +-
tools/test/perform/perf_meta.c | 3 +-
90 files changed, 248 insertions(+), 278 deletions(-)
diff --git a/.github/workflows/abi-report.yml b/.github/workflows/abi-report.yml
index 055f373031d..b2a20fb6891 100644
--- a/.github/workflows/abi-report.yml
+++ b/.github/workflows/abi-report.yml
@@ -82,7 +82,7 @@ jobs:
mkdir "${{ github.workspace }}/hdf5R"
cd "${{ github.workspace }}/hdf5R"
wget -q https://github.com/HDFGroup/hdf5/releases/download/hdf5-${{ inputs.file_ref }}/hdf5-${{ inputs.file_ref }}-ubuntu-2204.tar.gz
- tar zxf hdf5-${{ inputs.file_ref }}-ubuntu-2204.tar.gz
+ tar zxf hdf5-${{ inputs.file_ref }}-ubuntu-2204_gcc.tar.gz
- name: List files for the space (Linux)
run: |
diff --git a/.github/workflows/cmake-bintest.yml b/.github/workflows/cmake-bintest.yml
index f777ddca07a..61604b366df 100644
--- a/.github/workflows/cmake-bintest.yml
+++ b/.github/workflows/cmake-bintest.yml
@@ -189,12 +189,12 @@ jobs:
ls ${{ runner.workspace }}
# symlinks the compiler executables to a common location
- # - name: Setup GNU Fortran
- # uses: fortran-lang/setup-fortran@v1
- # id: setup-fortran
- # with:
- # compiler: gcc
- # version: 12
+ - name: Setup GNU Fortran
+ uses: fortran-lang/setup-fortran@v1
+ id: setup-fortran
+ with:
+ compiler: gcc
+ version: 12
- name: Run ctest (MacOS)
id: run-ctest
diff --git a/.github/workflows/testxpr-cmake.yml b/.github/workflows/testxpr-cmake.yml
index 172c2f7e6be..809832f3e3a 100644
--- a/.github/workflows/testxpr-cmake.yml
+++ b/.github/workflows/testxpr-cmake.yml
@@ -61,6 +61,8 @@ jobs:
working-directory: ${{ runner.workspace }}/build
- name: CMake Run Tests
+ env:
+ HDF5TestExpress: 0
run: ctest . --parallel 2 -C ${{ matrix.build_mode }} -V -R H5TESTXPR
working-directory: ${{ runner.workspace }}/build
diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp
index 9de6db1319f..65dabbe11c2 100644
--- a/c++/test/dsets.cpp
+++ b/c++/test/dsets.cpp
@@ -17,7 +17,6 @@
EXTERNAL ROUTINES/VARIABLES:
These routines are in the test directory of the C library:
- h5_reset() -- in h5test.c, resets the library by closing it
h5_fileaccess() -- in h5test.c, returns a file access template
***************************************************************************/
diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp
index 7017217009a..3ce8c6823d3 100644
--- a/c++/test/tlinks.cpp
+++ b/c++/test/tlinks.cpp
@@ -752,7 +752,8 @@ test_links()
/* Close 2nd FAPL */
H5Pclose(fapl2_id);
- h5_clean_files(FILENAME, fapl_id);
+ h5_delete_all_test_files(FILENAME, fapl_id);
+ H5Pclose(fapl_id);
}
catch (Exception &E) {
issue_fail_msg("test_links()", __LINE__, __FILE__, E.getCDetailMsg());
diff --git a/config/cmake/LIBAEC/CMakeLists.txt b/config/cmake/LIBAEC/CMakeLists.txt
index bdf43f8baf7..29f1fc7f460 100644
--- a/config/cmake/LIBAEC/CMakeLists.txt
+++ b/config/cmake/LIBAEC/CMakeLists.txt
@@ -125,9 +125,9 @@ set (CMAKE_POSITION_INDEPENDENT_CODE ON)
set (EXE_EXT "")
if (WIN32)
set (EXE_EXT ".exe")
- add_definitions (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1)
- add_definitions (-D_CRT_SECURE_NO_WARNINGS)
- add_definitions (-D_CONSOLE)
+ add_compile_definitions (_BIND_TO_CURRENT_VCLIBS_VERSION=1)
+ add_compile_definitions (_CRT_SECURE_NO_WARNINGS)
+ add_compile_definitions (_CONSOLE)
endif ()
if (MSVC)
@@ -161,7 +161,7 @@ configure_file(
#-----------------------------------------------------------------------------
# All libs/tests/examples need the main include directories
#-----------------------------------------------------------------------------
-set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES
+set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES
"${LIBAEC_BINARY_DIR};${LIBAEC_SOURCE_DIR}/src;${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
)
diff --git a/config/cmake/LIBAEC/CPack.Info.plist.in b/config/cmake/LIBAEC/CPack.Info.plist.in
index 08d371bd5d9..b936470fc29 100644
--- a/config/cmake/LIBAEC/CPack.Info.plist.in
+++ b/config/cmake/LIBAEC/CPack.Info.plist.in
@@ -17,7 +17,7 @@