summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-03-23 00:37:04 (GMT)
committerGitHub <noreply@github.com>2023-03-23 00:37:04 (GMT)
commit7b4387df4322c3a953f5747c3ffbf907875ca815 (patch)
treea2f3147456059ebb06b3fbe9675c5fc83b87863a
parent98728706dd800e365cee6f601873b515e5f8822c (diff)
downloadhdf5-7b4387df4322c3a953f5747c3ffbf907875ca815.zip
hdf5-7b4387df4322c3a953f5747c3ffbf907875ca815.tar.gz
hdf5-7b4387df4322c3a953f5747c3ffbf907875ca815.tar.bz2
Merge CMake cleanup process from develop (#2622)
* Merge CMake cleanup process from develop * Update test script files
-rw-r--r--CMakeInstallation.cmake2
-rw-r--r--c++/examples/CMakeTests.cmake58
-rw-r--r--c++/test/CMakeTests.cmake18
-rw-r--r--c++/test/CMakeVFDTests.cmake13
-rw-r--r--config/cmake/CTestCustom.cmake15
-rw-r--r--config/cmake/grepTest.cmake16
-rw-r--r--config/cmake/jrunTest.cmake16
-rw-r--r--config/cmake/runTest.cmake16
-rw-r--r--config/cmake/vfdTest.cmake16
-rw-r--r--doxygen/aliases2
-rw-r--r--doxygen/dox/ReferenceManual.dox2
-rw-r--r--examples/CMakeTests.cmake13
-rw-r--r--fortran/examples/CMakeTests.cmake13
-rw-r--r--fortran/test/CMakeTests.cmake13
-rw-r--r--hl/c++/examples/CMakeTests.cmake19
-rw-r--r--hl/c++/test/CMakeTests.cmake19
-rw-r--r--hl/examples/CMakeTests.cmake56
-rw-r--r--hl/fortran/examples/CMakeTests.cmake22
-rw-r--r--hl/fortran/test/CMakeTests.cmake14
-rw-r--r--hl/test/CMakeTests.cmake13
-rw-r--r--hl/tools/gif2h5/CMakeTests.cmake18
-rw-r--r--hl/tools/h5watch/CMakeTests.cmake15
-rw-r--r--java/examples/datasets/CMakeLists.txt18
-rw-r--r--java/examples/datatypes/CMakeLists.txt9
-rw-r--r--java/examples/groups/CMakeLists.txt20
-rw-r--r--java/examples/intro/CMakeLists.txt9
-rw-r--r--java/test/CMakeLists.txt43
-rw-r--r--test/CMakeTests.cmake410
-rw-r--r--test/CMakeVFDTests.cmake48
-rw-r--r--test/ShellTests.cmake24
-rw-r--r--test/test_mirror.sh.in13
-rw-r--r--test/test_plugin.sh.in5
-rw-r--r--test/test_swmr.pwsh.in519
-rw-r--r--test/test_swmr.sh.in47
-rw-r--r--test/test_vds_swmr.pwsh.in190
-rw-r--r--testpar/CMakeTests.cmake12
-rw-r--r--testpar/CMakeVFDTests.cmake46
-rw-r--r--tools/libtest/CMakeTests.cmake11
-rw-r--r--tools/src/h5diff/CMakeLists.txt4
-rw-r--r--tools/test/h5copy/CMakeTests.cmake194
-rw-r--r--tools/test/h5diff/CMakeTests.cmake411
-rw-r--r--tools/test/h5diff/h5diff_plugin.sh.in2
-rw-r--r--tools/test/h5dump/CMakeTests.cmake293
-rw-r--r--tools/test/h5dump/CMakeTestsPBITS.cmake7
-rw-r--r--tools/test/h5dump/CMakeTestsVDS.cmake7
-rw-r--r--tools/test/h5dump/CMakeTestsXML.cmake7
-rw-r--r--tools/test/h5dump/h5dump_plugin.sh.in2
-rw-r--r--tools/test/h5format_convert/CMakeTests.cmake236
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_ext1_f.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_ext1_i.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_ext1_s.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_ext2_if.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_ext2_is.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_ext2_sf.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_ext3_isf.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_v_all.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_v_bt1.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_v_err.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_v_n_1d.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_v_n_all.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_v_non_chunked.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/old_h5fc_ext1_f.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/old_h5fc_ext1_i.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/old_h5fc_ext1_s.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/old_h5fc_ext2_if.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/old_h5fc_ext2_is.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl2
-rw-r--r--tools/test/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl2
-rw-r--r--tools/test/h5format_convert/testh5fc.sh.in125
-rw-r--r--tools/test/h5import/CMakeTests.cmake150
-rw-r--r--tools/test/h5import/h5importtestutil.sh.in6
-rw-r--r--tools/test/h5import/testfiles/tall_fp32.ddl2
-rw-r--r--tools/test/h5import/testfiles/tall_i32.ddl2
-rw-r--r--tools/test/h5import/testfiles/tintsattrs_u32.ddl2
-rw-r--r--tools/test/h5ls/CMakeTests.cmake15
-rw-r--r--tools/test/h5ls/h5ls_plugin.sh.in2
-rw-r--r--tools/test/h5repack/CMakeTests.cmake362
-rw-r--r--tools/test/h5repack/CMakeVFDTests.cmake108
-rw-r--r--tools/test/h5repack/h5repack.sh.in50
-rw-r--r--tools/test/h5repack/h5repack_plugin.sh.in2
-rw-r--r--tools/test/h5stat/CMakeTests.cmake17
-rw-r--r--tools/test/misc/CMakeTestsRepart.cmake14
-rw-r--r--tools/test/perform/CMakeLists.txt32
-rw-r--r--tools/test/perform/CMakeTests.cmake35
85 files changed, 2409 insertions, 1533 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index f2978f8..25c6e7f 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -52,7 +52,7 @@ endif ()
# Set includes needed for build
#-----------------------------------------------------------------------------
set (HDF5_INCLUDES_BUILD_TIME
- ${HDF5_SRC_DIR} ${HDF5_CPP_SRC_DIR} ${HDF5_HL_SRC_DIR}
+ ${HDF5_SRC_INCLUDE_DIRS} ${HDF5_CPP_SRC_DIR} ${HDF5_HL_SRC_DIR}
${HDF5_TOOLS_SRC_DIR} ${HDF5_SRC_BINARY_DIR}
)
diff --git a/c++/examples/CMakeTests.cmake b/c++/examples/CMakeTests.cmake
index 5145254..f710204 100644
--- a/c++/examples/CMakeTests.cmake
+++ b/c++/examples/CMakeTests.cmake
@@ -16,17 +16,31 @@
##############################################################################
##############################################################################
# Remove any output file left over from previous test run
+set (CPP_EX_CLEANFILES
+ Group.h5
+ SDS.h5
+ SDScompound.h5
+ SDSextendible.h5
+ Select.h5
+)
add_test (
NAME CPP_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
- Group.h5
- SDS.h5
- SDScompound.h5
- SDSextendible.h5
- Select.h5
+ -E remove ${CPP_EX_CLEANFILES}
+)
+set_tests_properties (CPP_ex-clear-objects PROPERTIES
+ FIXTURES_SETUP clear_cppex
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)
+add_test (
+ NAME CPP_ex-clean-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${CPP_EX_CLEANFILES}
+)
+set_tests_properties (CPP_ex-clean-objects PROPERTIES
+ FIXTURES_CLEANUP clear_cppex
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
-set_tests_properties (CPP_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_cppex)
foreach (example ${examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -53,18 +67,32 @@ endforeach ()
#the following dependencies are handled by the order of the files
# SET_TESTS_PROPERTIES(CPP_ex_readdata PROPERTIES DEPENDS CPP_ex_create)
# SET_TESTS_PROPERTIES(CPP_ex_chunks PROPERTIES DEPENDS CPP_ex_extend_ds)
+set (CPP_EX_TUTR_CLEANFILES
+ h5tutr_cmprss.h5
+ h5tutr_dset.h5
+ h5tutr_extend.h5
+ h5tutr_group.h5
+ h5tutr_groups.h5
+ h5tutr_subset.h5
+)
add_test (
NAME CPP_ex_tutr-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
- h5tutr_cmprss.h5
- h5tutr_dset.h5
- h5tutr_extend.h5
- h5tutr_group.h5
- h5tutr_groups.h5
- h5tutr_subset.h5
+ -E remove ${CPP_EX_TUTR_CLEANFILES}
+)
+set_tests_properties (CPP_ex_tutr-clear-objects PROPERTIES
+ FIXTURES_SETUP clear_cppex_tutr
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)
+add_test (
+ NAME CPP_ex_tutr-clean-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${CPP_EX_TUTR_CLEANFILES}
+)
+set_tests_properties (CPP_ex_tutr-clean-objects PROPERTIES
+ FIXTURES_CLEANUP clear_cppex_tutr
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
-set_tests_properties (CPP_ex_tutr-clear-objects PROPERTIES FIXTURES_SETUP clear_cppex_tutr)
foreach (example ${tutr_examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
diff --git a/c++/test/CMakeTests.cmake b/c++/test/CMakeTests.cmake
index e34f629..fc94a68 100644
--- a/c++/test/CMakeTests.cmake
+++ b/c++/test/CMakeTests.cmake
@@ -17,20 +17,6 @@ add_custom_target(cpp_testhdf5_files ALL COMMENT "Copying files needed by cpp_te
### T E S T I N G ###
##############################################################################
##############################################################################
-# Remove any output file left over from previous test run
-add_test (
- NAME CPP_testhdf5-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- tattr_basic.h5
- tattr_compound.h5
- tattr_dtype.h5
- tattr_multi.h5
- tattr_scalar.h5
- tfattrs.h5
- titerate.h5
-)
-
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME CPP_testhdf5 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:cpp_testhdf5>)
else ()
@@ -46,7 +32,9 @@ else ()
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
endif ()
-set_tests_properties (CPP_testhdf5 PROPERTIES DEPENDS CPP_testhdf5-clear-objects)
+set_tests_properties (CPP_testhdf5 PROPERTIES
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)
##############################################################################
##############################################################################
diff --git a/c++/test/CMakeVFDTests.cmake b/c++/test/CMakeVFDTests.cmake
index 3d6ab74..5405df3 100644
--- a/c++/test/CMakeVFDTests.cmake
+++ b/c++/test/CMakeVFDTests.cmake
@@ -25,18 +25,6 @@ H5_CREATE_VFD_DIR()
macro (ADD_VFD_TEST vfdname resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
- NAME CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove
- tattr_basic.h5
- tattr_compound.h5
- tattr_dtype.h5
- tattr_multi.h5
- tattr_scalar.h5
- tfattrs.h5
- titerate.h5
- WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${vfdname}
- )
- add_test (
NAME CPP_VFD-${vfdname}-cpp_testhdf5
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
@@ -48,7 +36,6 @@ macro (ADD_VFD_TEST vfdname resultcode)
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
- set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects)
set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES TIMEOUT ${CTEST_SHORT_TIMEOUT})
endif ()
endmacro ()
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
index 959e262..aac9d27 100644
--- a/config/cmake/CTestCustom.cmake
+++ b/config/cmake/CTestCustom.cmake
@@ -64,19 +64,32 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
H5TEST-vds_env-clear-objects
PERFORM_h5perform-clear-objects
HL_test-clear-objects
+ HL_test-clean-objects
HL_FORTRAN_test-clear-objects
+ HL_FORTRAN_test-clean-objects
FORTRAN_testhdf5-clear-objects
+ FORTRAN_testhdf5-clean-objects
FORTRAN_flush1-clear-objects
+ FORTRAN_flush1-clean-objects
CPP_testhdf5-clear-objects
+ CPP_testhdf5-clean-objects
######### examples #########
EXAMPLES-clear-objects
+ EXAMPLES-clean-objects
CPP_ex-clear-objects
+ CPP_ex-clean-objects
CPP_ex_tutr-clear-objects
+ CPP_ex_tutr-clean-objects
HL_ex-clear-objects
+ HL_ex-clean-objects
f90_ex-clear-objects
+ f90_ex-clean-objects
HL_CPP_ptableTest-clear-objects
+ HL_CPP_ptableTest-clean-objects
HL_CPP_ex_ptExampleFL-clear-objects
+ HL_CPP_ex_ptExampleFL-clean-objects
HL_FORTRAN_f90_ex-clear-objects
+ HL_FORTRAN_f90_ex-clean-objects
######### tools/h5clear #########
H5CLEAR-clearall-objects
H5CLEAR-h5clear_gentest # does not close ids by design
@@ -194,5 +207,7 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
PERFORM_h5perform-clearall-objects
######### hl/tools #########
HL_TOOLS-clear-objects
+ HL_TOOLS-clean-objects
H5WATCH-clearall-objects
+ H5WATCH-cleanall-objects
)
diff --git a/config/cmake/grepTest.cmake b/config/cmake/grepTest.cmake
index 631fca6..3b0baf5 100644
--- a/config/cmake/grepTest.cmake
+++ b/config/cmake/grepTest.cmake
@@ -190,6 +190,22 @@ if (TEST_FILTER)
endif ()
endif ()
+if (NOT DEFINED ENV{HDF5_NOCLEANUP})
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
+ endif ()
+
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+ endif ()
+
+ if (TEST_DELETE_LIST)
+ foreach (dfile in ${TEST_DELETE_LIST})
+ file (REMOVE ${dfile})
+ endforeach ()
+ endif ()
+endif ()
+
# everything went fine...
message (STATUS "Passed: The output of ${TEST_PROGRAM} matched")
diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake
index 2ca1b75..bbf1191 100644
--- a/config/cmake/jrunTest.cmake
+++ b/config/cmake/jrunTest.cmake
@@ -293,6 +293,22 @@ if (TEST_SKIP_COMPARE AND NOT TEST_NO_DISPLAY)
endif ()
endif ()
+if (NOT DEFINED ENV{HDF5_NOCLEANUP})
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
+ endif ()
+
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+ endif ()
+
+ if (TEST_DELETE_LIST)
+ foreach (dfile in ${TEST_DELETE_LIST})
+ file (REMOVE ${dfile})
+ endforeach ()
+ endif ()
+endif ()
+
# everything went fine...
message (STATUS "${TEST_PROGRAM} Passed")
diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake
index b373fe4..ad72a9e 100644
--- a/config/cmake/runTest.cmake
+++ b/config/cmake/runTest.cmake
@@ -376,6 +376,22 @@ if (TEST_SKIP_COMPARE AND NOT TEST_NO_DISPLAY)
)
endif ()
+if (NOT DEFINED ENV{HDF5_NOCLEANUP})
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}" AND NOT TEST_SAVE)
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
+ endif ()
+
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+ endif ()
+
+ if (TEST_DELETE_LIST)
+ foreach (dfile in ${TEST_DELETE_LIST})
+ file (REMOVE ${dfile})
+ endforeach ()
+ endif ()
+endif ()
+
# everything went fine...
message (STATUS "${TEST_PROGRAM} Passed")
diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake
index f5a4e3e..fadc67f 100644
--- a/config/cmake/vfdTest.cmake
+++ b/config/cmake/vfdTest.cmake
@@ -72,5 +72,21 @@ endif ()
message (STATUS "COMMAND Error: ${TEST_ERROR}")
+if (NOT DEFINED ENV{HDF5_NOCLEANUP})
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
+ endif ()
+
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+ endif ()
+
+ if (TEST_DELETE_LIST)
+ foreach (dfile in ${TEST_DELETE_LIST})
+ file (REMOVE ${dfile})
+ endforeach ()
+ endif ()
+endif ()
+
# everything went fine...
message (STATUS "Passed: The ${TEST_PROGRAM} program used vfd ${TEST_VFD}")
diff --git a/doxygen/aliases b/doxygen/aliases
index 38a5a40..60d037d 100644
--- a/doxygen/aliases
+++ b/doxygen/aliases
@@ -15,7 +15,7 @@ ALIASES += Code{1}="<tt>\1</tt>"
ALIASES += success{1}="\Bold{Success:} \1"
ALIASES += failure{1}="\Bold{Failure:} \1"
-ALIASES += herr_t="Returns a non-negative value if successful; otherwise returns a negative value."
+ALIASES += herr_t="Returns a non-negative value if successful; otherwise, returns a negative value."
ALIASES += herr_t_iter="\li Zero causes the iterator to continue, returning zero when the iteration is complete. \li A positive value causes the iterator to immediately return that positive value, indicating short-circuit success. \li A negative value causes the iterator to immediately return that value, indicating failure."
ALIASES += hid_t{1}="Returns a \1 identifier if successful; otherwise returns #H5I_INVALID_HID. "
ALIASES += hid_ti{1}="Returns an \1 identifier if successful; otherwise returns #H5I_INVALID_HID. "
diff --git a/doxygen/dox/ReferenceManual.dox b/doxygen/dox/ReferenceManual.dox
index 135e7e6..5b46a19 100644
--- a/doxygen/dox/ReferenceManual.dox
+++ b/doxygen/dox/ReferenceManual.dox
@@ -150,7 +150,7 @@ Follow these simple rules and stay out of trouble:
\li \Bold{Dynamic memory allocation:} The API contains a few functions in which the
HDF5 library dynamically allocates memory on the caller's behalf. The caller owns
this memory and eventually must free it by calling H5free_memory() and not language-explicit memory functions.
-\li \Bold{Be careful with that saw:} Do not modify the underlying collection when an
+\li \Bold{Don't modify while iterating:} Do not modify the underlying collection when an
iteration is in progress!
\li \Bold{Use of locations:} Certain API functions, typically called \Code{H5***_by_name}
use a combination of identifiers and path names to refer to HDF5 objects.
diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake
index a3bcd47..30f73c4 100644
--- a/examples/CMakeTests.cmake
+++ b/examples/CMakeTests.cmake
@@ -70,7 +70,18 @@ if (HDF5_TEST_SERIAL)
NAME EXAMPLES-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_CLEANFILES}
)
- set_tests_properties (EXAMPLES-clear-objects PROPERTIES FIXTURES_SETUP clear_EXAMPLES)
+ set_tests_properties (EXAMPLES-clear-objects PROPERTIES
+ FIXTURES_SETUP clear_EXAMPLES
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+ )
+ add_test (
+ NAME EXAMPLES-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_CLEANFILES}
+ )
+ set_tests_properties (EXAMPLES-clean-objects PROPERTIES
+ FIXTURES_CLEANUP clear_EXAMPLES
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+ )
foreach (example ${examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake
index 09b3fa0..dabab8b 100644
--- a/fortran/examples/CMakeTests.cmake
+++ b/fortran/examples/CMakeTests.cmake
@@ -40,7 +40,18 @@ if (HDF5_TEST_SERIAL)
NAME f90_ex-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_fortran_CLEANFILES}
)
- set_tests_properties (f90_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_f90_ex)
+ set_tests_properties (f90_ex-clear-objects PROPERTIES
+ FIXTURES_SETUP clear_f90_ex
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+ )
+ add_test (
+ NAME f90_ex-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_fortran_CLEANFILES}
+ )
+ set_tests_properties (f90_ex-clean-objects PROPERTIES
+ FIXTURES_CLEANUP clear_f90_ex
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+ )
foreach (example ${examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake
index 18e9eda..74ff71b 100644
--- a/fortran/test/CMakeTests.cmake
+++ b/fortran/test/CMakeTests.cmake
@@ -57,7 +57,18 @@ add_test (
NAME FORTRAN_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove ${testhdf5_fortran_CLEANFILES}
)
-set_tests_properties (FORTRAN_testhdf5-clear-objects PROPERTIES FIXTURES_SETUP clear_testhdf5_fortran)
+set_tests_properties (FORTRAN_testhdf5-clear-objects PROPERTIES
+ FIXTURES_SETUP clear_testhdf5_fortran
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)
+add_test (
+ NAME FORTRAN_testhdf5-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${testhdf5_fortran_CLEANFILES}
+)
+set_tests_properties (FORTRAN_testhdf5-clean-objects PROPERTIES
+ FIXTURES_CLEANUP clear_testhdf5_fortran
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME FORTRAN_testhdf5_fortran COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:testhdf5_fortran>)
diff --git a/hl/c++/examples/CMakeTests.cmake b/hl/c++/examples/CMakeTests.cmake
index 7564fd7..8b2b4ce 100644
--- a/hl/c++/examples/CMakeTests.cmake
+++ b/hl/c++/examples/CMakeTests.cmake
@@ -16,12 +16,16 @@
##############################################################################
##############################################################################
# Remove any output file left over from previous test run
+set (HL_CPP_EX_PT_CLEANFILES
+ PTcppexampleFL.h5
+)
add_test (
NAME HL_CPP_ex_ptExampleFL-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
- PTcppexampleFL.h5
- ptExampleFL.txt
+ -E remove ${HL_CPP_EX_PT_CLEANFILES}
+)
+set_tests_properties (HL_CPP_ex_ptExampleFL-clear-objects PROPERTIES
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -40,3 +44,12 @@ else ()
)
endif ()
set_tests_properties (HL_CPP_ex_ptExampleFL PROPERTIES DEPENDS HL_CPP_ex_ptExampleFL-clear-objects)
+add_test (
+ NAME HL_CPP_ex_ptExampleFL-clean-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${HL_CPP_EX_PT_CLEANFILES}
+)
+set_tests_properties (HL_CPP_ex_ptExampleFL-clean-objects PROPERTIES
+ DEPENDS HL_CPP_ex_ptExampleFL
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)
diff --git a/hl/c++/test/CMakeTests.cmake b/hl/c++/test/CMakeTests.cmake
index 8b5dde3..4137270 100644
--- a/hl/c++/test/CMakeTests.cmake
+++ b/hl/c++/test/CMakeTests.cmake
@@ -15,11 +15,17 @@
### T E S T I N G ###
##############################################################################
##############################################################################
-
+# Remove any output file left over from previous test run
+set (HL_CPP_PT_CLEANFILES
+ packettest.h5
+)
add_test (
NAME HL_CPP_ptableTest-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove ${example}.txt
+ -E remove ${HL_CPP_PT_CLEANFILES}
+)
+set_tests_properties (HL_CPP_ptableTest-clear-objects PROPERTIES
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -38,3 +44,12 @@ else ()
)
endif ()
set_tests_properties (HL_CPP_ptableTest PROPERTIES DEPENDS HL_CPP_ptableTest-clear-objects)
+add_test (
+ NAME HL_CPP_ptableTest-clean-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${HL_CPP_PT_CLEANFILES}
+)
+set_tests_properties (HL_CPP_ptableTest-clean-objects PROPERTIES
+ DEPENDS HL_CPP_ptableTest
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)
diff --git a/hl/examples/CMakeTests.cmake b/hl/examples/CMakeTests.cmake
index 6014f6c..6a0a6e7 100644
--- a/hl/examples/CMakeTests.cmake
+++ b/hl/examples/CMakeTests.cmake
@@ -27,31 +27,45 @@ endforeach ()
add_custom_target(hl_ex_ex_ds1_files ALL COMMENT "Copying files needed by hl_ex_ex_ds1 tests" DEPENDS ${hl_ex_ex_ds1_files_list})
# Remove any output file left over from previous test run
+set (HL_EX_CLEANFILES
+ ex_lite1.h5
+ ex_lite2.h5
+ ex_lite3.h5
+ packet_table_FLexample.h5
+ ex_image1.h5
+ ex_image2.h5
+ ex_table_01.h5
+ ex_table_02.h5
+ ex_table_03.h5
+ ex_table_04.h5
+ ex_table_05.h5
+ ex_table_06.h5
+ ex_table_07.h5
+ ex_table_08.h5
+ ex_table_09.h5
+ ex_table_10.h5
+ ex_table_11.h5
+ ex_table_12.h5
+ ex_ds1.h5
+)
add_test (
NAME HL_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
- ex_lite1.h5
- ex_lite2.h5
- ex_lite3.h5
- packet_table_FLexample.h5
- ex_image1.h5
- ex_image2.h5
- ex_table_01.h5
- ex_table_02.h5
- ex_table_03.h5
- ex_table_04.h5
- ex_table_05.h5
- ex_table_06.h5
- ex_table_07.h5
- ex_table_08.h5
- ex_table_09.h5
- ex_table_10.h5
- ex_table_11.h5
- ex_table_12.h5
- ex_ds1.h5
+ -E remove ${HL_EX_CLEANFILES}
+)
+set_tests_properties (HL_ex-clear-objects PROPERTIES
+ FIXTURES_SETUP clear_HL_ex
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)
+add_test (
+ NAME HL_ex-clean-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${HL_EX_CLEANFILES}
+)
+set_tests_properties (HL_ex-clean-objects PROPERTIES
+ FIXTURES_CLEANUP clear_HL_ex
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
-set_tests_properties (HL_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_HL_ex)
foreach (example ${examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
diff --git a/hl/fortran/examples/CMakeTests.cmake b/hl/fortran/examples/CMakeTests.cmake
index 23f77da..46827b5 100644
--- a/hl/fortran/examples/CMakeTests.cmake
+++ b/hl/fortran/examples/CMakeTests.cmake
@@ -17,14 +17,28 @@
##############################################################################
# Remove any output file left over from previous test run
+set (HL_FORTRAN_F90_EX_CLEANFILES
+ ex_ds1.h5
+ exlite.h5
+)
add_test (
NAME HL_FORTRAN_f90_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
- ex_ds1.h5
- exlite.h5
+ -E remove ${HL_FORTRAN_F90_EX_CLEANFILES}
+)
+set_tests_properties (HL_FORTRAN_f90_ex-clear-objects PROPERTIES
+ FIXTURES_SETUP clear_HL_FORTRAN_f90_ex
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)
+add_test (
+ NAME HL_FORTRAN_f90_ex-clean-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${HL_FORTRAN_F90_EX_CLEANFILES}
+)
+set_tests_properties (HL_FORTRAN_f90_ex-clean-objects PROPERTIES
+ FIXTURES_CLEANUP clear_HL_FORTRAN_f90_ex
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
-set_tests_properties (HL_FORTRAN_f90_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_HL_FORTRAN_f90_ex)
foreach (example ${examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
diff --git a/hl/fortran/test/CMakeTests.cmake b/hl/fortran/test/CMakeTests.cmake
index 8a97fac..209186b 100644
--- a/hl/fortran/test/CMakeTests.cmake
+++ b/hl/fortran/test/CMakeTests.cmake
@@ -34,7 +34,19 @@ add_test (
COMMAND ${CMAKE_COMMAND}
-E remove ${test_hl_fortran_CLEANFILES}
)
-set_tests_properties (HL_FORTRAN_test-clear-objects PROPERTIES FIXTURES_SETUP clear_HL_FORTRAN_test)
+set_tests_properties (HL_FORTRAN_test-clear-objects PROPERTIES
+ FIXTURES_SETUP clear_HL_FORTRAN_test
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)
+add_test (
+ NAME HL_FORTRAN_test-clean-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${test_hl_fortran_CLEANFILES}
+)
+set_tests_properties (HL_FORTRAN_test-clean-objects PROPERTIES
+ FIXTURES_CLEANUP clear_HL_FORTRAN_test
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)
macro (ADD_H5_FORTRAN_TEST file)
if (HDF5_ENABLE_USING_MEMCHECKER)
diff --git a/hl/test/CMakeTests.cmake b/hl/test/CMakeTests.cmake
index ba4bb86..bea8ae5 100644
--- a/hl/test/CMakeTests.cmake
+++ b/hl/test/CMakeTests.cmake
@@ -79,7 +79,18 @@ add_test (
NAME HL_test-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove ${test_hl_CLEANFILES}
)
-set_tests_properties (HL_test-clear-objects PROPERTIES FIXTURES_SETUP clear_test_hl)
+set_tests_properties (HL_test-clear-objects PROPERTIES
+ FIXTURES_SETUP clear_test_hl
+ WORKING_DIRECTORY ${HDF5_HL_TEST_BINARY_DIR}
+)
+add_test (
+ NAME HL_test-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${test_hl_CLEANFILES}
+)
+set_tests_properties (HL_test-clean-objects PROPERTIES
+ FIXTURES_CLEANUP clear_test_hl
+ WORKING_DIRECTORY ${HDF5_HL_TEST_BINARY_DIR}
+)
# --------------------------------------------------------------------
# Macro used to add a unit test
diff --git a/hl/tools/gif2h5/CMakeTests.cmake b/hl/tools/gif2h5/CMakeTests.cmake
index 36ea5f9..b2a8e27 100644
--- a/hl/tools/gif2h5/CMakeTests.cmake
+++ b/hl/tools/gif2h5/CMakeTests.cmake
@@ -28,16 +28,24 @@ HDFTEST_COPY_FILE("${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/ex_image2.h5" "$
add_custom_target(gif2h5_files ALL COMMENT "Copying files needed by gif2h5 tests" DEPENDS ${gif2h5_files_list})
# Remove any output file left over from previous test run
+set (HL_TOOLS_CLEANFILES
+ image1.gif
+ image1.h5
+ image.gif
+ image24.gif
+)
add_test (
NAME HL_TOOLS-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
- image1.gif
- image1.h5
- image.gif
- image24.gif
+ -E remove ${HL_TOOLS_CLEANFILES}
)
set_tests_properties (HL_TOOLS-clear-objects PROPERTIES FIXTURES_SETUP clear_tools_hl)
+add_test (
+ NAME HL_TOOLS-clean-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${HL_TOOLS_CLEANFILES}
+)
+set_tests_properties (HL_TOOLS-clean-objects PROPERTIES FIXTURES_CLEANUP clear_tools_hl)
add_test (NAME HL_TOOLS_gif2h5 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:gif2h5${tgt_file_ext}> testfiles/image1.gif image1.h5)
set_tests_properties (HL_TOOLS_gif2h5 PROPERTIES
diff --git a/hl/tools/h5watch/CMakeTests.cmake b/hl/tools/h5watch/CMakeTests.cmake
index fe0d52a..a7828b3 100644
--- a/hl/tools/h5watch/CMakeTests.cmake
+++ b/hl/tools/h5watch/CMakeTests.cmake
@@ -116,12 +116,6 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
macro (ADD_H5_WATCH resultfile resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
- NAME H5WATCH-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ${resultfile}.h5
- )
- set_tests_properties (H5WATCH-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- add_test (
NAME H5WATCH-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
@@ -134,7 +128,7 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
set_tests_properties (H5WATCH-${resultfile} PROPERTIES
- DEPENDS H5WATCH-${resultfile}-clear-objects
+ DEPENDS ${last_test}
FIXTURES_REQUIRED gen_test_watch
)
set (last_test "H5WATCH-${resultfile}")
@@ -164,7 +158,12 @@ set_tests_properties (H5WATCH-clearall-objects PROPERTIES FIXTURES_REQUIRED swmr
if (last_test)
set_tests_properties (H5WATCH-clearall-objects PROPERTIES DEPENDS ${last_test})
endif ()
-set (last_test "H5WATCH-clearall-objects")
+set (last_test "H5WATCH-cleanall-objects")
+add_test (
+ NAME H5WATCH-cleanall-objects
+ COMMAND ${CMAKE_COMMAND} -E remove WATCH.h5
+)
+set_tests_properties (H5WATCH-cleanall-objects PROPERTIES FIXTURES_CLEANUP swmr_vfd_check_compat)
#################################################################################################
# #
diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt
index f73b88e..f6d733f 100644
--- a/java/examples/datasets/CMakeLists.txt
+++ b/java/examples/datasets/CMakeLists.txt
@@ -123,5 +123,23 @@ if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
set_tests_properties (JAVA_datasets-${example} PROPERTIES
DEPENDS JAVA_datasets-${example}-copy-objects
)
+
+ if (example STREQUAL "H5Ex_D_External")
+ add_test (
+ NAME JAVA_datasets-${example}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5
+ ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.data
+ )
+ else ()
+ add_test (
+ NAME JAVA_datasets-${example}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5
+ )
+ set_tests_properties (JAVA_datasets-${example}-clean-objects PROPERTIES
+ DEPENDS JAVA_datasets-${example}
+ )
+ endif ()
endforeach ()
endif ()
diff --git a/java/examples/datatypes/CMakeLists.txt b/java/examples/datatypes/CMakeLists.txt
index 94dda1b..75dab75 100644
--- a/java/examples/datatypes/CMakeLists.txt
+++ b/java/examples/datatypes/CMakeLists.txt
@@ -98,5 +98,14 @@ if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
set_tests_properties (JAVA_datatypes-${example} PROPERTIES
DEPENDS JAVA_datatypes-${example}-copy-objects
)
+
+ add_test (
+ NAME JAVA_datatypes-${example}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5
+ )
+ set_tests_properties (JAVA_datatypes-${example}-clean-objects PROPERTIES
+ DEPENDS JAVA_datatypes-${example}
+ )
endforeach ()
endif ()
diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt
index 458c958..5393afd 100644
--- a/java/examples/groups/CMakeLists.txt
+++ b/java/examples/groups/CMakeLists.txt
@@ -113,5 +113,25 @@ if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
set_tests_properties (JAVA_groups-${example} PROPERTIES
DEPENDS JAVA_groups-${example}-copy-objects
)
+
+ if (NOT example STREQUAL "H5Ex_G_Iterate" AND NOT example STREQUAL "H5Ex_G_Visit")
+ if (example STREQUAL "H5Ex_G_Compact")
+ add_test (
+ NAME JAVA_groups-${example}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}1.h5
+ ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}2.h5
+ )
+ else ()
+ add_test (
+ NAME JAVA_groups-${example}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5
+ )
+ endif ()
+ set_tests_properties (JAVA_groups-${example}-clean-objects PROPERTIES
+ DEPENDS JAVA_groups-${example}
+ )
+ endif ()
endforeach ()
endif ()
diff --git a/java/examples/intro/CMakeLists.txt b/java/examples/intro/CMakeLists.txt
index 8f2269f..b1c35bc 100644
--- a/java/examples/intro/CMakeLists.txt
+++ b/java/examples/intro/CMakeLists.txt
@@ -88,6 +88,15 @@ if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
set_tests_properties (JAVA_intro-${example} PROPERTIES
DEPENDS JAVA_intro-${example}-copy-objects
)
+
+ add_test (
+ NAME JAVA_intro-${example}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5
+ )
+ set_tests_properties (JAVA_intro-${example}-clean-objects PROPERTIES
+ DEPENDS JAVA_intro-${example}
+ )
endforeach ()
endif ()
diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt
index e90ae8f..38a6323 100644
--- a/java/test/CMakeLists.txt
+++ b/java/test/CMakeLists.txt
@@ -116,26 +116,42 @@ endif ()
get_property (target_name TARGET ${HDF5_JAVA_JNI_LIB_TARGET} PROPERTY OUTPUT_NAME)
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=${target_name}$<$<OR:$<CONFIG:Debug>,$<CONFIG:Developer>>:${CMAKE_DEBUG_POSTFIX}>;")
+set (CMAKE_JAVA_CLASSPATH ".")
+foreach (CMAKE_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH})
+ set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${CMAKE_INCLUDE_PATH}")
+endforeach ()
if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
+ add_test (
+ NAME JUnit-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ test.h5
+ testF2.h5
+ testPf00000.h5
+ testPf00001.h5
+ WORKING_DIRECTORY ${HDF5_BINARY_DIR}/java/test
+ )
+ set_tests_properties (JUnit-clear-objects PROPERTIES FIXTURES_SETUP clear_JUnit)
+
+ add_test (
+ NAME JUnit-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ test.h5
+ testF2.h5
+ testPf00000.h5
+ testPf00001.h5
+ WORKING_DIRECTORY ${HDF5_BINARY_DIR}/java/test
+ )
+ set_tests_properties (JUnit-clean-objects PROPERTIES FIXTURES_CLEANUP clear_JUnit)
+
foreach (test_file ${HDF5_JAVA_TEST_SOURCES})
- set (CMAKE_JAVA_CLASSPATH ".")
- foreach (CMAKE_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH})
- set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${CMAKE_INCLUDE_PATH}")
- endforeach ()
- set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_${test_file}_JAR_FILE}")
+ set (TEST_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_${test_file}_JAR_FILE}")
add_test (
- NAME JUnit-${test_file}-clearall-objects
- COMMAND ${CMAKE_COMMAND} -E remove
- JUnit-${test_file}.out
- JUnit-${test_file}.out.err
- )
- add_test (
NAME JUnit-${test_file}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_TESTER=${CMAKE_Java_RUNTIME};${CMAKE_Java_RUNTIME_FLAGS}"
- -D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}"
+ -D "TEST_CLASSPATH:STRING=${TEST_JAVA_CLASSPATH}"
-D "TEST_ARGS:STRING=${CMD_ARGS}-ea;org.junit.runner.JUnitCore"
-D "TEST_PROGRAM=test.${test_file}"
-D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}"
@@ -151,7 +167,8 @@ if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
)
set_tests_properties (JUnit-${test_file} PROPERTIES
ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir2"
- DEPENDS "JUnit-${test_file}-clearall-objects"
+ FIXTURES_REQUIRED clear_JUnit
+ WORKING_DIRECTORY ${HDF5_BINARY_DIR}/java/test
)
endforeach ()
endif ()
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 6ee9981..bbb9372 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -213,6 +213,12 @@ add_test (
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
set_tests_properties (H5TEST-testhdf5-clear-objects PROPERTIES FIXTURES_SETUP clear_testhdf5)
+add_test (
+ NAME H5TEST-testhdf5-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${testhdf5_CLEANFILES}
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+set_tests_properties (H5TEST-testhdf5-clean-objects PROPERTIES FIXTURES_CLEANUP clear_testhdf5)
add_test (NAME H5TEST-testhdf5-base COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:testhdf5> -x file -x select)
set_tests_properties (H5TEST-testhdf5-base PROPERTIES
@@ -240,228 +246,94 @@ set_tests_properties (H5TEST-testhdf5-select PROPERTIES
##############################################################################
set (test_CLEANFILES
- accum.h5
- cmpd_dset.h5
- compact_dataset.h5
- dataset.h5
- dset_offset.h5
- max_compact_dataset.h5
- simple.h5
- set_local.h5
- random_chunks.h5
- huge_chunks.h5
- chunk_cache.h5
- big_chunk.h5
- chunk_fast.h5
- chunk_expand.h5
- chunk_fixed.h5
- copy_dcpl_newfile.h5
- partial_chunks.h5
- layout_extend.h5
- zero_chunk.h5
- chunk_single.h5
- swmr_non_latest.h5
- earray_hdr_fd.h5
- farray_hdr_fd.h5
- bt2_hdr_fd.h5
- storage_size.h5
- dls_01_strings.h5
- extend.h5
- istore.h5
- extlinks*.h5
- frspace.h5
- links*.h5
- sys_file1
- tfile*.h5
- th5s*.h5
- lheap.h5
- fheap.h5
- ohdr.h5
- ohdr_min_a.h5
- ohdr_min_b.h5
- min_dset_ohdr_testfile.h5
- stab.h5
- extern_*.h5
- extern_*.raw
- gheap*.h5
- dt_arith1
- dt_arith2
- links.h5
- links*.h5
- extlinks16A00000.h5
- extlinks16A00001.h5
- extlinks16A00002.h5
- extlinks16B-b.h5
- extlinks16B-g.h5
- extlinks16B-l.h5
- extlinks16B-r.h5
- extlinks16B-s.h5
- extlinks19B00000.h5
- extlinks19B00001.h5
- extlinks19B00002.h5
- extlinks19B00003.h5
- extlinks19B00004.h5
- extlinks19B00005.h5
- extlinks19B00006.h5
- extlinks19B00007.h5
- extlinks19B00008.h5
- extlinks19B00009.h5
- extlinks19B00010.h5
- extlinks19B00011.h5
- extlinks19B00012.h5
- extlinks19B00013.h5
- extlinks19B00014.h5
- extlinks19B00015.h5
- extlinks19B00016.h5
- extlinks19B00017.h5
- extlinks19B00018.h5
- extlinks19B00019.h5
- extlinks19B00020.h5
- extlinks19B00021.h5
- extlinks19B00022.h5
- extlinks19B00023.h5
- extlinks19B00024.h5
- extlinks19B00025.h5
- extlinks19B00026.h5
- extlinks19B00027.h5
- extlinks19B00028.h5
- big.data
- big*.h5
- stdio.h5
- sec2.h5
- dtypes0.h5
- dtypes1.h5
- dtypes2.h5
- dtypes3.h5
- dtypes4.h5
- dtypes5.h5
- dtypes6.h5
- dtypes7.h5
- dtypes8.h5
- dtypes9.h5
- dtypes10.h5
+ cmpd_dtransform.h5
+ direct_chunk.h5
dt_arith1.h5
dt_arith2.h5
- tattr.h5
- tselect.h5
- mtime.h5
- unlink.h5
- unicode.h5
- coord.h5
- fillval_*.h5
- fillval.raw
- mount_*.h5
- testmeta.h5
- ttime.h5
- trefer1.h5
- trefer2.h5
- trefer3.h5
- tvltypes.h5
- tvlstr.h5
- tvlstr2.h5
- twriteorder.dat
- enum1.h5
- titerate.h5
- ttsafe.h5
- tarray1.h5
- tgenprop.h5
- tmisc*.h5
- set_extent1.h5
- set_extent2.h5
- set_extent3.h5
- set_extent4.h5
- set_extent5.h5
- ext1.bin
- ext2.bin
- getname.h5
- getname1.h5
- getname2.h5
- getname3.h5
- sec2_file.h5
- direct_file.h5
- family_file000*.h5
- new_family_v16_000*.h5
- multi_file-r.h5
- multi_file-s.h5
- core_file
- filter_plugin.h5
- new_move_a.h5
- new_move_b.h5
- ntypes.h5
- dangle.h5
- error_test.h5
- err_compat.h5
dtransform.h5
- test_filters.h5
- get_file_name.h5
+ dtypes3.h5
+ dtypes4.h5
+ min_dset_ohdr_testfile.h5
+ ohdr_min_a.h5
+ sec2_file.h5
+ single_latest.h5
+ source_file.h5
+ splitter_rw_file.h5
+ splitter_tmp.h5
+ splitter_wo_file.h5
+ stdio_file.h5
+ swmr0.h5
+ tfile_is_accessible_non_hdf5.h5
+ tfile_is_accessible.h5
+ tfile1.h5.h5
+ tfile8.h5
+ tfile8.h5.h5
+ tmisc15.h5.h5
tstint1.h5
tstint2.h5
- unlink_chunked.h5
- btree2.h5
- btree2_tmp.h5
- objcopy_src.h5
- objcopy_dst.h5
+ tverbounds_dtype.h5
+ virtual_file1.h5
objcopy_ext.dat
- trefer1.h5
- trefer2.h5
- app_ref.h5
- farray.h5
- farray_tmp.h5
- earray.h5
- earray_tmp.h5
- efc0.h5
- efc1.h5
- efc2.h5
- efc3.h5
- efc4.h5
- efc5.h5
log_vfd_out.log
- new_multi_file_v16-r.h5
- new_multi_file_v16-s.h5
- split_get_file_image_test-m.h5
- split_get_file_image_test-r.h5
- file_image_core_test.h5.copy
- unregister_filter_1.h5
- unregister_filter_2.h5
- vds_virt.h5
- vds_dapl.h5
- vds_src_0.h5
- vds_src_1.h5
- swmr_data.h5
- use_use_append_chunk.h5
- use_append_mchunks.h5
- use_disable_mdc_flushes.h5
- tbogus.h5.copy
- flushrefresh.h5
- flushrefresh_VERIFICATION_START
- flushrefresh_VERIFICATION_CHECKPOINT1
- flushrefresh_VERIFICATION_CHECKPOINT2
- flushrefresh_VERIFICATION_DONE
- filenotclosed.h5
- del_many_dense_attrs.h5
- atomic_data
- accum_swmr_big.h5
- ohdr_swmr.h5
- test_swmr*.h5
- cache_logging.h5
- cache_logging.out
- vds_swmr.h5
- vds_swmr_src_*.h5
- tmp_vds_env/vds_src_2.h5
- direct_chunk.h5
- splitter*.h5
splitter.log
- mirror_rw/*
- mirror_wo/*
+ tbogus.h5.copy
+ tmp_vds/vds_src_2.h5
+)
+
+set (EXTLINKS_CLEANFILES
+ extlinks16A-000000.h5
+ extlinks16A-000001.h5
+ extlinks16B-b.h5
+ extlinks16B-g.h5
+ extlinks16B-l.h5
+ extlinks16B-r.h5
+ extlinks16B-s.h5
+ extlinks19B-000000.h5
+ extlinks19B-000001.h5
+ extlinks19B-000002.h5
+ extlinks19B-000003.h5
+ extlinks19B-000004.h5
+ extlinks19B-000005.h5
+ extlinks19B-000006.h5
+ extlinks19B-000007.h5
+ extlinks19B-000008.h5
+ extlinks19B-000009.h5
+ extlinks19B-000010.h5
+ extlinks19B-000011.h5
+ extlinks19B-000012.h5
+ extlinks19B-000013.h5
+ extlinks19B-000014.h5
+ extlinks19B-000015.h5
+ extlinks19B-000016.h5
+ extlinks19B-000017.h5
+ extlinks19B-000018.h5
+ extlinks19B-000019.h5
+ extlinks19B-000020.h5
+ extlinks19B-000021.h5
+ extlinks19B-000022.h5
+ extlinks19B-000023.h5
+ extlinks19B-000024.h5
+ extlinks19B-000025.h5
+ extlinks19B-000026.h5
+ extlinks19B-000027.h5
+ extlinks19B-000028.h5
)
# Remove any output file left over from previous test run
add_test (
NAME H5TEST-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${test_CLEANFILES}
+ COMMAND ${CMAKE_COMMAND} -E remove ${test_CLEANFILES} ${EXTLINKS_CLEANFILES}
+ COMMAND_EXPAND_LISTS
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
set_tests_properties (H5TEST-clear-objects PROPERTIES FIXTURES_SETUP clear_H5TEST)
+add_test (
+ NAME H5TEST-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${test_CLEANFILES} ${EXTLINKS_CLEANFILES}
+ COMMAND_EXPAND_LISTS
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+set_tests_properties (H5TEST-clean-objects PROPERTIES FIXTURES_CLEANUP clear_H5TEST)
set (H5TEST_SEPARATE_TESTS
testhdf5
@@ -477,7 +349,7 @@ foreach (h5_test ${H5_TESTS})
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-${h5_test} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${h5_test}>)
set_tests_properties (H5TEST-${h5_test} PROPERTIES
- FIXTURES_REQUIRED clear_objects
+ FIXTURES_REQUIRED clear_H5TEST
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
@@ -518,10 +390,18 @@ set_tests_properties (H5TEST-objcopy PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOU
if (NOT CYGWIN)
add_test (
NAME H5TEST-cache-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove cache_test.h5
+ COMMAND ${CMAKE_COMMAND} -E remove
+ cache_test.h5
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
set_tests_properties (H5TEST-cache-clear-objects PROPERTIES FIXTURES_SETUP clear_cache)
+ add_test (
+ NAME H5TEST-cache-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ cache_test.h5
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+ )
+ set_tests_properties (H5TEST-cache-clean-objects PROPERTIES FIXTURES_CLEANUP clear_cache)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-cache COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:cache>)
else ()
@@ -553,6 +433,12 @@ if (TEST_CACHE_IMAGE)
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
set_tests_properties (H5TEST-cache_image-clear-objects PROPERTIES FIXTURES_SETUP clear_cache_image)
+ add_test (
+ NAME H5TEST-cache_image-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove cache_image_test.h5
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+ )
+ set_tests_properties (H5TEST-cache_image-clean-objects PROPERTIES FIXTURES_CLEANUP clear_cache_image)
add_test (NAME H5TEST_cache_image COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:cache_image>)
set_tests_properties (H5TEST-cache_image PROPERTIES
FIXTURES_REQUIRED clear_cache_image
@@ -562,21 +448,28 @@ if (TEST_CACHE_IMAGE)
endif ()
#-- Adding test for external_env
+set (H5TEST_EXTERNAL_CLEANFILES
+ extern_1r.raw
+ extern_2r.raw
+ extern_3r.raw
+ extern_4r.raw
+ extern_1w.raw
+ extern_2w.raw
+ extern_3w.raw
+ extern_4w.raw
+)
add_test (
NAME H5TEST-external_env-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove
- extern_1r.raw
- extern_2r.raw
- extern_3r.raw
- extern_4r.raw
- extern_1w.raw
- extern_2w.raw
- extern_3w.raw
- extern_4w.raw
- WORKING_DIRECTORY
- ${HDF5_TEST_BINARY_DIR}/H5TEST
+ COMMAND ${CMAKE_COMMAND} -E remove ${H5TEST_EXTERNAL_CLEANFILES}
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
set_tests_properties (H5TEST-external_env-clear-objects PROPERTIES FIXTURES_SETUP clear_external_env)
+add_test (
+ NAME H5TEST-external_env-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${H5TEST_EXTERNAL_CLEANFILES}
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+set_tests_properties (H5TEST-external_env-clean-objects PROPERTIES FIXTURES_CLEANUP clear_external_env)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-external_env COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:external_env>)
else ()
@@ -602,15 +495,13 @@ set_tests_properties (H5TEST-external_env PROPERTIES
#-- Adding test for vds_env
add_test (
- NAME H5TEST-vds_env-clear-objects
+ NAME H5TEST-vds_env-clean-objects
COMMAND ${CMAKE_COMMAND} -E remove
- vds_virt_0.h5
- vds_virt_3.h5
- vds_src_2.h5
+ tmp_vds_env/vds_env_src_2.h5
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST
)
-set_tests_properties (H5TEST-vds_env-clear-objects PROPERTIES FIXTURES_SETUP clear_vds_env)
+set_tests_properties (H5TEST-vds_env-clean-objects PROPERTIES FIXTURES_CLEANUP clear_vds_env)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-vds_env COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:vds_env>)
else ()
@@ -635,20 +526,26 @@ set_tests_properties (H5TEST-vds_env PROPERTIES
)
#-- Adding test for flush1/2
+set (FLUSH_CLEANFILES
+ flush.h5
+ flush-swmr.h5
+ noflush.h5
+ noflush-swmr.h5
+ flush_extend.h5
+ flush_extend-swmr.h5
+ noflush_extend.h5
+ noflush_extend-swmr.h5
+)
add_test (NAME H5TEST-flush-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove
- flush.h5
- flush-swmr.h5
- noflush.h5
- noflush-swmr.h5
- flush_extend.h5
- flush_extend-swmr.h5
- noflush_extend.h5
- noflush_extend-swmr.h5
- WORKING_DIRECTORY
- ${HDF5_TEST_BINARY_DIR}/H5TEST
+ COMMAND ${CMAKE_COMMAND} -E remove ${FLUSH_CLEANFILES}
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
set_tests_properties (H5TEST-flush-clear-objects PROPERTIES FIXTURES_SETUP clear_flush)
+add_test (NAME H5TEST-flush-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${FLUSH_CLEANFILES}
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+set_tests_properties (H5TEST-flush-clean-objects PROPERTIES FIXTURES_CLEANUP clear_flush)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-flush1 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:flush1>)
else ()
@@ -743,6 +640,12 @@ add_test (
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
set_tests_properties (H5TEST-filenotclosed-clear-objects PROPERTIES FIXTURES_SETUP clear_filenotclosed)
+add_test (
+ NAME H5TEST-filenotclosed-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove filenotclosed.h5
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+set_tests_properties (H5TEST-filenotclosed-clean-objects PROPERTIES FIXTURES_CLEANUP clear_filenotclosed)
add_test (NAME H5TEST-filenotclosed COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:filenotclosed>)
set_tests_properties (H5TEST-filenotclosed PROPERTIES
FIXTURES_REQUIRED clear_filenotclosed
@@ -757,6 +660,12 @@ add_test (
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
set_tests_properties (H5TEST-del_many_dense_attrs-clear-objects PROPERTIES FIXTURES_SETUP clear_del_many_dense_attrs)
+add_test (
+ NAME H5TEST-del_many_dense_attrs-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove del_many_dense_attrs.h5
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+set_tests_properties (H5TEST-del_many_dense_attrs-clean-objects PROPERTIES FIXTURES_CLEANUP clear_del_many_dense_attrs)
add_test (NAME H5TEST-del_many_dense_attrs COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:del_many_dense_attrs>)
set_tests_properties (H5TEST-del_many_dense_attrs PROPERTIES
FIXTURES_REQUIRED clear_del_many_dense_attrs
@@ -836,6 +745,14 @@ else ()
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_PLUGIN_PRELOAD=::"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
+ add_test (
+ NAME H5TEST-error_test-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove error_test.txt
+ )
+ set_tests_properties (H5TEST-error_test-clean-objects PROPERTIES
+ DEPENDS H5TEST-error_test
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+ )
endif ()
#-- Adding test for links_env
@@ -848,6 +765,15 @@ add_test (NAME H5TEST-links_env-clear-objects
${HDF5_TEST_BINARY_DIR}/H5TEST
)
set_tests_properties (H5TEST-links_env-clear-objects PROPERTIES FIXTURES_SETUP clear_links_env)
+add_test (NAME H5TEST-links_env-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ extlinks_env0.h5
+ extlinks_env1.h5
+ tmp_links_env/extlinks_env1.h5
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+set_tests_properties (H5TEST-links_env-clean-objects PROPERTIES FIXTURES_CLEANUP clear_links_env)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-links_env COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:links_env>)
else ()
@@ -933,10 +859,20 @@ if (ENABLE_EXTENDED_TESTS)
if (H5_PERL_FOUND)
add_test (
NAME H5TEST-testflushrefresh-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove flushrefresh.h5
+ COMMAND ${CMAKE_COMMAND} -E remove
+ flushrefresh.h5
+ flushrefresh_test/flushrefresh.h5
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST/flushrefresh_test
)
set_tests_properties (H5TEST-testflushrefresh-clear-objects PROPERTIES FIXTURES_SETUP clear_testflushrefresh)
+ add_test (
+ NAME H5TEST-testflushrefresh-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ flushrefresh.h5
+ flushrefresh_test/flushrefresh.h5
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST/flushrefresh_test
+ )
+ set_tests_properties (H5TEST-testflushrefresh-clean-objects PROPERTIES FIXTURES_CLEANUP clear_testflushrefresh)
add_test (NAME H5TEST-testflushrefresh COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:flushrefresh>"
@@ -980,7 +916,7 @@ endif ()
if (HDF5_BUILD_GENERATORS AND BUILD_STATIC_LIBS)
macro (ADD_H5_GENERATOR genfile)
add_executable (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c)
- target_include_directories (${genfile} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (${genfile} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (${genfile} STATIC)
target_link_libraries (${genfile} PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (${genfile} PROPERTIES FOLDER generator/test)
diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake
index 87683fa..32877a4 100644
--- a/test/CMakeVFDTests.cmake
+++ b/test/CMakeVFDTests.cmake
@@ -138,21 +138,23 @@ add_custom_target(HDF5_VFDTEST_LIB_files ALL COMMENT "Copying files needed by HD
endmacro ()
macro (DO_VFD_TEST vfdtest vfdname resultcode)
- add_test (NAME VFD-${vfdname}-${vfdtest}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${vfdtest}.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
- )
+ if (NOT "${vfdtest}" IN_LIST H5_VFD_${vfdname}_SKIP_TESTS)
+ add_test (NAME VFD-${vfdname}-${vfdtest}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
+ )
+ endif ()
endmacro ()
macro (ADD_VFD_TEST vfdname resultcode)
@@ -165,10 +167,18 @@ add_custom_target(HDF5_VFDTEST_LIB_files ALL COMMENT "Copying files needed by HD
endif ()
endif ()
endforeach ()
- set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1)
- set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10)
- set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10)
- set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
+ if (NOT "flush2" IN_LIST H5_VFD_${vfdname}_SKIP_TESTS)
+ if (NOT "flush1" IN_LIST H5_VFD_${vfdname}_SKIP_TESTS)
+ set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1)
+ endif ()
+ set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10)
+ endif ()
+ if (NOT "flush1" IN_LIST H5_VFD_${vfdname}_SKIP_TESTS)
+ set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10)
+ endif ()
+ if (NOT "istore" IN_LIST H5_VFD_${vfdname}_SKIP_TESTS)
+ set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
+ endif ()
if (NOT CYGWIN)
set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
endif ()
diff --git a/test/ShellTests.cmake b/test/ShellTests.cmake
index 99faa00..140da6f 100644
--- a/test/ShellTests.cmake
+++ b/test/ShellTests.cmake
@@ -15,8 +15,30 @@
### T E S T I N G S H E L L S C R I P T S ###
##############################################################################
-if (UNIX)
+find_program (PWSH NAMES pwsh powershell)
+if (PWSH)
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/use_cases_test")
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/swmr_test")
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/vds_swmr_test")
+ set (srcdir ${HDF5_TEST_SOURCE_DIR})
+ set (H5_UTILS_TEST_BUILDDIR ${CMAKE_TEST_OUTPUT_DIRECTORY})
+ set (H5_TEST_BUILDDIR ${HDF5_TEST_BINARY_DIR}/H5TEST)
+ configure_file(${HDF5_TEST_SOURCE_DIR}/test_swmr.pwsh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_swmr.ps1 @ONLY)
+ # test commented out as currently the programs are not allowing another access to the data file
+ #add_test (H5SHELL-testswmr ${PWSH} ${HDF5_TEST_BINARY_DIR}/H5TEST/testswmr.ps1)
+ #set_tests_properties (H5SHELL-testswmr PROPERTIES
+ # ENVIRONMENT "PATH=$ENV{PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
+ # WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+ #)
+ configure_file(${HDF5_TEST_SOURCE_DIR}/test_vds_swmr.pwsh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_vds_swmr.ps1 @ONLY)
+ # test commented out as currently the programs are not allowing another access to the data file
+ #add_test (H5SHELL-testvdsswmr ${PWSH} ${HDF5_TEST_BINARY_DIR}/H5TEST/testvdsswmr.ps1)
+ #set_tests_properties (H5SHELL-testvdsswmr PROPERTIES
+ # ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
+ # WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+ #)
+elseif (UNIX)
find_program (SH_PROGRAM bash)
if (SH_PROGRAM)
set (srcdir ${HDF5_TEST_SOURCE_DIR})
diff --git a/test/test_mirror.sh.in b/test/test_mirror.sh.in
index b3e75c6..ded73ad 100644
--- a/test/test_mirror.sh.in
+++ b/test/test_mirror.sh.in
@@ -45,7 +45,9 @@ done
RUN_DIR=mirror_vfd_test
MIRROR_UTILS=../utils/mirror_vfd # TODO: presupposes from test/
-mkdir $RUN_DIR
+if [[ ! -d $RUN_DIR ]] ; then
+ mkdir $RUN_DIR
+fi
# Copy program files into dedicated test directory
for FILE in $MIRROR_UTILS/mirror_* ; do
@@ -61,6 +63,10 @@ cp mirror_vfd $RUN_DIR
# wrapper script. Copy these libs builds if appropriate.
if [ -f $MIRROR_UTILS/.libs/mirror_server ] ; then
RUN_LIBS=$RUN_DIR/.libs
+ # Delete previous .libs directory, to remove any generated libtool files
+ if [[ -d $RUN_LIBS ]] ; then
+ rm -rf $RUN_LIBS
+ fi
mkdir $RUN_LIBS
for FILE in $MIRROR_UTILS/.libs/mirror_* ; do
case "$FILE" in
@@ -77,12 +83,15 @@ echo "Launching Mirror Server"
SERVER_ARGS="$SERVER_PORT $SERVER_VERBOSITY"
./mirror_server $SERVER_ARGS &
-./mirror_vfd
+./mirror_vfd $SERVER_PORT
nerrors=$?
echo "Stopping Mirror Server"
./mirror_server_stop $SERVER_PORT
+# Wait for background server process to exit
+wait
+
###############################################################################
## Report and exit
###############################################################################
diff --git a/test/test_plugin.sh.in b/test/test_plugin.sh.in
index 78cdb3a..ac89c0e 100644
--- a/test/test_plugin.sh.in
+++ b/test/test_plugin.sh.in
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/usr/bin/env bash
#
# Copyright by The HDF Group.
# All rights reserved.
@@ -19,6 +19,9 @@ DEPRECATED_SYMBOLS="@DEPRECATED_SYMBOLS@"
EXIT_SUCCESS=0
EXIT_FAILURE=1
+CP="cp -p" # Use -p to preserve mode,ownership, timestamps
+RM="rm -rf"
+
nerrors=0
verbose=yes
exit_code=$EXIT_SUCCESS
diff --git a/test/test_swmr.pwsh.in b/test/test_swmr.pwsh.in
new file mode 100644
index 0000000..de7a57a
--- /dev/null
+++ b/test/test_swmr.pwsh.in
@@ -0,0 +1,519 @@
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# 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
+# help@hdfgroup.org.
+#
+# Tests for the swmr feature.
+
+$srcdir = '@srcdir@'
+$utils_testdir=@H5_UTILS_TEST_BUILDDIR@
+$testdir=@H5_TEST_BUILDDIR@
+
+###############################################################################
+## test parameters
+###############################################################################
+
+$Nreaders = 5 # number of readers to launch
+$Nrdrs_spa = 3 # number of sparse readers to launch
+$Nrecords = 200000 # number of records to write
+$Nrecs_rem = 40000 # number of times to shrink
+$Nrecs_spa = 20000 # number of records to write in the sparse test
+$Nsecs_add = 5 # number of seconds per read interval
+$Nsecs_rem = 3 # number of seconds per read interval
+$Nsecs_addrem = 8 # number of seconds per read interval
+$nerrors = 0
+
+###############################################################################
+## definitions for message file to coordinate test runs
+###############################################################################
+$WRITER_MESSAGE = 'SWMR_WRITER_MESSAGE' # The message file created by writer that the open is complete
+ # This should be the same as the define in "test/swmr_common.h"
+$MESSAGE_TIMEOUT = 300 # Message timeout length in secs
+ # This should be the same as the define in "test/h5test.h"
+
+# Print a line-line message left justified in a field of 70 characters
+# beginning with the word "Testing".
+#
+function Test-WithSpaces {
+ $SPACES=' '
+ #Write-Output "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
+}
+
+# To wait for the writer message file or till the maximum # of seconds is reached
+# $Message is the message file to wait for
+# This performs similar function as the routine h5_wait_message() in test/h5test.c
+function Wait-Message {
+ [CmdletBinding()]
+ param (
+ [Parameter(Mandatory, ValueFromPipeline)]
+ [string]$TestPath, # Get the path of the message file to wait for
+ [Parameter(Mandatory, ValueFromPipeline)]
+ [string]$Message # Get the name of the message file to wait for
+ )
+
+ PROCESS {
+ $message = Join-Path -Path $TestPath -ChildPath $Message
+ $t0 = Get-Date # Get current time
+ $t1 = $t0
+ $difft = New-Timespan -Start $t0 -End $t1 # Initialize the time difference
+ $mexist = 0 # Indicate whether the message file is found
+ while ($difft.TotalSeconds -lt $MESSAGE_TIMEOUT) { # Loop till message times out
+ $t1 = Get-Date # Get current time in seconds
+ $difft = New-Timespan -Start $t0 -End $t1 # Calculate the time difference
+ #Write-Output "Check for $message : time=$difft"
+ if ([System.IO.File]::Exists($message)) { # If message file is found:
+ $mexist = 1 # indicate the message file is found
+ Remove-Item $message # remove the message file
+ break # get out of the while loop
+ }
+ }
+ if ($mexist -eq 0) {
+ # Issue warning that the writer message file is not found, continue with launching the reader(s)
+ Write-Warning -Message "$WRITER_MESSAGE is not found after waiting $MESSAGE_TIMEOUT seconds"
+ }
+ else {
+ Write-Output "$WRITER_MESSAGE is found"
+ }
+ }
+}
+
+###############################################################################
+## Main
+##
+## Modifications:
+## Vailin Choi; July 2013
+## Add waiting of message file before launching the reader(s).
+## Due to the implementation of file locking, coordination
+## is needed in file opening for the writer/reader tests
+## to proceed as expected.
+##
+###############################################################################
+
+# Check to see if the VFD specified by the HDF5_DRIVER environment variable
+# supports SWMR.
+$testprog = Join-Path -Path $utils_testdir -ChildPath swmr_check_compat_vfd.exe
+$rp = Start-Process -FilePath $testprog -PassThru -Wait -NoNewWindow
+if ($rp.ExitCode -ne 0) {
+ Write-Output ""
+ Write-Output "The VFD specified by the HDF5_DRIVER environment variable"
+ Write-Output "does not support SWMR."
+ Write-Output ""
+ Write-Output "SWMR acceptance tests skipped"
+ Write-Output ""
+ exit 0
+}
+
+Set-Location -Path swmr_test
+$testdir = Join-Path -Path $testdir -ChildPath swmr_test
+
+# Loop over index types
+$IndexTypeLoop = '-i ea', '-i b2'
+foreach ($index_type in $IndexTypeLoop) {
+ # Try with and without compression
+ $CompressLoop = '', '-c 5'
+ foreach ($compress in $CompressLoop) {
+ Write-Output ""
+ Write-Output "*******************************************************************************"
+ Write-Output "** Loop testing parameters: $index_type $compress"
+ Write-Output "*******************************************************************************"
+ Write-Output ""
+ Write-Output ""
+ Write-Output "###############################################################################"
+ Write-Output "## Generator test"
+ Write-Output "###############################################################################"
+ # Launch the Generator without SWMR_WRITE
+ Write-Output "launch the swmr_generator"
+ $rp = Start-Process -FilePath $testdir/swmr_generator.exe -NoNewWindow -ArgumentList "$compress $index_type" -PassThru -Wait
+ if ($rp.ExitCode -ne 0) {
+ Write-Warning "generator had error"
+ $nerrors += 1
+ }
+
+ # Launch the Generator with SWMR_WRITE
+ Write-Output "launch the swmr_generator with SWMR_WRITE"
+ $rp = Start-Process -FilePath $testdir/swmr_generator.exe -NoNewWindow -ArgumentList "-s $compress $index_type" -PassThru -Wait
+ if ($rp.ExitCode -ne 0) {
+ Write-Warning "generator had error"
+ $nerrors += 1
+ }
+
+ # Check for error and exit if one occurred
+ #Write-Output "nerrors=$nerrors"
+ if ($nerrors -ne 0) {
+ Write-Warning "SWMR tests failed with $nerrors errors."
+ exit 1
+ }
+
+ Write-Output ""
+ Write-Output "###############################################################################"
+ Write-Output "## Use H5Fstart_swmr_write() to enable SWMR writing mode"
+ Write-Output "###############################################################################"
+
+ # Remove any possible writer message file before launching writer
+ if ([System.IO.File]::Exists($WRITER_MESSAGE)) { # If message file is found
+ Remove-Item $WRITER_MESSAGE
+ }
+ #
+ # Launch the Writer
+ Write-Output "launch the swmr_start_writer"
+ $seed = "" # Put -r <random seed> command here
+ $rp = Start-Process -FilePath $testdir/swmr_start_write.exe -NoNewWindow -PassThru -ArgumentList "$compress $index_type $Nrecords $seed" 2>&1 |tee swmr_writer.out
+ $pid_writer = $rp.id
+ #Write-Output "pid_writer=$pid_writer"
+
+ # Wait for message from writer process before starting reader(s)
+ Wait-Message $testdir $WRITER_MESSAGE
+
+ #
+ # Launch the Readers
+ #declare -a seeds = (<seed1> <seed2> <seed3> ... )
+ Write-Output "launch $Nreaders swmr_readers"
+ $pid_readers = @()
+ $n = 0
+ while ($n -lt $Nreaders) {
+ #seed = "-r ${seeds[$n]}"
+ $seed = ""
+ $rp = Start-Process -FilePath $testdir/swmr_reader.exe -NoNewWindow -PassThru -ArgumentList "$Nsecs_add $seed" 2>&1 | tee swmr_reader.out.$n
+ $pid_readers += $rp.id
+ $n += 1
+ }
+ #Write-Output "pid_readers=$pid_readers"
+
+ # Collect exit code of the readers first because they usually finish
+ # before the writer.
+ foreach ($xpid in $pid_readers) {
+ #Write-Output "checked reader $xpid"
+ $result = Wait-Process -Id $xpid
+ if ($result.ExitCode -ne 0) {
+ Write-Warning "reader had error"
+ $nerrors += 1
+ }
+ }
+
+ # Collect exit code of the writer
+ #Write-Output "checked writer $pid_writer"
+ $result = Wait-Process -Id $pid_writer
+ if ($result.ExitCode -ne 0) {
+ Write-Warning "writer had error"
+ $nerrors += 1
+ }
+
+ # Check for error and exit if one occurred
+ #Write-Output "nerrors=$nerrors"
+ if ($nerrors -ne 0) {
+ Write-Warning "SWMR tests failed with $nerrors errors."
+ Write-Warning "(Writer and reader output preserved)"
+ exit 1
+ }
+
+ # Clean up output files
+ Remove-Item swmr_writer.out
+ Remove-Item swmr_reader.out.*
+
+ Write-Output ""
+ Write-Output "###############################################################################"
+ Write-Output "## Writer test - test expanding the dataset"
+ Write-Output "###############################################################################"
+
+ # Launch the Generator
+ Write-Output "launch the swmr_generator"
+ $rp = Start-Process -FilePath $testdir/swmr_generator.exe -NoNewWindow -PassThru -Wait -ArgumentList "-s $compress $index_type"
+ if ($rp.ExitCode -ne 0) {
+ Write-Warning "generator had error"
+ $nerrors += 1
+ }
+
+ # Remove any possible writer message file before launching writer
+ Remove-Item $WRITER_MESSAGE
+ #
+ # Launch the Writer
+ Write-Output "launch the swmr_writer"
+ $seed = "" # Put -r <random seed> command here
+ $rp = Start-Process -FilePath $testdir/swmr_writer.exe -NoNewWindow -PassThru -ArgumentList "-o $Nrecords $seed" 2>&1 |tee swmr_writer.out
+ $pid_writer = $rp.id
+ #Write-Output "pid_writer=$pid_writer"
+
+ # Wait for message from writer process before starting reader(s)
+ Wait-Message $testdir $WRITER_MESSAGE
+ #
+ # Launch the Readers
+ #declare -a seeds = (<seed1> <seed2> <seed3> ... )
+ Write-Output "launch $Nreaders swmr_readers"
+ $pid_readers = @()
+ $n = 0
+ while ($n -lt $Nreaders) {
+ #seed = "-r ${seeds[$n]}"
+ $seed = ""
+ $rp = Start-Process -FilePath $testdir/swmr_reader.exe -NoNewWindow -PassThru -ArgumentList "$Nsecs_add $seed" 2>&1 |tee swmr_reader.out.$n
+ $pid_readers += $rp.id
+ $n += 1
+ }
+ #Write-Output "pid_readers=$pid_readers"
+
+ # Collect exit code of the readers first because they usually finish
+ # before the writer.
+ foreach ($xpid in $pid_readers) {
+ #Write-Output "checked reader $xpid"
+ $result = Wait-Process -Id $xpid
+ if ($result.ExitCode -ne 0) {
+ Write-Warning "reader had error"
+ $nerrors += 1
+ }
+ }
+
+ # Collect exit code of the writer
+ #Write-Output "checked writer $pid_writer"
+ $result = Wait-Process -Id $pid_writer
+ if ($result.ExitCode -ne 0) {
+ Write-Warning "writer had error"
+ $nerrors += 1
+ }
+
+ # Check for error and exit if one occurred
+ #Write-Output "nerrors=$nerrors"
+ if ($nerrors -ne 0) {
+ Write-Warning "SWMR tests failed with $nerrors errors."
+ Write-Warning "(Writer and reader output preserved)"
+ exit 1
+ }
+
+ # Clean up output files
+ Remove-Item swmr_writer.out
+ Remove-Item swmr_reader.out.*
+
+ Write-Output ""
+ Write-Output "###############################################################################"
+ Write-Output "## Remove test - test shrinking the dataset"
+ Write-Output "###############################################################################"
+
+ # Remove any possible writer message file before launching writer
+ Remove-Item $WRITER_MESSAGE
+ # Launch the Remove Writer
+ Write-Output "launch the swmr_remove_writer"
+ $seed = "" # Put -r <random seed> command here
+ $rp = Start-Process -FilePath $testdir/swmr_remove_writer.exe -NoNewWindow -PassThru -ArgumentList "-o $Nrecs_rem $seed" 2>&1 |tee swmr_writer.out
+ $pid_writer = $rp.id
+ #Write-Output "pid_writer=$pid_writer"
+
+ # Wait for message from writer process before starting reader(s)
+ Wait-Message $testdir $WRITER_MESSAGE
+ #
+ # Launch the Remove Readers
+ #declare -a seeds = (<seed1> <seed2> <seed3> ... )
+ $n = 0
+ $pid_readers = @()
+ Write-Output "launch $Nreaders swmr_remove_readers"
+ while ($n -lt $Nreaders) {
+ #seed = "-r ${seeds[$n]}"
+ $seed = ""
+ $rp = Start-Process -FilePath $testdir/swmr_remove_reader.exe -NoNewWindow -PassThru -ArgumentList "$Nsecs_rem $seed" 2>&1 |tee swmr_reader.out.$n
+ $pid_readers += $rp.id
+ $n += 1
+ }
+ #Write-Output "pid_readers=$pid_readers"
+
+ # Collect exit code of the readers first because they usually finish
+ # before the writer.
+ foreach ($xpid in $pid_readers) {
+ #Write-Output "checked reader $xpid"
+ $result = Wait-Process -Id $xpid
+ if ($result.ExitCode -ne 0) {
+ Write-Warning "reader had error"
+ $nerrors += 1
+ }
+ }
+
+ # Collect exit code of the writer
+ #Write-Output "checked writer $pid_writer"
+ $result = Wait-Process -Id $pid_writer
+ if ($result.ExitCode -ne 0) {
+ Write-Warning "writer had error"
+ $nerrors += 1
+ }
+
+ # Check for error and exit if one occurred
+ #Write-Output "nerrors=$nerrors"
+ if ($nerrors -ne 0) {
+ Write-Warning "SWMR tests failed with $nerrors errors."
+ Write-Warning "(Writer and reader output preserved)"
+ exit 1
+ }
+
+ # Clean up output files
+ Remove-Item swmr_writer.out
+ Remove-Item swmr_reader.out.*
+
+ Write-Output ""
+ Write-Output "###############################################################################"
+ Write-Output "## Add/remove test - randomly grow or shrink the dataset"
+ Write-Output "###############################################################################"
+
+ # Launch the Generator
+ Write-Output "launch the swmr_generator"
+ $rp = Start-Process -FilePath $testdir/swmr_generator.exe -NoNewWindow-PassThru -Wait -ArgumentList "$compress $index_type"
+ if ($rp.ExitCode -ne 0) {
+ Write-Warning "generator had error"
+ $nerrors += 1
+ }
+
+ # Launch the Writer (not in parallel - just to rebuild the datasets)
+ Write-Output "launch the swmr_writer"
+ $seed = "" # Put -r <random seed> command here
+ $rp = Start-Process -FilePath $testdir/swmr_writer.exe -NoNewWindow -PassThru -Wait -ArgumentList "$Nrecords $seed"
+ if ($rp.ExitCode -ne 0) {
+ Write-Warning "writer had error"
+ $nerrors += 1
+ }
+
+ # Remove any possible writer message file before launching writer
+ Remove-Item $WRITER_MESSAGE
+ #
+ # Launch the Add/Remove Writer
+ Write-Output "launch the swmr_addrem_writer"
+ $seed = "" # Put -r <random seed> command here
+ $rp = Start-Process -FilePath $testdir/swmr_addrem_writer.exe -NoNewWindow -PassThru -ArgumentList "$Nrecords $seed" 2>&1 |tee swmr_writer.out
+ $pid_writer = $rp.id
+ #Write-Output "pid_writer=$pid_writer"
+
+ # Wait for message from writer process before starting reader(s)
+ Wait-Message $testdir $WRITER_MESSAGE
+ #
+ # Launch the Add/Remove Readers
+ #declare -a seeds = (<seed1> <seed2> <seed3> ... )
+ $n = 0
+ $pid_readers = @()
+ Write-Output "launch $Nreaders swmr_remove_readers"
+ while ($n -lt $Nreaders) {
+ #seed = "-r ${seeds[$n]}"
+ $seed = ""
+ $rp = Start-Process -FilePath $testdir/swmr_remove_reader.exe -NoNewWindow -PassThru -ArgumentList "$Nsecs_addrem $seed" 2>&1 |tee swmr_reader.out.$n
+ $pid_readers += $rp.id
+ $n += 1
+ }
+ #Write-Output "pid_readers=$pid_readers"
+
+ # Collect exit code of the readers first because they usually finish
+ # before the writer.
+ foreach ($xpid in $pid_readers) {
+ #Write-Output "checked reader $xpid"
+ $result = Wait-Process -Id $xpid
+ if ($result.ExitCode -ne 0) {
+ Write-Warning "reader had error"
+ $nerrors += 1
+ }
+ }
+
+ # Collect exit code of the writer
+ #Write-Output "checked writer $pid_writer"
+ $result = Wait-Process -Id $pid_writer
+ if ($result.ExitCode -ne 0) {
+ Write-Warning "writer had error"
+ $nerrors += 1
+ }
+
+ # Check for error and exit if one occurred
+ #Write-Output "nerrors=$nerrors"
+ if ($nerrors -ne 0) {
+ Write-Warning "SWMR tests failed with $nerrors errors."
+ Write-Warning "(Writer and reader output preserved)"
+ exit 1
+ }
+
+ # Clean up output files
+ Remove-Item swmr_writer.out
+ Remove-Item swmr_reader.out.*
+
+ Write-Output ""
+ Write-Output "###############################################################################"
+ Write-Output "## Sparse writer test - test writing to random locations in the dataset"
+ Write-Output "###############################################################################"
+
+ # Launch the Generator
+ # NOTE: Random seed is shared between readers and writers and is
+ # created by the generator.
+ Write-Output "launch the swmr_generator"
+ $seed = "" # Put -r <random seed> command here
+ $rp = Start-Process -FilePath $testdir/swmr_generator.exe -NoNewWindow -PassThru -Wait -ArgumentList "$compress $index_type $seed"
+ if ($rp.ExitCode -ne 0) {
+ Write-Warning "generator had error"
+ $nerrors += 1
+ }
+
+ # Remove any possible writer message file before launching writer
+ Remove-Item $WRITER_MESSAGE
+ # Launch the Sparse writer
+ Write-Output "launch the swmr_sparse_writer"
+ $rp = Start-Process -FilePath $testdir/swmr_sparse_writer.exe -NoNewWindow -PassThru -ArgumentList "$Nrecs_spa" 2>&1 |tee swmr_writer.out
+ $pid_writer = $rp.Id
+ #Write-Output "pid_writer=$pid_writer"
+
+ # Wait for message from writer process before starting reader(s)
+ Wait-Message $testdir $WRITER_MESSAGE
+ #
+ # Launch the Sparse readers
+ $n = 0
+ $pid_readers = @()
+ Write-Output "launch $Nrdrs_spa swmr_sparse_readers"
+ while ($n -lt $Nrdrs_spa) {
+ # The sparse reader spits out a LOT of data so it's set to 'quiet'
+ $rp = Start-Process -FilePath $testdir/swmr_sparse_reader.exe -NoNewWindow -PassThru -ArgumentList "-q $Nrecs_spa" 2>&1 |tee swmr_reader.out.$n
+ $pid_readers += $rp.id
+ $n += 1
+ }
+ #Write-Output "pid_readers=$pid_readers"
+
+ # Collect exit code of the writer
+ #Write-Output "checked writer $pid_writer"
+ $result = Wait-Process -Id $pid_writer
+ if ($result.ExitCode -ne 0) {
+ Write-Warning "writer had error"
+ $nerrors += 1
+ }
+
+ # Collect exit code of the readers
+ foreach ($xpid in $pid_readers) {
+ #Write-Output "checked reader $xpid"
+ $result = Wait-Process -Id $xpid
+ if ($result.ExitCode -ne 0) {
+ Write-Warning "reader had error"
+ $nerrors += 1
+ }
+ }
+
+ # Check for error and exit if one occurred
+ #Write-Output "nerrors=$nerrors"
+ if ($nerrors -ne 0) {
+ Write-Warning "SWMR tests failed with $nerrors errors."
+ Write-Warning "(Writer and reader output preserved)"
+ exit 1
+ }
+
+ # Clean up output files
+ Remove-Item swmr_writer.out
+ Remove-Item swmr_reader.out.*
+ }
+}
+
+###############################################################################
+## Report and exit
+###############################################################################
+cd ..
+#Write-Output "nerrors=$nerrors"
+if ($nerrors -eq 0) {
+ Write-Output "SWMR tests passed."
+# if test -z "$HDF5_NOCLEANUP"; then
+# # delete the test directory
+# Remove-Item swmr_test -Recurse
+# fi
+ exit 0
+}
+else {
+ Write-Warning "SWMR tests failed with $nerrors errors."
+ exit 1
+}
+
diff --git a/test/test_swmr.sh.in b/test/test_swmr.sh.in
index 33734b7..aacd575 100644
--- a/test/test_swmr.sh.in
+++ b/test/test_swmr.sh.in
@@ -1,4 +1,4 @@
-#! /bin/bash
+#!/usr/bin/env bash
#
# Copyright by The HDF Group.
# All rights reserved.
@@ -10,12 +10,10 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-# Tests for the swmr feature.
+# Acceptance tests for the SWMR feature
#
-# Created:
-# Albert Cheng, 2009/07/22
+###############################################################################
-srcdir=@srcdir@
utils_testdir=@abs_top_builddir@/@H5_UTILS_TEST_BUILDDIR@
testdir=@abs_top_builddir@/@H5_TEST_BUILDDIR@
@@ -42,7 +40,7 @@ MESSAGE_TIMEOUT=300 # Message timeout length in secs
# This should be the same as the define in "test/h5test.h"
###############################################################################
-## short hands and function definitions
+## Aliases and function definitions
###############################################################################
DPRINT=: # Set to "echo Debug:" for debugging printing,
# else ":" for noop.
@@ -169,7 +167,7 @@ do
echo "###############################################################################"
# Launch the Generator without SWMR_WRITE
echo launch the swmr_generator
- $testdir/swmr_generator $compress $index_type
+ $testdir/swmr_generator -q $compress $index_type
if test $? -ne 0; then
echo generator had error
nerrors=`expr $nerrors + 1`
@@ -177,7 +175,7 @@ do
# Launch the Generator with SWMR_WRITE
echo launch the swmr_generator with SWMR_WRITE
- $testdir/swmr_generator -s $compress $index_type
+ $testdir/swmr_generator -q -s $compress $index_type
if test $? -ne 0; then
echo generator had error
nerrors=`expr $nerrors + 1`
@@ -201,14 +199,13 @@ do
# Launch the Writer
echo launch the swmr_start_writer
seed="" # Put -r <random seed> command here
- $testdir/swmr_start_write $compress $index_type $Nrecords $seed 2>&1 |tee swmr_writer.out &
+ $testdir/swmr_start_write -q $compress $index_type $Nrecords $seed 2>&1 |tee swmr_writer.out &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
# Wait for message from writer process before starting reader(s)
WAIT_MESSAGE $WRITER_MESSAGE
- #
# Launch the Readers
#declare -a seeds=(<seed1> <seed2> <seed3> ... )
echo launch $Nreaders swmr_readers
@@ -217,14 +214,14 @@ do
while [ $n -lt $Nreaders ]; do
#seed="-r ${seeds[$n]}"
seed=""
- $testdir/swmr_reader $Nsecs_add $seed 2>&1 |tee swmr_reader.out.$n &
+ $testdir/swmr_reader -q $Nsecs_add $seed 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
n=`expr $n + 1`
done
$DPRINT pid_readers=$pid_readers
$IFDEBUG ps
- # Collect exit code of the readers first because they usually finish
+ # Collect exit codes of the readers first because they usually finish
# before the writer.
for xpid in $pid_readers; do
$DPRINT checked reader $xpid
@@ -262,7 +259,7 @@ do
# Launch the Generator
echo launch the swmr_generator
- $testdir/swmr_generator -s $compress $index_type
+ $testdir/swmr_generator -q -s $compress $index_type
if test $? -ne 0; then
echo generator had error
nerrors=`expr $nerrors + 1`
@@ -274,13 +271,13 @@ do
# Launch the Writer
echo launch the swmr_writer
seed="" # Put -r <random seed> command here
- $testdir/swmr_writer -o $Nrecords $seed 2>&1 |tee swmr_writer.out &
+ $testdir/swmr_writer -q -o $Nrecords $seed 2>&1 |tee swmr_writer.out &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
# Wait for message from writer process before starting reader(s)
WAIT_MESSAGE $WRITER_MESSAGE
- #
+
# Launch the Readers
#declare -a seeds=(<seed1> <seed2> <seed3> ... )
echo launch $Nreaders swmr_readers
@@ -289,7 +286,7 @@ do
while [ $n -lt $Nreaders ]; do
#seed="-r ${seeds[$n]}"
seed=""
- $testdir/swmr_reader $Nsecs_add $seed 2>&1 |tee swmr_reader.out.$n &
+ $testdir/swmr_reader -q $Nsecs_add $seed 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
n=`expr $n + 1`
done
@@ -337,13 +334,13 @@ do
# Launch the Remove Writer
echo launch the swmr_remove_writer
seed="" # Put -r <random seed> command here
- $testdir/swmr_remove_writer -o $Nrecs_rem $seed 2>&1 |tee swmr_writer.out &
+ $testdir/swmr_remove_writer -q -o $Nrecs_rem $seed 2>&1 |tee swmr_writer.out &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
# Wait for message from writer process before starting reader(s)
WAIT_MESSAGE $WRITER_MESSAGE
- #
+
# Launch the Remove Readers
#declare -a seeds=(<seed1> <seed2> <seed3> ... )
n=0
@@ -352,7 +349,7 @@ do
while [ $n -lt $Nreaders ]; do
#seed="-r ${seeds[$n]}"
seed=""
- $testdir/swmr_remove_reader $Nsecs_rem $seed 2>&1 |tee swmr_reader.out.$n &
+ $testdir/swmr_remove_reader -q $Nsecs_rem $seed 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
n=`expr $n + 1`
done
@@ -397,7 +394,7 @@ do
# Launch the Generator
echo launch the swmr_generator
- $testdir/swmr_generator $compress $index_type
+ $testdir/swmr_generator -q $compress $index_type
if test $? -ne 0; then
echo generator had error
nerrors=`expr $nerrors + 1`
@@ -406,7 +403,7 @@ do
# Launch the Writer (not in parallel - just to rebuild the datasets)
echo launch the swmr_writer
seed="" # Put -r <random seed> command here
- $testdir/swmr_writer $Nrecords $seed
+ $testdir/swmr_writer -q $Nrecords $seed
if test $? -ne 0; then
echo writer had error
nerrors=`expr $nerrors + 1`
@@ -418,7 +415,7 @@ do
# Launch the Add/Remove Writer
echo launch the swmr_addrem_writer
seed="" # Put -r <random seed> command here
- $testdir/swmr_addrem_writer $Nrecords $seed 2>&1 |tee swmr_writer.out &
+ $testdir/swmr_addrem_writer -q $Nrecords $seed 2>&1 |tee swmr_writer.out &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
@@ -433,7 +430,7 @@ do
while [ $n -lt $Nreaders ]; do
#seed="-r ${seeds[$n]}"
seed=""
- $testdir/swmr_remove_reader $Nsecs_addrem $seed 2>&1 |tee swmr_reader.out.$n &
+ $testdir/swmr_remove_reader -q $Nsecs_addrem $seed 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
n=`expr $n + 1`
done
@@ -481,7 +478,7 @@ do
# created by the generator.
echo launch the swmr_generator
seed="" # Put -r <random seed> command here
- $testdir/swmr_generator $compress $index_type $seed
+ $testdir/swmr_generator -q $compress $index_type $seed
if test $? -ne 0; then
echo generator had error
nerrors=`expr $nerrors + 1`
@@ -491,7 +488,7 @@ do
rm -f $WRITER_MESSAGE
# Launch the Sparse writer
echo launch the swmr_sparse_writer
- nice -n 20 $testdir/swmr_sparse_writer $Nrecs_spa 2>&1 |tee swmr_writer.out &
+ nice -n 20 $testdir/swmr_sparse_writer -q $Nrecs_spa 2>&1 |tee swmr_writer.out &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
diff --git a/test/test_vds_swmr.pwsh.in b/test/test_vds_swmr.pwsh.in
new file mode 100644
index 0000000..bf5aabb
--- /dev/null
+++ b/test/test_vds_swmr.pwsh.in
@@ -0,0 +1,190 @@
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# 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
+# help@hdfgroup.org.
+#
+# Tests for the swmr feature using virtual datasets.
+
+$srcdir = '@srcdir@'
+$utils_testdir=@H5_UTILS_TEST_BUILDDIR@
+$testdir=@H5_TEST_BUILDDIR@
+
+###############################################################################
+## test parameters
+###############################################################################
+
+$Nwriters = 6 # number of writers (1 per source dataset)
+$Nreaders = 5 # number of readers to launch
+$nerrors = 0
+
+###############################################################################
+## definitions for message file to coordinate test runs
+###############################################################################
+$WRITER_MESSAGE = 'SWMR_WRITER_MESSAGE' # The message file created by writer that the open is complete
+ # This should be the same as the define in "test/swmr_common.h"
+$MESSAGE_TIMEOUT = 300 # Message timeout length in secs
+ # This should be the same as the define in "test/h5test.h"
+
+# Print a line-line message left justified in a field of 70 characters
+# beginning with the word "Testing".
+#
+function Test-WithSpaces {
+ $SPACES=' '
+ #Write-Output "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
+}
+
+# To wait for the writer message file or till the maximum # of seconds is reached
+# $Message is the message file to wait for
+# This performs similar function as the routine h5_wait_message() in test/h5test.c
+function Wait-Message {
+ [CmdletBinding()]
+ param (
+ [Parameter(Mandatory, ValueFromPipeline)]
+ [string]$TestPath, # Get the path of the message file to wait for
+ [Parameter(Mandatory, ValueFromPipeline)]
+ [string]$Message # Get the name of the message file to wait for
+ )
+
+ PROCESS {
+ $message = Join-Path -Path $TestPath -ChildPath $Message
+ $t0 = Get-Date # Get current time
+ $t1 = $t0
+ $difft = New-Timespan -Start $t0 -End $t1 # Initialize the time difference
+ $mexist = 0 # Indicate whether the message file is found
+ while ($difft.TotalSeconds -lt $MESSAGE_TIMEOUT) { # Loop till message times out
+ $t1 = Get-Date # Get current time in seconds
+ $difft = New-Timespan -Start $t0 -End $t1 # Calculate the time difference
+ #Write-Output "Check for $message : time=$difft"
+ if ([System.IO.File]::Exists($message)) { # If message file is found:
+ $mexist = 1 # indicate the message file is found
+ Remove-Item $message # remove the message file
+ break # get out of the while loop
+ }
+ }
+ if ($mexist -eq 0) {
+ # Issue warning that the writer message file is not found, continue with launching the reader(s)
+ Write-Warning -Message "$WRITER_MESSAGE is not found after waiting $MESSAGE_TIMEOUT seconds"
+ }
+ else {
+ Write-Output "$WRITER_MESSAGE is found"
+ }
+ }
+}
+
+###############################################################################
+## Main
+###############################################################################
+
+# Check to see if the VFD specified by the HDF5_DRIVER environment variable
+# supports SWMR.
+$testprog = Join-Path -Path $utils_testdir -ChildPath swmr_check_compat_vfd.exe
+$rp = Start-Process -FilePath $testprog -PassThru -Wait -NoNewWindow
+if ($rp.ExitCode -ne 0) {
+ Write-Output ""
+ Write-Output "The VFD specified by the HDF5_DRIVER environment variable"
+ Write-Output "does not support SWMR."
+ Write-Output ""
+ Write-Output "SWMR acceptance tests skipped"
+ Write-Output ""
+ exit 0
+}
+
+Set-Location -Path vds_swmr_test
+$testdir = Join-Path -Path $testdir -ChildPath vds_swmr_test
+
+Write-Output ""
+Write-Output "###############################################################################"
+Write-Output "## Basic VDS SWMR test - writing to a tiled plane"
+Write-Output "###############################################################################"
+
+# Launch the file generator
+Write-Output "launch the swmr_generator"
+$rp = Start-Process -FilePath $testdir/vds_swmr_gen.exe -NoNewWindow -PassThru -Wait
+if ($rp.ExitCode -ne 0) {
+ Write-Warning "generator had error"
+ $nerrors += 1
+}
+
+# Check for error and exit if one occurred
+#Write-Output "nerrors=$nerrors"
+if ($nerrors -ne 0) {
+ Write-Warning "VDS SWMR tests failed with $nerrors errors."
+ exit 1
+}
+
+# Launch the writers
+Write-Output "launch the $Nwriters SWMR VDS writers (1 per source)"
+$pid_writers = @()
+$n = 0
+while ($n -lt $Nwriters) {
+ $rp = Start-Process -FilePath $testdir/vds_swmr_writer.exe -NoNewWindow -PassThru -ArgumentList "$n" 2>&1 | tee swmr_writer.out.$n
+ $pid_writers += $rp.id
+ $n += 1
+}
+#Write-Output "pid_writers=$pid_writers"
+
+# Sleep to ensure that the writers have started
+Start-Sleep -Seconds 3
+
+# Launch the readers
+Write-Output "launch $Nreaders SWMR readers"
+$pid_readers = @()
+$n = 0
+while ($n -lt $Nreaders) {
+ $rp = Start-Process -FilePath $testdir/vds_swmr_reader.exe -NoNewWindow -PassThru 2>&1 | tee swmr_reader.out.$n
+ $pid_readers += $rp.id
+ $n += 1
+}
+#Write-Output "pid_readers=$pid_readers"
+
+# Collect exit code of the writers
+foreach ($xpid in $pid_writers) {
+ #Write-Output "checked writer $xpid"
+ $result = Wait-Process -Id $xpid
+ if ($result.ExitCode -ne 0) {
+ Write-Warning "writer had error"
+ $nerrors += 1
+ }
+}
+
+# Collect exit code of the readers
+# (they usually finish after the writers)
+foreach ($xpid in $pid_readers) {
+ #Write-Output "checked reader $xpid"
+ $result = Wait-Process -Id $xpid
+ if ($result.ExitCode -ne 0) {
+ Write-Warning "reader had error"
+ $nerrors += 1
+ }
+}
+
+# Check for error and exit if one occurred
+#Write-Output "nerrors=$nerrors"
+if ($nerrors -ne 0) {
+ Write-Warning "VDS SWMR tests failed with $nerrors errors."
+ exit 1
+}
+
+###############################################################################
+## Report and exit
+###############################################################################
+cd ..
+#Write-Output "nerrors=$nerrors"
+if ($nerrors -eq 0) {
+ Write-Output "VDS SWMR tests passed."
+# if test -z "$HDF5_NOCLEANUP"; then
+# # delete the test directory
+# Remove-Item vds_swmr_test -Recurse
+# fi
+ exit 0
+}
+else {
+ Write-Warning "VDS SWMR tests failed with $nerrors errors."
+ exit 1
+}
+
diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake
index ee69881..1a3f409 100644
--- a/testpar/CMakeTests.cmake
+++ b/testpar/CMakeTests.cmake
@@ -22,6 +22,12 @@ add_test (
WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}
)
set_tests_properties (MPI_TEST-clear-testphdf5-objects PROPERTIES FIXTURES_SETUP par_clear_testphdf5)
+add_test (
+ NAME MPI_TEST-clean-testphdf5-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ParaTest.h5
+ WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}
+)
+set_tests_properties (MPI_TEST-clean-testphdf5-objects PROPERTIES FIXTURES_CLEANUP par_clear_testphdf5)
set (SKIP_tests
cchunk1
@@ -101,6 +107,12 @@ add_test (
WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}
)
set_tests_properties (MPI_TEST-clear-objects PROPERTIES FIXTURES_SETUP par_clear_objects)
+add_test (
+ NAME MPI_TEST-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${test_par_CLEANFILES}
+ WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}
+)
+set_tests_properties (MPI_TEST-clean-objects PROPERTIES FIXTURES_CLEANUP par_clear_objects)
foreach (h5_testp ${H5P_TESTS})
add_test (NAME MPI_TEST_${h5_testp} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:${h5_testp}> ${MPIEXEC_POSTFLAGS})
diff --git a/testpar/CMakeVFDTests.cmake b/testpar/CMakeVFDTests.cmake
index d6a4025..40624d5 100644
--- a/testpar/CMakeVFDTests.cmake
+++ b/testpar/CMakeVFDTests.cmake
@@ -25,26 +25,34 @@ set (H5P_VFD_TESTS
macro (ADD_VFD_TEST vfdname resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
foreach (h5_test ${H5P_VFD_TESTS})
- add_test (
- NAME MPI_TEST_VFD-${vfdname}-${h5_test}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${h5_test}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${h5_test}.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (MPI_TEST_VFD-${vfdname}-${h5_test} PROPERTIES
- ENVIRONMENT "srcdir=${HDF5_TEST_PAR_BINARY_DIR}/${vfdname}"
- WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}/${vfdname}
- )
+ if (NOT "${h5_test}" IN_LIST H5P_VFD_${vfdname}_TESTS_SKIP)
+ add_test (
+ NAME MPI_TEST_VFD-${vfdname}-${h5_test}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${h5_test}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${h5_test}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (MPI_TEST_VFD-${vfdname}-${h5_test} PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_PAR_BINARY_DIR}/${vfdname}"
+ WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}/${vfdname}
+ )
+ endif ()
endforeach ()
- set_tests_properties (MPI_TEST_VFD-${vfdname}-t_pflush1 PROPERTIES WILL_FAIL "true")
- #set_property (TEST MPI_TEST_t_pflush1 PROPERTY PASS_REGULAR_EXPRESSION "PASSED")
- set_tests_properties (MPI_TEST_VFD-${vfdname}-t_pflush2 PROPERTIES DEPENDS MPI_TEST_VFD-${vfdname}-t_pflush1)
+ if (NOT "t_pflush1" IN_LIST H5P_VFD_${vfdname}_TESTS_SKIP)
+ set_tests_properties (MPI_TEST_VFD-${vfdname}-t_pflush1 PROPERTIES WILL_FAIL "true")
+ #set_property (TEST MPI_TEST_t_pflush1 PROPERTY PASS_REGULAR_EXPRESSION "PASSED")
+ endif ()
+ if (NOT "t_pflush2" IN_LIST H5P_VFD_${vfdname}_TESTS_SKIP)
+ if (NOT "t_pflush1" IN_LIST H5P_VFD_${vfdname}_TESTS_SKIP)
+ set_tests_properties (MPI_TEST_VFD-${vfdname}-t_pflush2 PROPERTIES DEPENDS MPI_TEST_VFD-${vfdname}-t_pflush1)
+ endif ()
+ endif ()
endif ()
endmacro ()
diff --git a/tools/libtest/CMakeTests.cmake b/tools/libtest/CMakeTests.cmake
index 2d8e877..79810c4 100644
--- a/tools/libtest/CMakeTests.cmake
+++ b/tools/libtest/CMakeTests.cmake
@@ -24,21 +24,10 @@
##############################################################################
macro (ADD_H5_TEST resultfile resultcode)
- add_test (
- NAME H5LIBTEST-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${resultfile}.out
- ${resultfile}.out.err
- )
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (H5LIBTEST-${resultfile}-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
add_test (NAME H5LIBTEST-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5tools_test_utils> ${ARGN})
if (NOT "${resultcode}" STREQUAL "0")
set_tests_properties (H5LIBTEST-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- set_tests_properties (H5LIBTEST-${resultfile} PROPERTIES DEPENDS H5LIBTEST-${resultfile}-clear-objects)
endmacro ()
##############################################################################
diff --git a/tools/src/h5diff/CMakeLists.txt b/tools/src/h5diff/CMakeLists.txt
index ad44a67..cd28c41 100644
--- a/tools/src/h5diff/CMakeLists.txt
+++ b/tools/src/h5diff/CMakeLists.txt
@@ -54,7 +54,7 @@ if (H5_HAVE_PARALLEL)
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.c
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/ph5diff_main.c
)
- target_include_directories (ph5diff PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (ph5diff PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_options(ph5diff PRIVATE "${HDF5_CMAKE_C_FLAGS}")
TARGET_C_PROPERTIES (ph5diff STATIC)
target_link_libraries (ph5diff PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>")
@@ -67,7 +67,7 @@ if (H5_HAVE_PARALLEL)
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.c
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/ph5diff_main.c
)
- target_include_directories (ph5diff-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (ph5diff-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_options(ph5diff-shared PRIVATE "${HDF5_CMAKE_C_FLAGS}")
TARGET_C_PROPERTIES (ph5diff-shared SHARED)
target_link_libraries (ph5diff-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>")
diff --git a/tools/test/h5copy/CMakeTests.cmake b/tools/test/h5copy/CMakeTests.cmake
index 12d8a52..05288b4 100644
--- a/tools/test/h5copy/CMakeTests.cmake
+++ b/tools/test/h5copy/CMakeTests.cmake
@@ -55,25 +55,17 @@
# Perform h5copy according to passing parameters
#
macro (ADD_H5_F_TEST testname resultcode infile fparam vparam sparam srcname dparam dstname)
- if (NOT HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- add_test (
- NAME H5COPY_F-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5
- )
- endif ()
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME H5COPY_F-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5
+ )
add_test (
NAME H5COPY_F-${testname}
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -f ${fparam} -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
- if (HDF5_ENABLE_USING_MEMCHECKER)
- if (last_test)
- set_tests_properties (H5COPY_F-${testname} PROPERTIES DEPENDS ${last_test})
- endif ()
- else ()
- set_tests_properties (H5COPY_F-${testname} PROPERTIES DEPENDS H5COPY_F-${testname}-clear-objects)
- endif ()
+ set_tests_properties (H5COPY_F-${testname} PROPERTIES DEPENDS H5COPY_F-${testname}-clear-objects)
# resultcode=2 will cause the test to skip the diff test
if (NOT "${resultcode}" STREQUAL "2")
@@ -86,28 +78,29 @@
set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true")
endif ()
endif ()
+ add_test (
+ NAME H5COPY_F-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5
+ )
+ if (NOT "${resultcode}" STREQUAL "2")
+ set_tests_properties (H5COPY_F-${testname}-clean-objects PROPERTIES DEPENDS H5COPY_F-${testname}-DIFF)
+ else ()
+ set_tests_properties (H5COPY_F-${testname}-clean-objects PROPERTIES DEPENDS H5COPY_F-${testname})
+ endif ()
endmacro ()
macro (ADD_H5_TEST testname resultcode infile vparam sparam srcname dparam dstname)
- if (NOT HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- add_test (
- NAME H5COPY-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5
- )
- endif ()
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME H5COPY-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5
+ )
add_test (
NAME H5COPY-${testname}
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
- if (HDF5_ENABLE_USING_MEMCHECKER)
- if (last_test)
- set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS ${last_test})
- endif ()
- else ()
- set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
- endif ()
+ set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
# resultcode=2 will cause the test to skip the diff test
if (NOT "${resultcode}" STREQUAL "2")
@@ -120,6 +113,15 @@
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
endif ()
endif ()
+ add_test (
+ NAME H5COPY-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5
+ )
+ if (NOT "${resultcode}" STREQUAL "2")
+ set_tests_properties (H5COPY-${testname}-clean-objects PROPERTIES DEPENDS H5COPY-${testname}-DIFF)
+ else ()
+ set_tests_properties (H5COPY-${testname}-clean-objects PROPERTIES DEPENDS H5COPY-${testname})
+ endif ()
endmacro ()
macro (ADD_SKIP_H5_TEST testname skipresultfile)
@@ -133,25 +135,17 @@
endmacro ()
macro (ADD_H5_TEST2 testname resultcode infile psparam pdparam vparam sparam srcname dparam dstname)
- if (NOT HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- add_test (
- NAME H5COPY-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5
- )
- endif ()
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME H5COPY-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5
+ )
add_test (
NAME H5COPY-${testname}-prefill
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
)
- if (HDF5_ENABLE_USING_MEMCHECKER)
- if (last_test)
- set_tests_properties (H5COPY-${testname}-prefill PROPERTIES DEPENDS ${last_test})
- endif ()
- else ()
- set_tests_properties (H5COPY-${testname}-prefill PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
- endif ()
+ set_tests_properties (H5COPY-${testname}-prefill PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
add_test (
NAME H5COPY-${testname}
@@ -169,28 +163,29 @@
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
endif ()
endif ()
+ add_test (
+ NAME H5COPY-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5
+ )
+ if (NOT "${resultcode}" STREQUAL "2")
+ set_tests_properties (H5COPY-${testname}-clean-objects PROPERTIES DEPENDS H5COPY-${testname}-DIFF)
+ else ()
+ set_tests_properties (H5COPY-${testname}-clean-objects PROPERTIES DEPENDS H5COPY-${testname})
+ endif ()
endmacro ()
macro (ADD_H5_TEST_SAME testname resultcode pfile psparam pdparam vparam sparam srcname dparam dstname)
- if (NOT HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- add_test (
- NAME H5COPY_SAME-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5
- )
- endif ()
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME H5COPY_SAME-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5
+ )
add_test (
NAME H5COPY_SAME-${testname}-prefill
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${pfile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
)
- if (HDF5_ENABLE_USING_MEMCHECKER)
- if (last_test)
- set_tests_properties (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS ${last_test})
- endif ()
- else (HDF5_ENABLE_USING_MEMCHECKER)
- set_tests_properties (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS H5COPY_SAME-${testname}-clear-objects)
- endif ()
+ set_tests_properties (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS H5COPY_SAME-${testname}-clear-objects)
add_test (
NAME H5COPY_SAME-${testname}
@@ -208,6 +203,15 @@
set_tests_properties (H5COPY_SAME-${testname}-DIFF PROPERTIES WILL_FAIL "true")
endif ()
endif ()
+ add_test (
+ NAME H5COPY_SAME-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5
+ )
+ if (NOT "${resultcode}" STREQUAL "2")
+ set_tests_properties (H5COPY_SAME-${testname}-clean-objects PROPERTIES DEPENDS H5COPY_SAME-${testname}-DIFF)
+ else ()
+ set_tests_properties (H5COPY_SAME-${testname}-clean-objects PROPERTIES DEPENDS H5COPY_SAME-${testname})
+ endif ()
endmacro ()
#
@@ -215,21 +219,19 @@
# files instead of checking with h5ls.
#
macro (ADD_H5_CMP_TEST testname resultcode infile vparam sparam srcname dparam dstname)
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME H5COPY-CMP-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5
+ )
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5COPY-CMP-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN})
if ("${resultcode}" STREQUAL "1")
set_tests_properties (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true")
endif ()
- if (last_test)
- set_tests_properties (H5COPY-CMP-${testname} PROPERTIES DEPENDS ${last_test})
- endif ()
+ set_tests_properties (H5COPY-CMP-${testname} PROPERTIES DEPENDS H5COPY-CMP-${testname}-clear-objects)
else ()
- # Remove any output file left over from previous test run
- add_test (
- NAME H5COPY-CMP-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5
- )
add_test (
NAME H5COPY-CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
@@ -246,6 +248,11 @@
)
set_tests_properties (H5COPY-CMP-${testname} PROPERTIES DEPENDS H5COPY-CMP-${testname}-clear-objects)
endif ()
+ add_test (
+ NAME H5COPY-CMP-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5
+ )
+ set_tests_properties (H5COPY-CMP-${testname}-clean-objects PROPERTIES DEPENDS H5COPY-CMP-${testname})
endmacro ()
macro (ADD_H5_UD_TEST testname resultcode infile sparam srcname dparam dstname cmpfile)
@@ -308,6 +315,11 @@
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
set_tests_properties (H5COPY_UD-${testname}-DIFF PROPERTIES DEPENDS H5COPY_UD-${testname})
+ add_test (
+ NAME H5COPY_UD-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/${testname}.out.h5
+ )
+ set_tests_properties (H5COPY_UD-${testname}-clean-objects PROPERTIES DEPENDS H5COPY_UD-${testname}-DIFF)
endif ()
endmacro ()
@@ -315,7 +327,7 @@
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
add_test (
- NAME H5COPY_UD_ERR-${testname}-clearall-objects
+ NAME H5COPY_UD_ERR-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove testfiles/${testname}_ERR.out.h5
)
if ("${resultcode}" STREQUAL "2")
@@ -355,7 +367,7 @@
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
endif ()
- set_tests_properties (H5COPY_UD_ERR-${testname} PROPERTIES DEPENDS H5COPY_UD_ERR-${testname}-clearall-objects)
+ set_tests_properties (H5COPY_UD_ERR-${testname} PROPERTIES DEPENDS H5COPY_UD_ERR-${testname}-clear-objects)
add_test (
NAME H5COPY_UD_ERR-${testname}-DIFF
COMMAND "${CMAKE_COMMAND}"
@@ -373,6 +385,11 @@
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
set_tests_properties (H5COPY_UD_ERR-${testname}-DIFF PROPERTIES DEPENDS H5COPY_UD_ERR-${testname})
+ add_test (
+ NAME H5COPY_UD_ERR-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/${testname}_ERR.out.h5
+ )
+ set_tests_properties (H5COPY_UD_ERR-${testname}-clean-objects PROPERTIES DEPENDS H5COPY_UD_ERR-${testname}-DIFF)
endif ()
endmacro ()
@@ -390,51 +407,6 @@
set (HDF_EXT_SRC_FILE h5copy_extlinks_src)
set (HDF_EXT_TRG_FILE h5copy_extlinks_trg)
- if (HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- add_test (
- NAME H5COPY-clearall-objects
- COMMAND ${CMAKE_COMMAND} -E remove
- simple.out.h5
- chunk.out.h5
- compact.out.h5
- compound.out.h5
- compressed.out.h5
- named_vl.out.h5
- nested_vl.out.h5
- simple_top.out.h5
- dsrename.out.h5
- grp_empty.out.h5
- grp_dsets.out.h5
- grp_nested.out.h5
- simple_group.out.h5
- grp_rename.out.h5
- grp_dsets_rename.out.h5
- A_B1_simple.out.h5
- A_B2_simple2.out.h5
- C_D_simple.out.h5
- E_F_grp_dsets.out.h5
- G_H_grp_nested.out.h5
- region_ref.out.h5
- ext_link.out.h5
- ext_link_f.out.h5
- ext_dangle_noobj.out.h5
- ext_dangle_noobj_f.out.h5
- ext_dangle_nofile.out.h5
- ext_dangle_nofile_f.out.h5
- ext_link_group.out.h5
- ext_link_group_f.out.h5
- samefile1.out.h5
- samefile2.out.h5
- h5copy_misc1.out.h5
- )
- set_tests_properties (H5COPY-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (last_test)
- set_tests_properties (H5COPY-clearall-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "H5COPY-clearall-objects")
- endif ()
-
# See which filters are usable (and skip tests for filters we
# don't have). Do this by searching H5pubconf.h to see which
# filters are defined.
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index 5b21d80..e007789 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -375,13 +375,9 @@
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DIFF-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> ${ARGN})
- set_tests_properties (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (${resultcode})
set_tests_properties (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (last_test)
- set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif ()
else ()
add_test (
NAME H5DIFF-${resultfile}
@@ -396,10 +392,10 @@
-D "TEST_APPEND=EXIT CODE:"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
- if (last_test)
- set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif ()
endif ()
+ set_tests_properties (H5DIFF-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ )
endmacro ()
macro (ADD_PH5_TEST resultfile resultcode)
@@ -410,9 +406,6 @@
if (${resultcode})
set_tests_properties (MPI_TEST_H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (last_test)
- set_tests_properties (MPI_TEST_H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif ()
else ()
add_test (
NAME MPI_TEST_H5DIFF-${resultfile}
@@ -429,11 +422,10 @@
-D "TEST_SORT_COMPARE=TRUE"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
- if (last_test)
- set_tests_properties (MPI_TEST_H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "MPI_TEST_H5DIFF-${resultfile}")
endif ()
+ set_tests_properties (MPI_TEST_H5DIFF-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/PAR/testfiles"
+ )
endmacro ()
macro (ADD_H5_UD_TEST testname resultcode resultfile)
@@ -473,9 +465,6 @@
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
endif ()
- if (last_test)
- set_tests_properties (H5DIFF_UD-${testname} PROPERTIES DEPENDS ${last_test})
- endif ()
endif ()
endmacro ()
@@ -550,394 +539,6 @@
set (FILEV4 4_vds.h5)
set (FILEV5 5_vds.h5)
- if (HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- add_test (
- NAME H5DIFF-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- h5diff_10.out
- h5diff_10.out.err
- h5diff_100.out
- h5diff_100.out.err
- h5diff_101.out
- h5diff_101.out.err
- h5diff_102.out
- h5diff_102.out.err
- h5diff_103.out
- h5diff_103.out.err
- h5diff_104.out
- h5diff_104.out.err
- h5diff_11.out
- h5diff_11.out.err
- h5diff_12.out
- h5diff_12.out.err
- h5diff_13.out
- h5diff_13.out.err
- h5diff_14.out
- h5diff_14.out.err
- h5diff_15.out
- h5diff_15.out.err
- h5diff_16_1.out
- h5diff_16_1.out.err
- h5diff_16_2.out
- h5diff_16_2.out.err
- h5diff_16_3.out
- h5diff_16_3.out.err
- h5diff_17.out
- h5diff_17.out.err
- h5diff_171.out
- h5diff_171.out.err
- h5diff_172.out
- h5diff_172.out.err
- h5diff_18_1.out
- h5diff_18_1.out.err
- h5diff_18.out
- h5diff_18.out.err
- h5diff_20.out
- h5diff_20.out.err
- h5diff_200.out
- h5diff_200.out.err
- h5diff_201.out
- h5diff_201.out.err
- h5diff_202.out
- h5diff_202.out.err
- h5diff_203.out
- h5diff_203.out.err
- h5diff_204.out
- h5diff_204.out.err
- h5diff_205.out
- h5diff_205.out.err
- h5diff_206.out
- h5diff_206.out.err
- h5diff_207.out
- h5diff_207.out.err
- h5diff_208.out
- h5diff_208.out.err
- h5diff_220.out
- h5diff_220.out.err
- h5diff_221.out
- h5diff_221.out.err
- h5diff_222.out
- h5diff_222.out.err
- h5diff_223.out
- h5diff_223.out.err
- h5diff_224.out
- h5diff_224.out.err
- h5diff_21.out
- h5diff_21.out.err
- h5diff_22.out
- h5diff_22.out.err
- h5diff_23.out
- h5diff_23.out.err
- h5diff_24.out
- h5diff_24.out.err
- h5diff_25.out
- h5diff_25.out.err
- h5diff_26.out
- h5diff_26.out.err
- h5diff_27.out
- h5diff_27.out.err
- h5diff_28.out
- h5diff_28.out.err
- h5diff_300.out
- h5diff_300.out.err
- h5diff_400.out
- h5diff_400.out.err
- h5diff_401.out
- h5diff_401.out.err
- h5diff_402.out
- h5diff_402.out.err
- h5diff_403.out
- h5diff_403.out.err
- h5diff_404.out
- h5diff_404.out.err
- h5diff_405.out
- h5diff_405.out.err
- h5diff_406.out
- h5diff_406.out.err
- h5diff_407.out
- h5diff_407.out.err
- h5diff_408.out
- h5diff_408.out.err
- h5diff_409.out
- h5diff_409.out.err
- h5diff_410.out
- h5diff_410.out.err
- h5diff_411.out
- h5diff_411.out.err
- h5diff_412.out
- h5diff_412.out.err
- h5diff_413.out
- h5diff_413.out.err
- h5diff_414.out
- h5diff_414.out.err
- h5diff_415.out
- h5diff_415.out.err
- h5diff_416.out
- h5diff_416.out.err
- h5diff_417.out
- h5diff_417.out.err
- h5diff_418.out
- h5diff_418.out.err
- h5diff_419.out
- h5diff_419.out.err
- h5diff_420.out
- h5diff_420.out.err
- h5diff_421.out
- h5diff_421.out.err
- h5diff_422.out
- h5diff_422.out.err
- h5diff_423.out
- h5diff_423.out.err
- h5diff_424.out
- h5diff_424.out.err
- h5diff_425.out
- h5diff_425.out.err
- h5diff_450.out
- h5diff_450.out.err
- h5diff_451.out
- h5diff_451.out.err
- h5diff_452.out
- h5diff_452.out.err
- h5diff_453.out
- h5diff_453.out.err
- h5diff_454.out
- h5diff_454.out.err
- h5diff_455.out
- h5diff_455.out.err
- h5diff_456.out
- h5diff_456.out.err
- h5diff_457.out
- h5diff_457.out.err
- h5diff_458.out
- h5diff_458.out.err
- h5diff_459.out
- h5diff_459.out.err
- h5diff_465.out
- h5diff_465.out.err
- h5diff_466.out
- h5diff_466.out.err
- h5diff_467.out
- h5diff_467.out.err
- h5diff_468.out
- h5diff_468.out.err
- h5diff_469.out
- h5diff_469.out.err
- h5diff_471.out
- h5diff_471.out.err
- h5diff_472.out
- h5diff_472.out.err
- h5diff_473.out
- h5diff_473.out.err
- h5diff_474.out
- h5diff_474.out.err
- h5diff_475.out
- h5diff_475.out.err
- h5diff_480.out
- h5diff_480.out.err
- h5diff_481.out
- h5diff_481.out.err
- h5diff_482.out
- h5diff_482.out.err
- h5diff_483.out
- h5diff_483.out.err
- h5diff_484.out
- h5diff_484.out.err
- h5diff_50.out
- h5diff_50.out.err
- h5diff_51.out
- h5diff_51.out.err
- h5diff_52.out
- h5diff_52.out.err
- h5diff_53.out
- h5diff_53.out.err
- h5diff_54.out
- h5diff_54.out.err
- h5diff_55.out
- h5diff_55.out.err
- h5diff_56.out
- h5diff_56.out.err
- h5diff_57.out
- h5diff_57.out.err
- h5diff_58.out
- h5diff_58.out.err
- h5diff_59.out
- h5diff_59.out.err
- h5diff_500.out
- h5diff_500.out.err
- h5diff_501.out
- h5diff_501.out.err
- h5diff_502.out
- h5diff_502.out.err
- h5diff_503.out
- h5diff_503.out.err
- h5diff_504.out
- h5diff_504.out.err
- h5diff_505.out
- h5diff_505.out.err
- h5diff_506.out
- h5diff_506.out.err
- h5diff_507.out
- h5diff_507.out.err
- h5diff_508.out
- h5diff_508.out.err
- h5diff_509.out
- h5diff_509.out.err
- h5diff_510.out
- h5diff_510.out.err
- h5diff_511.out
- h5diff_511.out.err
- h5diff_512.out
- h5diff_512.out.err
- h5diff_513.out
- h5diff_513.out.err
- h5diff_514.out
- h5diff_514.out.err
- h5diff_515.out
- h5diff_515.out.err
- h5diff_516.out
- h5diff_516.out.err
- h5diff_517.out
- h5diff_517.out.err
- h5diff_518.out
- h5diff_518.out.err
- h5diff_530.out
- h5diff_530.out.err
- h5diff_540.out
- h5diff_540.out.err
- h5diff_60.out
- h5diff_60.out.err
- h5diff_61.out
- h5diff_61.out.err
- h5diff_62.out
- h5diff_62.out.err
- h5diff_63.out
- h5diff_63.out.err
- h5diff_600.out
- h5diff_600.out.err
- h5diff_601.out
- h5diff_601.out.err
- h5diff_603.out
- h5diff_603.out.err
- h5diff_604.out
- h5diff_604.out.err
- h5diff_605.out
- h5diff_605.out.err
- h5diff_606.out
- h5diff_606.out.err
- h5diff_607.out
- h5diff_607.out.err
- h5diff_608.out
- h5diff_608.out.err
- h5diff_609.out
- h5diff_609.out.err
- h5diff_610.out
- h5diff_610.out.err
- h5diff_612.out
- h5diff_612.out.err
- h5diff_613.out
- h5diff_613.out.err
- h5diff_614.out
- h5diff_614.out.err
- h5diff_615.out
- h5diff_615.out.err
- h5diff_616.out
- h5diff_616.out.err
- h5diff_617.out
- h5diff_617.out.err
- h5diff_618.out
- h5diff_618.out.err
- h5diff_619.out
- h5diff_619.out.err
- h5diff_621.out
- h5diff_621.out.err
- h5diff_622.out
- h5diff_622.out.err
- h5diff_623.out
- h5diff_623.out.err
- h5diff_624.out
- h5diff_624.out.err
- h5diff_625.out
- h5diff_625.out.err
- h5diff_626.out
- h5diff_626.out.err
- h5diff_627.out
- h5diff_627.out.err
- h5diff_628.out
- h5diff_628.out.err
- h5diff_629.out
- h5diff_629.out.err
- h5diff_640.out
- h5diff_640.out.err
- h5diff_641.out
- h5diff_641.out.err
- h5diff_642.out
- h5diff_642.out.err
- h5diff_643.out
- h5diff_643.out.err
- h5diff_644.out
- h5diff_644.out.err
- h5diff_645.out
- h5diff_645.out.err
- h5diff_646.out
- h5diff_646.out.err
- h5diff_70.out
- h5diff_70.out.err
- h5diff_700.out
- h5diff_700.out.err
- h5diff_701.out
- h5diff_701.out.err
- h5diff_702.out
- h5diff_702.out.err
- h5diff_703.out
- h5diff_703.out.err
- h5diff_704.out
- h5diff_704.out.err
- h5diff_705.out
- h5diff_705.out.err
- h5diff_706.out
- h5diff_706.out.err
- h5diff_707.out
- h5diff_707.out.err
- h5diff_708.out
- h5diff_708.out.err
- h5diff_709.out
- h5diff_709.out.err
- h5diff_710.out
- h5diff_710.out.err
- h5diff_80.out
- h5diff_80.out.err
- h5diff_800.out
- h5diff_800.out.err
- h5diff_801.out
- h5diff_801.out.err
- h5diff_830.out
- h5diff_830.out.err
- h5diff_8625.out
- h5diff_8625.out.err
- h5diff_8639.out
- h5diff_8639.out.err
- h5diff_90.out
- h5diff_90.out.err
- h5diff_v1.out
- h5diff_v1.out.err
- h5diff_v2.out
- h5diff_v2.out.err
- h5diff_v3.out
- h5diff_v3.out.err
- h5diff_vlstr.out
- h5diff_vlstr.out.err
- h5diff_eps.out
- h5diff_eps.out.err
- )
- set_tests_properties (H5DIFF-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (last_test)
- set_tests_properties (H5DIFF-clearall-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "H5DIFF-clearall-objects")
- endif ()
-
# ############################################################################
# # Common usage
# ############################################################################
diff --git a/tools/test/h5diff/h5diff_plugin.sh.in b/tools/test/h5diff/h5diff_plugin.sh.in
index 28f723e..56fcad0 100644
--- a/tools/test/h5diff/h5diff_plugin.sh.in
+++ b/tools/test/h5diff/h5diff_plugin.sh.in
@@ -82,7 +82,7 @@ if [ $? != 0 ]; then
fi
# setup plugin path
-ENVCMD="env HDF5_PLUGIN_PATH=../${PLUGIN_LIBDIR}"
+ENVCMD="env HDF5_PLUGIN_PATH=../${PLUGIN_LIBDIR}:${HDF5_PLUGIN_PATH}"
#
# copy test files and expected output files from source dirs to test dir
diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake
index 525af97..7ce8f43 100644
--- a/tools/test/h5dump/CMakeTests.cmake
+++ b/tools/test/h5dump/CMakeTests.cmake
@@ -407,11 +407,6 @@
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
- set_tests_properties (H5DUMP-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- if (last_test)
- set_tests_properties (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "H5DUMP-${testname}")
else ()
add_test (
NAME H5DUMP-${testname}
@@ -425,10 +420,10 @@
-D "TEST_REFERENCE=h5dump-${testname}.txt"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
- if (last_test)
- set_tests_properties (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test})
- endif ()
endif ()
+ set_tests_properties (H5DUMP-${testname} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
endmacro ()
macro (ADD_SKIP_H5_TEST skipresultfile skipresultcode testtype)
@@ -449,19 +444,13 @@
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
- set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (last_test)
- set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif ()
- else ()
- add_test (
- NAME H5DUMP-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.bin
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
)
- set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ else ()
add_test (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
@@ -474,27 +463,32 @@
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
- set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
endif ()
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
endmacro ()
macro (ADD_H5_TEST_N resultfile resultcode)
+ add_test (
+ NAME H5DUMP-N-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${resultfile}-N.bin
+ )
+ set_tests_properties (H5DUMP-N-${resultfile}-clear-objects PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP-N-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
- set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
if (${resultcode})
set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (last_test)
- set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif ()
- else ()
- add_test (
- NAME H5DUMP-N-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}-N.bin
+ set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES
+ DEPENDS H5DUMP-N-${resultfile}-clear-objects
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
)
- set_tests_properties (H5DUMP-N-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ else ()
add_test (
NAME H5DUMP-N-${resultfile}
COMMAND "${CMAKE_COMMAND}"
@@ -507,27 +501,41 @@
-D "TEST_REFERENCE=${resultfile}-N.ddl"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
- set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES DEPENDS "H5DUMP-N-${resultfile}-clear-objects")
endif ()
+ set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES
+ DEPENDS H5DUMP-N-${resultfile}-clear-objects
+ )
+ add_test (
+ NAME H5DUMP-N-${resultfile}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${resultfile}-N.bin
+ )
+ set_tests_properties (H5DUMP-N-${resultfile}-clean-objects PROPERTIES
+ DEPENDS H5DUMP-N-${resultfile}
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
endmacro ()
macro (ADD_H5_TEST_EXPORT resultfile targetfile resultcode)
+ add_test (
+ NAME H5DUMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${resultfile}.txt
+ )
+ set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN} ${resultfile}.txt ${targetfile})
- set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (last_test)
- set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif ()
- else ()
- add_test (
- NAME H5DUMP-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.txt
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES
+ DEPENDS H5DUMP-${resultfile}-clear-objects
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
)
- set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ else ()
add_test (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
@@ -540,35 +548,58 @@
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
- set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES
+ DEPENDS H5DUMP-${resultfile}-clear-objects
+ )
add_test (
NAME H5DUMP-${resultfile}-output-cmp
- COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp
+ COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${resultfile}.txt ${resultfile}.exp
+ )
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES
+ DEPENDS H5DUMP-${resultfile}
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
)
- set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
endif ()
+ add_test (
+ NAME H5DUMP-${resultfile}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${resultfile}.txt
+ )
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DUMP-${resultfile}-clean-objects PROPERTIES
+ DEPENDS H5DUMP-${resultfile}
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
+ else ()
+ set_tests_properties (H5DUMP-${resultfile}-clean-objects PROPERTIES
+ DEPENDS H5DUMP-${resultfile}-output-cmp
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
+ endif ()
endmacro ()
macro (ADD_H5_TEST_EXPORT_DDL resultfile targetfile resultcode ddlfile)
+ add_test (
+ NAME H5DUMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${ddlfile}.txt
+ ${resultfile}.txt
+ )
+ set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile})
- set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (last_test)
- set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif ()
- else ()
- add_test (
- NAME H5DUMP-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove
- ${ddlfile}.txt
- ${resultfile}.txt
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES
+ DEPENDS H5DUMP-${resultfile}-clear-objects
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
)
- set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ else ()
add_test (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
@@ -581,19 +612,43 @@
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
- set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES
+ DEPENDS H5DUMP-${resultfile}-clear-objects
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
add_test (
NAME H5DUMP-${resultfile}-output-cmp
- COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp
+ COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${resultfile}.txt ${resultfile}.exp
+ )
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES
+ DEPENDS H5DUMP-${resultfile}
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
)
- set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
add_test (
NAME H5DUMP-${resultfile}-output-cmp-ddl
- COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${ddlfile}.txt ${ddlfile}.exp
+ COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${ddlfile}.txt ${ddlfile}.exp
+ )
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES
+ DEPENDS H5DUMP-${resultfile}-output-cmp
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
+ endif ()
+ add_test (
+ NAME H5DUMP-${resultfile}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${ddlfile}.txt
+ ${resultfile}.txt
+ )
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DUMP-${resultfile}-clean-objects PROPERTIES
+ DEPENDS H5DUMP-${resultfile}
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
+ else ()
+ set_tests_properties (H5DUMP-${resultfile}-clean-objects PROPERTIES
+ DEPENDS H5DUMP-${resultfile}-output-cmp-ddl
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
)
- set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp)
endif ()
endmacro ()
@@ -601,21 +656,37 @@
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5DUMP-output-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.txt
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${resultfile}.txt
+ )
+ set_tests_properties (H5DUMP-output-${resultfile}-clear-objects PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
)
- set_tests_properties (H5DUMP-output-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
add_test (
NAME H5DUMP-output-${resultfile}
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN} ${resultfile}.txt ${targetfile}
)
- set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}-clear-objects)
+ set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES
+ DEPENDS H5DUMP-output-${resultfile}-clear-objects
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
add_test (
NAME H5DUMP-output-cmp-${resultfile}
- COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp
+ COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${resultfile}.txt ${resultfile}.exp
+ )
+ set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES
+ DEPENDS H5DUMP-output-${resultfile}
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
+ add_test (
+ NAME H5DUMP-output-${resultfile}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${resultfile}.txt
+ )
+ set_tests_properties (H5DUMP-output-${resultfile}-clean-objects PROPERTIES
+ DEPENDS H5DUMP-output-cmp-${resultfile}
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
)
- set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile})
endif ()
endmacro ()
@@ -634,6 +705,9 @@
-D "TEST_MASK_ERROR=true"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
endif ()
endmacro ()
@@ -651,6 +725,9 @@
-D "TEST_REFERENCE=${result_check}"
-P "${HDF_RESOURCES_DIR}/grepTest.cmake"
)
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
endif ()
endmacro ()
@@ -669,6 +746,9 @@
-D "TEST_ERRREF=${result_errcheck}"
-P "${HDF_RESOURCES_DIR}/grepTest.cmake"
)
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
endif ()
endmacro ()
@@ -689,6 +769,46 @@
-D "TEST_ENV_VALUE:STRING=${envval}"
-P "${HDF_RESOURCES_DIR}/grepTest.cmake"
)
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
+ endif ()
+ endmacro ()
+
+ macro (ADD_H5_BIN_EXPORT conffile resultcode testfile)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5DUMP-BIN_EXPORT-${conffile}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${conffile}.bin
+ )
+ set_tests_properties (H5DUMP-BIN_EXPORT-${conffile}-clear-objects PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
+ add_test (
+ NAME H5DUMP-BIN_EXPORT-${conffile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
+ -D "TEST_ARGS:STRING=${ARGN};-o;${conffile}.bin;${testfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
+ -D "TEST_OUTPUT=${conffile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${conffile}.ddl"
+ -P "${HDF_RESOURCES_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5DUMP-BIN_EXPORT-${conffile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
+ add_test (
+ NAME H5DUMP-BIN_EXPORT-${conffile}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${conffile}.bin
+ )
+ set_tests_properties (H5DUMP-BIN_EXPORT-${conffile}-clean-objects PROPERTIES
+ DEPENDS H5DUMP-BIN_EXPORT-${conffile}
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
endif ()
endmacro ()
@@ -701,7 +821,9 @@
${resultfile}.bin
${resultfile}.h5
)
- set_tests_properties (H5DUMP-IMPORT-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-IMPORT-${resultfile}-clear-objects PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
add_test (
NAME H5DUMP-IMPORT-${resultfile}
COMMAND "${CMAKE_COMMAND}"
@@ -714,20 +836,37 @@
-D "TEST_REFERENCE=${conffile}.ddl"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
- set_tests_properties (H5DUMP-IMPORT-${resultfile} PROPERTIES DEPENDS "H5DUMP-IMPORT-${resultfile}-clear-objects")
+ set_tests_properties (H5DUMP-IMPORT-${resultfile} PROPERTIES
+ DEPENDS H5DUMP-IMPORT-${resultfile}-clear-objects
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
add_test (NAME H5DUMP-IMPORT-h5import-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_file_ext}> ${resultfile}.bin -c ${conffile}.out -o ${resultfile}.h5)
- set_tests_properties (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-${resultfile})
+ set_tests_properties (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES
+ DEPENDS H5DUMP-IMPORT-${resultfile}
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
add_test (NAME H5DUMP-IMPORT-h5diff-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> ${testfile} ${resultfile}.h5 /integer /integer)
- set_tests_properties (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-h5import-${resultfile})
+ set_tests_properties (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES
+ DEPENDS H5DUMP-IMPORT-h5import-${resultfile}
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
+ add_test (
+ NAME H5DUMP-IMPORT-${resultfile}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${resultfile}.bin
+ ${resultfile}.h5
+ )
+ set_tests_properties (H5DUMP-IMPORT-${resultfile}-clean-objects PROPERTIES
+ DEPENDS H5DUMP-IMPORT-h5diff-${resultfile}
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
endif ()
endmacro ()
macro (ADD_H5_UD_TEST testname resultcode resultfile)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
- NAME H5DUMP_UD-${testname}
+ NAME H5DUMP_UD-${testname}-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
@@ -741,6 +880,9 @@
-D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
+ set_tests_properties (H5DUMP_UD-${testname}-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std"
+ )
endif ()
endmacro ()
@@ -1076,7 +1218,7 @@
ADD_H5_TEST (tvms 0 --enable-error-stack tvms.h5)
# test for binary output
- ADD_H5_TEST (tbin1LE 0 --enable-error-stack -d integer -o tbin1LE.bin -b LE tbinary.h5)
+ ADD_H5_BIN_EXPORT (tbin1LE 0 tbinary.h5 --enable-error-stack -d integer -b LE)
# test for string binary output
ADD_H5_EXPORT_TEST (tstr2bin2 tstr2.h5 0 --enable-error-stack -d /g2/dset2 -b -o)
@@ -1086,14 +1228,14 @@
# ADD_H5_TEST_IMPORT (tbin1 out1D tbinary.h5 0 --enable-error-stack -d integer -b)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_H5_TEST (tbin2 0 --enable-error-stack -b BE -d float -o tbin2.bin tbinary.h5)
+ ADD_H5_BIN_EXPORT (tbin2 0 tbinary.h5 --enable-error-stack -b BE -d float)
endif ()
# the NATIVE test can be validated with h5import/h5diff
# ADD_H5_TEST_IMPORT (tbin3 out3D tbinary.h5 0 --enable-error-stack -d integer -b NATIVE)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_H5_TEST (tbin4 0 --enable-error-stack -d double -b FILE -o tbin4.bin tbinary.h5)
+ ADD_H5_BIN_EXPORT (tbin4 0 tbinary.h5 --enable-error-stack -d double -b FILE)
endif ()
# test for dataset region references
@@ -1146,6 +1288,7 @@
# test to verify HDFFV-10480: out of bounds read in H5O_fill_new[old]_decode
ADD_H5_TEST (tCVE_2018_11206_fill_old 1 tCVE_2018_11206_fill_old.h5)
ADD_H5_TEST (tCVE_2018_11206_fill_new 1 tCVE_2018_11206_fill_new.h5)
+
# test to verify fix for CVE-2021-37501: multiplication overflow in H5O__attr_decode()
# https://github.com/ST4RF4LL/Something_Found/blob/main/HDF5_v1.13.0_h5dump_heap_overflow.assets/poc
ADD_H5_TEST (tCVE-2021-37501_attr_decode 1 tCVE-2021-37501_attr_decode.h5)
diff --git a/tools/test/h5dump/CMakeTestsPBITS.cmake b/tools/test/h5dump/CMakeTestsPBITS.cmake
index 3c188c4..caca4b7 100644
--- a/tools/test/h5dump/CMakeTestsPBITS.cmake
+++ b/tools/test/h5dump/CMakeTestsPBITS.cmake
@@ -123,13 +123,9 @@
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
- set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (last_pbits_test)
- set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_pbits_test})
- endif ()
else ()
add_test (
NAME H5DUMP-${resultfile}
@@ -144,6 +140,9 @@
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
endif ()
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits"
+ )
endmacro ()
##############################################################################
diff --git a/tools/test/h5dump/CMakeTestsVDS.cmake b/tools/test/h5dump/CMakeTestsVDS.cmake
index 31624e6..42f08c9 100644
--- a/tools/test/h5dump/CMakeTestsVDS.cmake
+++ b/tools/test/h5dump/CMakeTestsVDS.cmake
@@ -119,13 +119,9 @@
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
- set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (last_vds_test)
- set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_VDS_test})
- endif ()
else ()
add_test (
NAME H5DUMP-${resultfile}
@@ -140,6 +136,9 @@
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
endif ()
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds"
+ )
endmacro ()
macro (ADD_H5_VDS_PREFIX_TEST resultfile resultcode)
diff --git a/tools/test/h5dump/CMakeTestsXML.cmake b/tools/test/h5dump/CMakeTestsXML.cmake
index a8083fb..833a616 100644
--- a/tools/test/h5dump/CMakeTestsXML.cmake
+++ b/tools/test/h5dump/CMakeTestsXML.cmake
@@ -177,13 +177,9 @@
macro (ADD_XML_H5_TEST resultfile resultcode)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP_XML-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> --xml ${ARGN})
- set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
if (${resultcode})
set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (last_xml_test)
- set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test})
- endif ()
else ()
add_test (
NAME H5DUMP_XML-${resultfile}
@@ -198,6 +194,9 @@
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
endif ()
+ set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml"
+ )
endmacro ()
##############################################################################
diff --git a/tools/test/h5dump/h5dump_plugin.sh.in b/tools/test/h5dump/h5dump_plugin.sh.in
index a552f60..8a98f63 100644
--- a/tools/test/h5dump/h5dump_plugin.sh.in
+++ b/tools/test/h5dump/h5dump_plugin.sh.in
@@ -88,7 +88,7 @@ if [ $? != 0 ]; then
fi
# setup plugin path
-ENVCMD="env HDF5_PLUGIN_PATH=../${PLUGIN_LIBDIR}"
+ENVCMD="env HDF5_PLUGIN_PATH=../${PLUGIN_LIBDIR}:${HDF5_PLUGIN_PATH}"
#
# copy test files and expected output files from source dirs to test dir
diff --git a/tools/test/h5format_convert/CMakeTests.cmake b/tools/test/h5format_convert/CMakeTests.cmake
index 5b8c51f..73cb2ee 100644
--- a/tools/test/h5format_convert/CMakeTests.cmake
+++ b/tools/test/h5format_convert/CMakeTests.cmake
@@ -101,49 +101,58 @@
# If using memchecker add tests without using scripts
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
- NAME H5FC-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/outtmp.h5
+ NAME H5FC-${testname}-${testfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}-tmp.h5
)
- if (last_test)
- set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
if (${testfile})
add_test (
NAME H5FC-${testname}-${testfile}-tmpfile
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/outtmp.h5
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/${testname}-tmp.h5
+ )
+ set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES
+ DEPENDS H5FC-${testname}-${testfile}-clear-objects
)
- set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects")
add_test (
NAME H5FC-${testname}-${testfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
- -D "TEST_ARGS=${ARGN};outtmp.h5"
+ -D "TEST_ARGS=${ARGN};${testname}-tmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
- -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_OUTPUT=${testname}-${testfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}"
-D "TEST_ERRREF=${resultfile}.err"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
- set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES DEPENDS "H5FC-${testname}-${testfile}-tmpfile")
+ set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES
+ DEPENDS H5FC-${testname}-${testfile}-tmpfile
+ )
set (last_test "H5FC-${testname}-${testfile}")
else ()
add_test (
- NAME H5FC-${testname}-NA
+ NAME H5FC-${testname}-${testfile}-NA
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
- -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_OUTPUT=${testname}-${testfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
- set_tests_properties (H5FC-${testname}-NA PROPERTIES DEPENDS "H5FC-${testname}-clear-objects")
- set (last_test "H5FC-${testname}-NA")
+ set_tests_properties (H5FC-${testname}-${testfile}-NA PROPERTIES
+ DEPENDS H5FC-${testname}-${testfile}-tmpfile
+ )
endif ()
+ add_test (
+ NAME H5FC-${testname}-${testfile}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}-tmp.h5
+ )
+ set_tests_properties (H5FC-${testname}-${testfile}-clean-objects PROPERTIES
+ DEPENDS H5FC-${testname}-${testfile}-NA
+ )
endif ()
endmacro ()
@@ -151,31 +160,38 @@
# If using memchecker add tests without using scripts
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
- NAME H5FC-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/outtmp.h5
+ NAME H5FC-${testname}-${testfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}-tmp.h5
)
- if (last_test)
- set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
add_test (
NAME H5FC-${testname}-${testfile}-tmpfile
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/outtmp.h5
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/${testname}-tmp.h5
+ )
+ set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES
+ DEPENDS H5FC-${testname}-${testfile}-clear-object
)
- set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects")
add_test (
NAME H5FC-${testname}-${testfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
- -D "TEST_ARGS=${ARGN};outtmp.h5"
+ -D "TEST_ARGS=${ARGN};${testname}-tmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
- -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_OUTPUT=${testname}-${testfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
- set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES DEPENDS "H5FC-${testname}-${testfile}-tmpfile")
- set (last_test "H5FC-${testname}-${testfile}")
+ set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES
+ DEPENDS H5FC-${testname}-${testfile}-tmpfile
+ )
+ add_test (
+ NAME H5FC-${testname}-${testfile}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}-tmp.h5
+ )
+ set_tests_properties (H5FC-${testname}-${testfile}-clean-objects PROPERTIES
+ DEPENDS H5FC-${testname}-${testfile}
+ )
endif ()
endmacro ()
@@ -183,32 +199,39 @@
# If using memchecker add tests without using scripts
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
- NAME H5FC-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/outtmp.h5
+ NAME H5FC-${testname}-${testfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}-tmp.h5
)
- if (last_test)
- set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
add_test (
NAME H5FC-${testname}-${testfile}-tmpfile
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/outtmp.h5
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/${testname}-tmp.h5
+ )
+ set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES
+ DEPENDS H5FC-${testname}-${testfile}-clear-objects
)
- set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects")
add_test (
NAME H5FC-${testname}-${testfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
- -D "TEST_ARGS=${ARGN};outtmp.h5"
+ -D "TEST_ARGS=${ARGN};${testname}-tmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
- -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_OUTPUT=${testname}-${testfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}"
-D "TEST_ERRREF=${result_errcheck}"
-P "${HDF_RESOURCES_DIR}/grepTest.cmake"
)
- set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES DEPENDS "H5FC-${testname}-${testfile}-tmpfile")
- set (last_test "H5FC-${testname}-${testfile}")
+ set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES
+ DEPENDS H5FC-${testname}-${testfile}-tmpfile
+ )
+ add_test (
+ NAME H5FC-${testname}-${testfile}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}-tmp.h5
+ )
+ set_tests_properties (H5FC-${testname}-${testfile}-clean-objects PROPERTIES
+ DEPENDS H5FC-${testname}-${testfile}
+ )
endif ()
endmacro ()
@@ -217,30 +240,44 @@
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5FC-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/tmp.h5
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ./testfiles/${testname}-tmp.h5
)
- if (last_test)
- set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
+ set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES
+ FIXTURES_SETUP clear_H5FC-${testname}
+ )
+ add_test (
+ NAME H5FC_CHECK_IDX-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ./testfiles/${testname}-tmp.h5
+ )
+ set_tests_properties (H5FC_CHECK_IDX-${testname}-clean-objects PROPERTIES
+ FIXTURES_CLEANUP clear_H5FC-${testname}
+ )
+
add_test (
NAME H5FC-${testname}-tmpfile
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} testfiles/tmp.h5
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/${testname}-tmp.h5
+ )
+ set_tests_properties (H5FC-${testname}-tmpfile PROPERTIES
+ FIXTURES_REQUIRED clear_H5FC-${testname}
)
- set_tests_properties (H5FC-${testname}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects")
add_test (
NAME H5FC-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
- -D "TEST_ARGS=${ARGN};./testfiles/tmp.h5"
+ -D "TEST_ARGS=${ARGN};./testfiles/${testname}-tmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=testfiles/${testname}.out"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_EXPECT=${resultcode}"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
- set_tests_properties (H5FC-${testname} PROPERTIES DEPENDS "H5FC-${testname}-tmpfile")
- set (last_test "H5FC-${testname}")
+ set_tests_properties (H5FC-${testname} PROPERTIES
+ DEPENDS "H5FC-${testname}-tmpfile"
+ FIXTURES_REQUIRED clear_H5FC-${testname}
+ )
endif ()
endmacro ()
@@ -248,47 +285,61 @@
# If using memchecker add tests without using scripts
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
- NAME H5FC_CHECK_IDX-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5fc_chk_idx> ./testfiles/tmp.h5 ${ARGN}
+ NAME H5FC_CHECK_IDX-${dependtest}-${testname}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5fc_chk_idx> ./testfiles/${dependtest}-tmp.h5 ${ARGN}
)
- set_tests_properties (H5FC_CHECK_IDX-${testname} PROPERTIES DEPENDS "H5FC-${dependtest}")
- endif ()
+ set_tests_properties (H5FC_CHECK_IDX-${dependtest}-${testname} PROPERTIES
+ DEPENDS "H5FC-${dependtest}"
+ FIXTURES_REQUIRED clear_H5FC-${dependtest}
+ )
+ endif ()
endmacro ()
macro (ADD_H5_TEST_CHECK_IDX testname resultcode testfile)
# If using memchecker add tests without using scripts
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
- NAME H5FC-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/chktmp.h5
+ NAME H5FC_TEST_CHECK_IDX-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ./testfiles/${testname}-tmp.h5
)
- if (last_test)
- set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
add_test (
- NAME H5FC-${testname}-tmpfile
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} testfiles/chktmp.h5
+ NAME H5FC_TEST_CHECK_IDX-${testname}-tmpfile
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/${testname}-tmp.h5
+ )
+ set_tests_properties (H5FC_TEST_CHECK_IDX-${testname}-tmpfile PROPERTIES
+ DEPENDS "H5FC_TEST_CHECK_IDX-${testname}-clear-objects"
)
- set_tests_properties (H5FC-${testname}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects")
add_test (
- NAME H5FC-${testname}
+ NAME H5FC_TEST_CHECK_IDX-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
- -D "TEST_ARGS=-d;${ARGN};./testfiles/chktmp.h5"
+ -D "TEST_ARGS=-d;${ARGN};./testfiles/${testname}-tmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=testfiles/${testname}.out"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_EXPECT=${resultcode}"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
- set_tests_properties (H5FC-${testname} PROPERTIES DEPENDS "H5FC-${testname}-tmpfile")
+ set_tests_properties (H5FC_TEST_CHECK_IDX-${testname} PROPERTIES
+ DEPENDS "H5FC_TEST_CHECK_IDX-${testname}-tmpfile"
+ )
+ add_test (
+ NAME H5FC_TEST_CHECK_IDX-${testname}-check
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5fc_chk_idx> ./testfiles/${testname}-tmp.h5 ${ARGN}
+ )
+ set_tests_properties (H5FC_TEST_CHECK_IDX-${testname}-check PROPERTIES
+ DEPENDS "H5FC_TEST_CHECK_IDX-${testname}"
+ )
add_test (
- NAME H5FC_CHECK_IDX-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5fc_chk_idx> ./testfiles/chktmp.h5 ${ARGN}
+ NAME H5FC_TEST_CHECK_IDX-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ./testfiles/${testname}-tmp.h5
+ )
+ set_tests_properties (H5FC_TEST_CHECK_IDX-${testname}-clean-objects PROPERTIES
+ DEPENDS H5FC_TEST_CHECK_IDX-${testname}-check
)
- set_tests_properties (H5FC_CHECK_IDX-${testname} PROPERTIES DEPENDS "H5FC-${testname}")
- set (last_test "H5FC_CHECK_IDX-${testname}")
endif ()
endmacro ()
@@ -296,44 +347,55 @@
# If using memchecker skip tests
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
- NAME H5FC-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/dmptmp.h5
+ NAME H5FC_H5DUMP_CHECK-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ./testfiles/${testname}-tmp.h5
)
- if (last_test)
- set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
add_test (
- NAME H5FC-${testname}-tmpfile
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testname}.h5 testfiles/dmptmp.h5
+ NAME H5FC_H5DUMP_CHECK-${testname}-tmpfile
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testname}.h5 ./testfiles/${testname}-tmp.h5
+ )
+ set_tests_properties (H5FC_H5DUMP_CHECK-${testname}-tmpfile PROPERTIES
+ DEPENDS "H5FC_H5DUMP_CHECK-${testname}-clear-objects"
)
- set_tests_properties (H5FC-${testname}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects")
add_test (
- NAME H5FC-${testname}
+ NAME H5FC_H5DUMP_CHECK-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
- -D "TEST_ARGS=${ARGN};./testfiles/dmptmp.h5"
+ -D "TEST_ARGS=${ARGN};./testfiles/${testname}-tmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=testfiles/${testname}.out"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_EXPECT=0"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
- set_tests_properties (H5FC-${testname} PROPERTIES DEPENDS "H5FC-${testname}-tmpfile")
+ set_tests_properties (H5FC_H5DUMP_CHECK-${testname} PROPERTIES
+ DEPENDS "H5FC_H5DUMP_CHECK-${testname}-tmpfile"
+ )
add_test (
- NAME H5FC_CHECK_DUMP-${testname}
+ NAME H5FC_H5DUMP_CHECK-${testname}-dump
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
- -D "TEST_ARGS:STRING=-BH;./testfiles/dmptmp.h5"
+ -D "TEST_ARGS:STRING=-BH;./testfiles/${testname}-tmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=testfiles/${testname}_chk.out"
-D "TEST_EXPECT=0"
-D "TEST_REFERENCE=testfiles/${testname}.ddl"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
- set_tests_properties (H5FC_CHECK_DUMP-${testname} PROPERTIES DEPENDS "H5FC-${testname}")
- set (last_test "H5FC_CHECK_DUMP-${testname}")
+ set_tests_properties (H5FC_H5DUMP_CHECK-${testname}-dump PROPERTIES
+ DEPENDS "H5FC_H5DUMP_CHECK-${testname}"
+ )
+ add_test (
+ NAME H5FC_H5DUMP_CHECK-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ./testfiles/${testname}-tmp.h5
+ )
+ set_tests_properties (H5FC_H5DUMP_CHECK-${testname}-clean-objects PROPERTIES
+ DEPENDS H5FC_H5DUMP_CHECK-${testname}-dump
+ )
endif ()
endmacro ()
@@ -343,22 +405,6 @@
##############################################################################
##############################################################################
- if (HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- add_test (
- NAME H5FC-clearall-objects
- COMMAND ${CMAKE_COMMAND} -E remove
- outtmp.h5
- tmp.h5
- chktmp.h5
- dmptmp.h5
- )
- if (last_test)
- set_tests_properties (H5FC-clearall-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "H5FC-clearall-objects")
- endif ()
-
# h5format_convert --help
# h5format_convert (no options)
# h5format_convert nonexist.h5 (no options, file does not exist)
diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext1_f.ddl b/tools/test/h5format_convert/testfiles/h5fc_ext1_f.ddl
index db00a99..f788913 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_ext1_f.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_ext1_f.ddl
@@ -1,4 +1,4 @@
-HDF5 "./testfiles/dmptmp.h5" {
+HDF5 "./testfiles/h5fc_ext1_f-tmp.h5" {
SUPER_BLOCK {
SUPERBLOCK_VERSION 2
FREELIST_VERSION 0
diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext1_i.ddl b/tools/test/h5format_convert/testfiles/h5fc_ext1_i.ddl
index 4be6d90..6564031 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_ext1_i.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_ext1_i.ddl
@@ -1,4 +1,4 @@
-HDF5 "./testfiles/dmptmp.h5" {
+HDF5 "./testfiles/h5fc_ext1_i-tmp.h5" {
SUPER_BLOCK {
SUPERBLOCK_VERSION 2
FREELIST_VERSION 0
diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext1_s.ddl b/tools/test/h5format_convert/testfiles/h5fc_ext1_s.ddl
index db00a99..746de2b 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_ext1_s.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_ext1_s.ddl
@@ -1,4 +1,4 @@
-HDF5 "./testfiles/dmptmp.h5" {
+HDF5 "./testfiles/h5fc_ext1_s-tmp.h5" {
SUPER_BLOCK {
SUPERBLOCK_VERSION 2
FREELIST_VERSION 0
diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext2_if.ddl b/tools/test/h5format_convert/testfiles/h5fc_ext2_if.ddl
index 4be6d90..57781ec 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_ext2_if.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_ext2_if.ddl
@@ -1,4 +1,4 @@
-HDF5 "./testfiles/dmptmp.h5" {
+HDF5 "./testfiles/h5fc_ext2_if-tmp.h5" {
SUPER_BLOCK {
SUPERBLOCK_VERSION 2
FREELIST_VERSION 0
diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext2_is.ddl b/tools/test/h5format_convert/testfiles/h5fc_ext2_is.ddl
index 4be6d90..8fd061d 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_ext2_is.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_ext2_is.ddl
@@ -1,4 +1,4 @@
-HDF5 "./testfiles/dmptmp.h5" {
+HDF5 "./testfiles/h5fc_ext2_is-tmp.h5" {
SUPER_BLOCK {
SUPERBLOCK_VERSION 2
FREELIST_VERSION 0
diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext2_sf.ddl b/tools/test/h5format_convert/testfiles/h5fc_ext2_sf.ddl
index db00a99..435ed46 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_ext2_sf.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_ext2_sf.ddl
@@ -1,4 +1,4 @@
-HDF5 "./testfiles/dmptmp.h5" {
+HDF5 "./testfiles/h5fc_ext2_sf-tmp.h5" {
SUPER_BLOCK {
SUPERBLOCK_VERSION 2
FREELIST_VERSION 0
diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext3_isf.ddl b/tools/test/h5format_convert/testfiles/h5fc_ext3_isf.ddl
index 4be6d90..57a78d3 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_ext3_isf.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_ext3_isf.ddl
@@ -1,4 +1,4 @@
-HDF5 "./testfiles/dmptmp.h5" {
+HDF5 "./testfiles/h5fc_ext3_isf-tmp.h5" {
SUPER_BLOCK {
SUPERBLOCK_VERSION 2
FREELIST_VERSION 0
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_all.ddl b/tools/test/h5format_convert/testfiles/h5fc_v_all.ddl
index a1af831..c5e55c7 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_v_all.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_v_all.ddl
@@ -1,5 +1,5 @@
Process command line options
-Open the file outtmp.h5
+Open the file h5fc_v_all-tmp.h5
Processing all datasets in the file...
Going to process dataset:/DSET_CONTIGUOUS...
Open the dataset
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_bt1.ddl b/tools/test/h5format_convert/testfiles/h5fc_v_bt1.ddl
index 31de12a..23f775d 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_v_bt1.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_v_bt1.ddl
@@ -1,5 +1,5 @@
Process command line options
-Open the file outtmp.h5
+Open the file h5fc_v_bt1-tmp.h5
Going to process dataset: /GROUP/DSET_BT2...
Open the dataset
Retrieve the dataset's layout
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl b/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl
index 0b7d0ac..066f2d5 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl
@@ -1,5 +1,5 @@
Process command line options
-Open the file outtmp.h5
+Open the file h5fc_v_err-tmp.h5
Processing all datasets in the file...
Going to process dataset:/DSET_ERR...
Open the dataset
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_n_1d.ddl b/tools/test/h5format_convert/testfiles/h5fc_v_n_1d.ddl
index fcdadd8..1c6d7fb 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_v_n_1d.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_v_n_1d.ddl
@@ -1,6 +1,6 @@
Process command line options
It is noop...
-Open the file outtmp.h5
+Open the file h5fc_v_n_1d-tmp.h5
Going to process dataset: /DSET_EA...
Open the dataset
Retrieve the dataset's layout
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_n_all.ddl b/tools/test/h5format_convert/testfiles/h5fc_v_n_all.ddl
index 074ce6f..ad00d92 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_v_n_all.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_v_n_all.ddl
@@ -1,6 +1,6 @@
Process command line options
It is noop...
-Open the file outtmp.h5
+Open the file h5fc_v_n_all-tmp.h5
Processing all datasets in the file...
Going to process dataset:/DSET_CONTIGUOUS...
Open the dataset
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl b/tools/test/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl
index c75699a..e79b11a 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl
@@ -1,6 +1,6 @@
Process command line options
It is noop...
-Open the file outtmp.h5
+Open the file h5fc_v_ndata_bt1-tmp.h5
Going to process dataset: /DSET_NDATA_BT2...
Open the dataset
Retrieve the dataset's layout
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_non_chunked.ddl b/tools/test/h5format_convert/testfiles/h5fc_v_non_chunked.ddl
index 5945389..50575c0 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_v_non_chunked.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_v_non_chunked.ddl
@@ -1,5 +1,5 @@
Process command line options
-Open the file outtmp.h5
+Open the file h5fc_v_non_chunked-tmp.h5
Going to process dataset: /DSET_CONTIGUOUS...
Open the dataset
Retrieve the dataset's layout
diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext1_f.ddl b/tools/test/h5format_convert/testfiles/old_h5fc_ext1_f.ddl
index db00a99..45fa3fb 100644
--- a/tools/test/h5format_convert/testfiles/old_h5fc_ext1_f.ddl
+++ b/tools/test/h5format_convert/testfiles/old_h5fc_ext1_f.ddl
@@ -1,4 +1,4 @@
-HDF5 "./testfiles/dmptmp.h5" {
+HDF5 "./testfiles/old_h5fc_ext1_f-tmp.h5" {
SUPER_BLOCK {
SUPERBLOCK_VERSION 2
FREELIST_VERSION 0
diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext1_i.ddl b/tools/test/h5format_convert/testfiles/old_h5fc_ext1_i.ddl
index d9cc0b7..67a7116 100644
--- a/tools/test/h5format_convert/testfiles/old_h5fc_ext1_i.ddl
+++ b/tools/test/h5format_convert/testfiles/old_h5fc_ext1_i.ddl
@@ -1,4 +1,4 @@
-HDF5 "./testfiles/dmptmp.h5" {
+HDF5 "./testfiles/old_h5fc_ext1_i-tmp.h5" {
SUPER_BLOCK {
SUPERBLOCK_VERSION 1
FREELIST_VERSION 0
diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext1_s.ddl b/tools/test/h5format_convert/testfiles/old_h5fc_ext1_s.ddl
index db00a99..7f67d9f 100644
--- a/tools/test/h5format_convert/testfiles/old_h5fc_ext1_s.ddl
+++ b/tools/test/h5format_convert/testfiles/old_h5fc_ext1_s.ddl
@@ -1,4 +1,4 @@
-HDF5 "./testfiles/dmptmp.h5" {
+HDF5 "./testfiles/old_h5fc_ext1_s-tmp.h5" {
SUPER_BLOCK {
SUPERBLOCK_VERSION 2
FREELIST_VERSION 0
diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext2_if.ddl b/tools/test/h5format_convert/testfiles/old_h5fc_ext2_if.ddl
index 4be6d90..350d3ba 100644
--- a/tools/test/h5format_convert/testfiles/old_h5fc_ext2_if.ddl
+++ b/tools/test/h5format_convert/testfiles/old_h5fc_ext2_if.ddl
@@ -1,4 +1,4 @@
-HDF5 "./testfiles/dmptmp.h5" {
+HDF5 "./testfiles/old_h5fc_ext2_if-tmp.h5" {
SUPER_BLOCK {
SUPERBLOCK_VERSION 2
FREELIST_VERSION 0
diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext2_is.ddl b/tools/test/h5format_convert/testfiles/old_h5fc_ext2_is.ddl
index 4be6d90..6b2b2c3 100644
--- a/tools/test/h5format_convert/testfiles/old_h5fc_ext2_is.ddl
+++ b/tools/test/h5format_convert/testfiles/old_h5fc_ext2_is.ddl
@@ -1,4 +1,4 @@
-HDF5 "./testfiles/dmptmp.h5" {
+HDF5 "./testfiles/old_h5fc_ext2_is-tmp.h5" {
SUPER_BLOCK {
SUPERBLOCK_VERSION 2
FREELIST_VERSION 0
diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl b/tools/test/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl
index db00a99..4a038e3 100644
--- a/tools/test/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl
+++ b/tools/test/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl
@@ -1,4 +1,4 @@
-HDF5 "./testfiles/dmptmp.h5" {
+HDF5 "./testfiles/old_h5fc_ext2_sf-tmp.h5" {
SUPER_BLOCK {
SUPERBLOCK_VERSION 2
FREELIST_VERSION 0
diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl b/tools/test/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl
index 4be6d90..602627f 100644
--- a/tools/test/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl
+++ b/tools/test/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl
@@ -1,4 +1,4 @@
-HDF5 "./testfiles/dmptmp.h5" {
+HDF5 "./testfiles/old_h5fc_ext3_isf-tmp.h5" {
SUPER_BLOCK {
SUPERBLOCK_VERSION 2
FREELIST_VERSION 0
diff --git a/tools/test/h5format_convert/testh5fc.sh.in b/tools/test/h5format_convert/testh5fc.sh.in
index d5fef40..cd2b801 100644
--- a/tools/test/h5format_convert/testh5fc.sh.in
+++ b/tools/test/h5format_convert/testh5fc.sh.in
@@ -66,10 +66,10 @@ TESTDIR=./testfiles
test -d $TESTDIR || mkdir $TESTDIR
# Copy the testfile to a temporary file for testing as h5format_convert is changing the file in place
-TMPOUTFILE=outtmp.h5
+TMPOUTFILE=tmp.h5
TMPFILE=tmp.h5
-TMPCHKFILE=chktmp.h5
-TMPDMPFILE=dmptmp.h5
+TMPCHKFILE=tmp.h5
+TMPDMPFILE=tmp.h5
######################################################################
# test files
@@ -182,10 +182,10 @@ CLEAN_TESTFILES_AND_TESTDIR()
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
$RM $TESTDIR
else
- $RM $TESTDIR/$TMPFILE
+ $RM $TESTDIR/$TMPFILE
$RM $TESTDIR/$TMPOUTFILE
$RM $TESTDIR/$TMPCHKFILE
- $RM $TESTDIR/$TMPDMPFILE
+ $RM $TESTDIR/*-$TMPDMPFILE
fi
}
@@ -224,13 +224,14 @@ TOOLTEST_OUT() {
actual_err="$TESTDIR/`basename $1 .ddl`.out.err"
actual_sav=${actual}-sav
actual_err_sav=${actual_err}-sav
+ testfile="`basename $1 .ddl`-tmp.h5"
# Prepare the test file
- $RM $TESTDIR/$TMPOUTFILE
+ $RM $TESTDIR/$testfile
TFILE=$2
if [ ! -z "$2" ] && [ -e $TESTDIR/$2 ] ; then
- $CP $TESTDIR/$2 $TESTDIR/$TMPOUTFILE
- TFILE=$TMPOUTFILE
+ $CP $TESTDIR/$2 $TESTDIR/$testfile
+ TFILE=$testfile
fi
# Run test.
@@ -261,13 +262,14 @@ TOOLTEST_MASK_OUT() {
actual_err="$TESTDIR/`basename $1 .ddl`.out.err"
actual_sav=${actual}-sav
actual_err_sav=${actual_err}-sav
+ testfile="`basename $1 .ddl`-tmp.h5"
# Prepare the test file
- $RM $TESTDIR/$TMPOUTFILE
+ $RM $TESTDIR/$testfile
TFILE=$2
if [ ! -z "$2" ] && [ -e $TESTDIR/$2 ] ; then
- $CP $TESTDIR/$2 $TESTDIR/$TMPOUTFILE
- TFILE=$TMPOUTFILE
+ $CP $TESTDIR/$2 $TESTDIR/$testfile
+ TFILE=$testfile
fi
# Run test.
@@ -321,13 +323,14 @@ TOOLTEST_ERR() {
actual_err="$TESTDIR/`basename $1 .ddl`.out.err"
actual_sav=${actual}-sav
actual_err_sav=${actual_err}-sav
+ testfile="`basename $1 .ddl`-tmp.h5"
# Prepare the test file
- $RM $TESTDIR/$TMPOUTFILE
+ $RM $TESTDIR/$testfile
TFILE=$2
if [ ! -z "$2" ] && [ -e $TESTDIR/$2 ] ; then
- $CP $TESTDIR/$2 $TESTDIR/$TMPOUTFILE
- TFILE=$TMPOUTFILE
+ $CP $TESTDIR/$2 $TESTDIR/$testfile
+ TFILE=$testfile
fi
# Run test.
@@ -360,9 +363,10 @@ TOOLTEST_ERR() {
# -n
TOOLTEST() {
TESTING $FORMCONV $3 $4 $5 $1
- $RM $TESTDIR/$2
- $CP $TESTDIR/$1 $TESTDIR/$2
- $RUNSERIAL $FORMCONV_BIN $3 $4 $5 $TESTDIR/$2
+ testfile="`basename $1 .h5`-tmp.h5"
+ $RM $TESTDIR/$testfile
+ $CP $TESTDIR/$1 $TESTDIR/$testfile
+ $RUNSERIAL $FORMCONV_BIN $3 $4 $5 $TESTDIR/$testfile
exitcode=$?
if [ $exitcode -ne 0 ]; then
echo "*FAILED*"
@@ -382,7 +386,7 @@ CHECKING() {
# $1 dataset name
IDX_CHECK() {
CHECKING $1
- $RUNSERIAL $CHK_IDX_BIN $TESTDIR/$TMPCHKFILE $1
+ $RUNSERIAL $CHK_IDX_BIN $TESTDIR/$2 $1
ret=$?
if [ $ret -eq 0 ]; then
echo " PASSED"
@@ -414,7 +418,8 @@ H5DUMP_CHECK() {
expect="$TESTDIR/$2"
actual="$TESTDIR/`basename $2 .ddl`.out"
actual_err="$TESTDIR/`basename $2 .ddl`.err"
- $RUNSERIAL $H5DUMP_BIN -BH $TESTDIR/$TMPDMPFILE > $actual 2>$actual_err
+ testfile="`basename $2 .ddl`-tmp.h5"
+ $RUNSERIAL $H5DUMP_BIN -BH $TESTDIR/$testfile > $actual 2>$actual_err
cat $actual_err >> $actual
# Compare output
@@ -497,45 +502,45 @@ TOOLTEST_MASK_OUT h5fc_v_err.ddl h5fc_err_level.h5 -v
# h5format_convert -d /GROUP/DSET_FA h5fc_ext_none.h5
# h5format_convert -d /DSET_NONE h5fc_ext_none.h5
# h5format_convert -d /GROUP/DSET_NDATA_NONE h5fc_ext_none.h5
-TOOLTEST h5fc_ext_none.h5 $TMPCHKFILE -d /DSET_EA
-IDX_CHECK /DSET_EA
+TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /DSET_EA
+IDX_CHECK /DSET_EA h5fc_ext_none-tmp.h5
#
-TOOLTEST h5fc_ext_none.h5 $TMPCHKFILE -d /GROUP/DSET_NDATA_EA
-IDX_CHECK /GROUP/DSET_NDATA_EA
+TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /GROUP/DSET_NDATA_EA
+IDX_CHECK /GROUP/DSET_NDATA_EA h5fc_ext_none-tmp.h5
#
-TOOLTEST h5fc_ext_none.h5 $TMPCHKFILE -d /GROUP/DSET_BT2
-IDX_CHECK /GROUP/DSET_BT2
+TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /GROUP/DSET_BT2
+IDX_CHECK /GROUP/DSET_BT2 h5fc_ext_none-tmp.h5
#
-TOOLTEST h5fc_ext_none.h5 $TMPCHKFILE -d /DSET_NDATA_BT2
-IDX_CHECK /DSET_NDATA_BT2
+TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /DSET_NDATA_BT2
+IDX_CHECK /DSET_NDATA_BT2 h5fc_ext_none-tmp.h5
#
-TOOLTEST h5fc_ext_none.h5 $TMPCHKFILE -d /DSET_FA
-IDX_CHECK /DSET_FA
+TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /DSET_FA
+IDX_CHECK /DSET_FA h5fc_ext_none-tmp.h5
#
-TOOLTEST h5fc_ext_none.h5 $TMPCHKFILE -d /GROUP/DSET_NDATA_FA
-IDX_CHECK /GROUP/DSET_NDATA_FA
+TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /GROUP/DSET_NDATA_FA
+IDX_CHECK /GROUP/DSET_NDATA_FA h5fc_ext_none-tmp.h5
#
-TOOLTEST h5fc_ext_none.h5 $TMPCHKFILE -d /DSET_NONE
-IDX_CHECK /DSET_NONE
+TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /DSET_NONE
+IDX_CHECK /DSET_NONE h5fc_ext_none-tmp.h5
#
-TOOLTEST h5fc_ext_none.h5 $TMPCHKFILE -d /GROUP/DSET_NDATA_NONE
-IDX_CHECK /GROUP/DSET_NDATA_NONE
+TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /GROUP/DSET_NDATA_NONE
+IDX_CHECK /GROUP/DSET_NDATA_NONE h5fc_ext_none-tmp.h5
#
#
#
# No output from tests: just check exit code
# h5format_convert -d /DSET_NDATA_BT2 old_h5fc_ext_none.h5 (v1-btree dataset)
# h5format_convert -d /DSET_CONTIGUOUS h5fc_non_v3.h5 (non-chunked dataset)
-TOOLTEST old_h5fc_ext_none.h5 $TMPFILE -d /DSET_NDATA_BT2
-TOOLTEST h5fc_non_v3.h5 $TMPFILE -d /DSET_CONTIGUOUS
+TOOLTEST old_h5fc_ext_none.h5 old_h5fc_ext_none-tmp.h5 -d /DSET_NDATA_BT2
+TOOLTEST h5fc_non_v3.h5 h5fc_non_v3-tmp.h5 -d /DSET_CONTIGUOUS
#
#
#
# No output from tests: just check exit code
# h5format_convert -d /GROUP/DSET_BT2 -n h5fc_non_v3.h5 (noop, one dataset)
# h5format_convert -n h5fc_non_v3.h5 (noop, all datasets)
-TOOLTEST h5fc_non_v3.h5 $TMPFILE -d /GROUP/DSET_BT2 -n
-TOOLTEST h5fc_non_v3.h5 $TMPFILE -n
+TOOLTEST h5fc_non_v3.h5 h5fc_non_v3-tmp.h5 -d /GROUP/DSET_BT2 -n
+TOOLTEST h5fc_non_v3.h5 h5fc_non_v3-tmp.h5 -n
#
#
#
@@ -543,11 +548,11 @@ TOOLTEST h5fc_non_v3.h5 $TMPFILE -n
# h5format_convert h5fc_non_v3.h5
# 1) convert all datasets
# 2) verify indexing types
-TOOLTEST h5fc_non_v3.h5 $TMPCHKFILE
-IDX_CHECK /DSET_NDATA_EA
-IDX_CHECK /DSET_NDATA_BT2
-IDX_CHECK /GROUP/DSET_BT2
-IDX_CHECK /GROUP/DSET_EA
+TOOLTEST h5fc_non_v3.h5 h5fc_non_v3-tmp.h5
+IDX_CHECK /DSET_NDATA_EA h5fc_non_v3-tmp.h5
+IDX_CHECK /DSET_NDATA_BT2 h5fc_non_v3-tmp.h5
+IDX_CHECK /GROUP/DSET_BT2 h5fc_non_v3-tmp.h5
+IDX_CHECK /GROUP/DSET_EA h5fc_non_v3-tmp.h5
#
#
#
@@ -555,47 +560,47 @@ IDX_CHECK /GROUP/DSET_EA
# h5format_convert h5fc_edge_v3.h5
# 1) convert the chunked dataset (filter, no-filter-edge-chunk)
# 2) verify the indexing type
-TOOLTEST h5fc_edge_v3.h5 $TMPCHKFILE
-IDX_CHECK /DSET_EDGE
+TOOLTEST h5fc_edge_v3.h5 h5fc_edge_v3-tmp.h5
+IDX_CHECK /DSET_EDGE h5fc_edge_v3-tmp.h5
#
#
# The following test files have messages in the superblock extension.
# Verify h5dump output for correctness after conversion
-TOOLTEST h5fc_ext1_i.h5 $TMPDMPFILE
+TOOLTEST h5fc_ext1_i.h5 h5fc_ext1_i-tmp.h5
H5DUMP_CHECK h5fc_ext1_i.h5 h5fc_ext1_i.ddl
-TOOLTEST h5fc_ext1_s.h5 $TMPDMPFILE
+TOOLTEST h5fc_ext1_s.h5 h5fc_ext1_s-tmp.h5
H5DUMP_CHECK h5fc_ext1_s.h5 h5fc_ext1_s.ddl
-TOOLTEST h5fc_ext1_f.h5 $TMPDMPFILE
+TOOLTEST h5fc_ext1_f.h5 h5fc_ext1_f-tmp.h5
H5DUMP_CHECK h5fc_ext1_f.h5 h5fc_ext1_f.ddl
#
-TOOLTEST h5fc_ext2_if.h5 $TMPDMPFILE
+TOOLTEST h5fc_ext2_if.h5 h5fc_ext2_if-tmp.h5
H5DUMP_CHECK h5fc_ext2_if.h5 h5fc_ext2_if.ddl
-TOOLTEST h5fc_ext2_is.h5 $TMPDMPFILE
+TOOLTEST h5fc_ext2_is.h5 h5fc_ext2_is-tmp.h5
H5DUMP_CHECK h5fc_ext2_is.h5 h5fc_ext2_is.ddl
-TOOLTEST h5fc_ext2_sf.h5 $TMPDMPFILE
+TOOLTEST h5fc_ext2_sf.h5 h5fc_ext2_sf-tmp.h5
H5DUMP_CHECK h5fc_ext2_sf.h5 h5fc_ext2_sf.ddl
#
-TOOLTEST h5fc_ext3_isf.h5 $TMPDMPFILE
+TOOLTEST h5fc_ext3_isf.h5 h5fc_ext3_isf-tmp.h5
H5DUMP_CHECK h5fc_ext3_isf.h5 h5fc_ext3_isf.ddl
#
#
#
-TOOLTEST old_h5fc_ext1_i.h5 $TMPDMPFILE
+TOOLTEST old_h5fc_ext1_i.h5 old_h5fc_ext1_i-tmp.h5
H5DUMP_CHECK old_h5fc_ext1_i.h5 old_h5fc_ext1_i.ddl
-TOOLTEST old_h5fc_ext1_s.h5 $TMPDMPFILE
+TOOLTEST old_h5fc_ext1_s.h5 old_h5fc_ext1_s-tmp.h5
H5DUMP_CHECK old_h5fc_ext1_s.h5 old_h5fc_ext1_s.ddl
-TOOLTEST old_h5fc_ext1_f.h5 $TMPDMPFILE
+TOOLTEST old_h5fc_ext1_f.h5 old_h5fc_ext1_f-tmp.h5
H5DUMP_CHECK old_h5fc_ext1_f.h5 old_h5fc_ext1_f.ddl
#
-TOOLTEST old_h5fc_ext2_if.h5 $TMPDMPFILE
+TOOLTEST old_h5fc_ext2_if.h5 old_h5fc_ext2_if-tmp.h5
H5DUMP_CHECK old_h5fc_ext2_if.h5 old_h5fc_ext2_if.ddl
-TOOLTEST old_h5fc_ext2_is.h5 $TMPDMPFILE
+TOOLTEST old_h5fc_ext2_is.h5 old_h5fc_ext2_is-tmp.h5
H5DUMP_CHECK old_h5fc_ext2_is.h5 old_h5fc_ext2_is.ddl
-TOOLTEST old_h5fc_ext2_sf.h5 $TMPDMPFILE
+TOOLTEST old_h5fc_ext2_sf.h5 old_h5fc_ext2_sf-tmp.h5
H5DUMP_CHECK old_h5fc_ext2_sf.h5 old_h5fc_ext2_sf.ddl
#
-TOOLTEST old_h5fc_ext3_isf.h5 $TMPDMPFILE
+TOOLTEST old_h5fc_ext3_isf.h5 old_h5fc_ext3_isf-tmp.h5
H5DUMP_CHECK old_h5fc_ext3_isf.h5 old_h5fc_ext3_isf.ddl
#
# Clean up temporary files/directories
diff --git a/tools/test/h5import/CMakeTests.cmake b/tools/test/h5import/CMakeTests.cmake
index 81ebc4a..7506116 100644
--- a/tools/test/h5import/CMakeTests.cmake
+++ b/tools/test/h5import/CMakeTests.cmake
@@ -97,26 +97,23 @@
##############################################################################
macro (ADD_H5_TEST testname importfile conffile testfile)
- # If using memchecker skip macro based tests
- if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5IMPORT-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_file_ext}> ${importfile} -c ${conffile} -o ${testfile})
- set_tests_properties (H5IMPORT-${testname} PROPERTIES
- FIXTURES_REQUIRED set_h5importtest
- )
- else ()
- add_test (
- NAME H5IMPORT-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${testfile}
- )
- set_tests_properties (H5IMPORT-${testname}-clear-objects PROPERTIES
- FIXTURES_REQUIRED set_h5importtest
- )
-
- add_test (NAME H5IMPORT-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_file_ext}> ${importfile} -c ${conffile} -o ${testfile})
- set_tests_properties (H5IMPORT-${testname} PROPERTIES
- DEPENDS H5IMPORT-${testname}-clear-objects
- )
+ add_test (
+ NAME H5IMPORT-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${testfile}
+ ${testfile}.new
+ )
+ set_tests_properties (H5IMPORT-${testname}-clear-objects PROPERTIES
+ FIXTURES_REQUIRED set_h5importtest
+ )
+ add_test (NAME H5IMPORT-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_file_ext}> ${importfile} -c ${conffile} -o ${testfile})
+ set_tests_properties (H5IMPORT-${testname} PROPERTIES
+ DEPENDS H5IMPORT-${testname}-clear-objects
+ FIXTURES_REQUIRED set_h5importtest
+ )
+ # If using memchecker skip macro based tests
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5IMPORT-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
@@ -125,6 +122,7 @@
-D "TEST_ARGS:STRING=${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testfile}.new"
+ -D "TEST_SAVE=1"
-D "TEST_EXPECT=0"
-D "TEST_FILTER=(^(HDF5)[^\n]*)"
-D "TEST_SKIP_COMPARE=TRUE"
@@ -132,6 +130,7 @@
)
set_tests_properties (H5IMPORT-${testname}-H5DMP PROPERTIES
DEPENDS H5IMPORT-${testname}
+ FIXTURES_REQUIRED set_h5importtest
)
add_test (
NAME H5IMPORT-${testname}-H5DMP_CMP
@@ -148,8 +147,20 @@
)
set_tests_properties (H5IMPORT-${testname}-H5DMP_CMP PROPERTIES
DEPENDS H5IMPORT-${testname}-H5DMP
+ FIXTURES_REQUIRED set_h5importtest
)
endif ()
+
+ add_test (
+ NAME H5IMPORT-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${testfile}
+ ${testfile}.new
+ )
+ set_tests_properties (H5IMPORT-${testname}-clean-objects PROPERTIES
+ DEPENDS H5IMPORT-${testname}-H5DMP_CMP
+ FIXTURES_REQUIRED set_h5importtest
+ )
endmacro ()
macro (ADD_H5_DUMPTEST testname datasetname testfile)
@@ -160,9 +171,11 @@
COMMAND ${CMAKE_COMMAND} -E remove
d${testfile}
d${testfile}.bin
+ d${testfile}.dmp
)
set_tests_properties (H5IMPORT-DUMP-${testname}-clear-objects PROPERTIES
DEPENDS H5IMPORT-${testname}-H5DMP_CMP
+ FIXTURES_REQUIRED set_h5importtest
)
if ("${ARGN}" STREQUAL "BINARY")
@@ -174,6 +187,7 @@
-D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-b;NATIVE;testfiles/${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=d${testfile}.dmp"
+ -D "TEST_SAVE=1"
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
@@ -187,6 +201,7 @@
-D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-y;--width=1;testfiles/${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=d${testfile}.dmp"
+ -D "TEST_SAVE=1"
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
@@ -194,6 +209,7 @@
endif ()
set_tests_properties (H5IMPORT-DUMP-${testname}-H5DMP PROPERTIES
DEPENDS "H5IMPORT-DUMP-${testname}-clear-objects"
+ FIXTURES_REQUIRED set_h5importtest
)
add_test (
@@ -210,6 +226,7 @@
)
set_tests_properties (H5IMPORT-DUMP-${testname} PROPERTIES
DEPENDS "H5IMPORT-DUMP-${testname}-H5DMP"
+ FIXTURES_REQUIRED set_h5importtest
)
add_test (
@@ -222,13 +239,26 @@
-D "TEST_OUTPUT=d${testfile}.dff"
-D "TEST_EXPECT=0"
-D "TEST_FILTER=(^(Warning)[^\n]*)"
- -D "TEST_REFERENCE=testfiles/d${testfile}.txt"
+ -D "TEST_REFERENCE=testfiles/${testfile}.txt"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
set_tests_properties (H5IMPORT-DUMP-${testname}-H5DFF PROPERTIES
DEPENDS "H5IMPORT-DUMP-${testname}"
+ FIXTURES_REQUIRED set_h5importtest
)
endif ()
+
+ add_test (
+ NAME H5IMPORT-DUMP-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ d${testfile}
+ d${testfile}.bin
+ d${testfile}.dmp
+ )
+ set_tests_properties (H5IMPORT-DUMP-${testname}-clean-objects PROPERTIES
+ DEPENDS H5IMPORT-DUMP-${testname}-H5DFF
+ FIXTURES_REQUIRED set_h5importtest
+ )
endmacro ()
macro (ADD_H5_DUMPSUBTEST testname testfile datasetname)
@@ -237,8 +267,9 @@
add_test (
NAME H5IMPORT_SUB-DUMP-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove
- d-${testname}.h5
- ${testname}.bin
+ ds${testname}.h5
+ ds${testname}.bin
+ ds${testname}.dmp
)
set_tests_properties (H5IMPORT_SUB-DUMP-${testname}-clear-objects PROPERTIES
FIXTURES_REQUIRED set_h5importtest
@@ -249,15 +280,17 @@
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
- -D "TEST_ARGS:STRING=-p;-d;${datasetname};${ARGN};-o;${testname}.bin;-b;NATIVE;testfiles/${testfile}"
+ -D "TEST_ARGS:STRING=-p;-d;${datasetname};${ARGN};-o;ds${testname}.bin;-b;NATIVE;testfiles/${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=${testname}.dmp"
+ -D "TEST_OUTPUT=ds${testname}.dmp"
+ -D "TEST_SAVE=1"
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
set_tests_properties (H5IMPORT_SUB-DUMP-${testname}-H5DMP PROPERTIES
DEPENDS "H5IMPORT_SUB-DUMP-${testname}-clear-objects"
+ FIXTURES_REQUIRED set_h5importtest
)
add_test (
@@ -265,32 +298,46 @@
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5import${tgt_file_ext}>"
- -D "TEST_ARGS:STRING=${testname}.bin;-c;${testname}.dmp;-o;d-${testname}.h5"
+ -D "TEST_ARGS:STRING=ds${testname}.bin;-c;ds${testname}.dmp;-o;ds${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=${testname}.imp"
+ -D "TEST_OUTPUT=ds${testname}.imp"
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
set_tests_properties (H5IMPORT_SUB-DUMP-${testname}-H5IMP PROPERTIES
DEPENDS "H5IMPORT_SUB-DUMP-${testname}-H5DMP"
+ FIXTURES_REQUIRED set_h5importtest
)
add_test (
NAME H5IMPORT_SUB-DUMP-${testname}-CMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
- -D "TEST_ARGS:STRING=-p;d-${testname}.h5"
+ -D "TEST_ARGS:STRING=-p;ds${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=d-${testname}.dmp"
+ -D "TEST_OUTPUT=ds${testname}.dmp"
-D "TEST_EXPECT=0"
-D "TEST_REFERENCE=testfiles/${testname}.ddl"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
set_tests_properties (H5IMPORT_SUB-DUMP-${testname}-CMP PROPERTIES
- DEPENDS "H5IMPORT_SUB-DUMP-${testname}-H5IMP"
+ DEPENDS "H5IMPORT_SUB-DUMP-${testname}-H5IMP"
+ FIXTURES_REQUIRED set_h5importtest
)
endif ()
+
+ add_test (
+ NAME H5IMPORT_SUB-DUMP-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ds${testname}.h5
+ ds${testname}.bin
+ ds${testname}.dmp
+ )
+ set_tests_properties (H5IMPORT_SUB-DUMP-${testname}-clean-objects PROPERTIES
+ DEPENDS "H5IMPORT_SUB-DUMP-${testname}-CMP"
+ FIXTURES_REQUIRED set_h5importtest
+ )
endmacro ()
macro (ADD_H5_SKIP_DUMPTEST testname datasetname testfile)
@@ -368,23 +415,55 @@
set (last_test "H5IMPORT-clear-objects")
endif ()
- add_test (
- NAME H5IMPORT-h5importtest-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove
+ set (H5IMPORTTEST_CLEANFILES
binfp64.bin
binfp64.conf
+ binfp64.h5
+ binfp64.h5.new
binin8.bin
binin8.conf
+ binin8.h5
+ binin8.h5.new
binin8w.bin
binin8w.conf
+ binin8w.h5
+ binin8w.h5.new
binin16.bin
binin16.conf
+ binin16.h5
+ binin16.h5.new
binin32.bin
binin32.conf
+ binin32.h5
+ binin32.h5.new
binuin16.bin
binuin16.conf
+ binuin16.h5
+ binuin16.h5.new
binuin32.bin
binuin32.conf
+ binuin32.h5
+ binuin32.h5.new
+ txtfp32.h5
+ txtfp32.h5.new
+ txtfp64.h5
+ txtfp64.h5.new
+ txtin8.h5
+ txtin8.h5.new
+ txtin8w.h5
+ txtin8w.h5.new
+ txtin16.h5
+ txtin16.h5.new
+ txtin32.h5
+ txtin32.h5.new
+ txtuin16.h5
+ txtuin16.h5.new
+ txtuin32.h5
+ txtuin32.h5.new
+ )
+ add_test (
+ NAME H5IMPORT-h5importtest-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${H5IMPORTTEST_CLEANFILES}
)
add_test (NAME H5IMPORT-h5importtest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5importtest>)
@@ -392,6 +471,13 @@
FIXTURES_SETUP set_h5importtest
DEPENDS H5IMPORT-h5importtest-clear-objects
)
+ add_test (
+ NAME H5IMPORT-h5importtest-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${H5IMPORTTEST_CLEANFILES}
+ )
+ set_tests_properties (H5IMPORT-h5importtest-clean-objects PROPERTIES
+ FIXTURES_CLEANUP set_h5importtest
+ )
# ----- TESTING "ASCII I32 rank 3 - Output BE " ;
ADD_H5_TEST (ASCII_I32 testfiles/txtin32.txt testfiles/txtin32.conf txtin32.h5)
diff --git a/tools/test/h5import/h5importtestutil.sh.in b/tools/test/h5import/h5importtestutil.sh.in
index 59ae34c..ba91ee5 100644
--- a/tools/test/h5import/h5importtestutil.sh.in
+++ b/tools/test/h5import/h5importtestutil.sh.in
@@ -267,9 +267,9 @@ fi
TOOLTEST5()
{
err=0
-$RUNSERIAL $DUMPER_BIN -p -d $3 $4 -o d-$1.bin -b NATIVE tmp_testfiles/$2 > d-$1.dmp
-$RUNSERIAL $H5IMPORT_BIN d-$1.bin -c d-$1.dmp -o d-$1.h5 > d-$1.imp
-$RUNSERIAL $DUMPER_BIN -p d-$1.h5 > log2
+$RUNSERIAL $DUMPER_BIN -p -d $3 $4 -o ds$1.bin -b NATIVE tmp_testfiles/$2 > ds$1.dmp
+$RUNSERIAL $H5IMPORT_BIN ds$1.bin -c ds$1.dmp -o ds$1.h5 > ds$1.imp
+$RUNSERIAL $DUMPER_BIN -p ds$1.h5 > log2
$CP -f $SRC_H5IMPORT_TESTFILES/$1.ddl log1
cmp -s log1 log2 || err=1
diff --git a/tools/test/h5import/testfiles/tall_fp32.ddl b/tools/test/h5import/testfiles/tall_fp32.ddl
index 2a0dc1b..53f24bf 100644
--- a/tools/test/h5import/testfiles/tall_fp32.ddl
+++ b/tools/test/h5import/testfiles/tall_fp32.ddl
@@ -1,4 +1,4 @@
-HDF5 "d-tall_fp32.h5" {
+HDF5 "dstall_fp32.h5" {
GROUP "/" {
GROUP "g2" {
DATASET "dset2.2" {
diff --git a/tools/test/h5import/testfiles/tall_i32.ddl b/tools/test/h5import/testfiles/tall_i32.ddl
index d9280bc..b05dd53 100644
--- a/tools/test/h5import/testfiles/tall_i32.ddl
+++ b/tools/test/h5import/testfiles/tall_i32.ddl
@@ -1,4 +1,4 @@
-HDF5 "d-tall_i32.h5" {
+HDF5 "dstall_i32.h5" {
GROUP "/" {
GROUP "g1" {
GROUP "g1.1" {
diff --git a/tools/test/h5import/testfiles/tintsattrs_u32.ddl b/tools/test/h5import/testfiles/tintsattrs_u32.ddl
index cf8889c..a53217a 100644
--- a/tools/test/h5import/testfiles/tintsattrs_u32.ddl
+++ b/tools/test/h5import/testfiles/tintsattrs_u32.ddl
@@ -1,4 +1,4 @@
-HDF5 "d-tintsattrs_u32.h5" {
+HDF5 "dstintsattrs_u32.h5" {
GROUP "/" {
DATASET "DU32BITS" {
DATATYPE H5T_STD_U32LE
diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake
index 34f8e6f..15f18b5 100644
--- a/tools/test/h5ls/CMakeTests.cmake
+++ b/tools/test/h5ls/CMakeTests.cmake
@@ -138,7 +138,9 @@
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_file_ext}> ${ARGN})
- set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ set_tests_properties (H5LS-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ )
if ("${resultcode}" STREQUAL "1")
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
@@ -157,6 +159,9 @@
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
endif ()
+ set_tests_properties (H5LS-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ )
endmacro ()
macro (ADD_H5_ERR_TEST resultfile resultcode)
@@ -182,12 +187,15 @@
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
endif ()
+ set_tests_properties (H5LS-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ )
endmacro ()
macro (ADD_H5_UD_TEST testname resultcode resultfile)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
- NAME H5LS_UD-${testname}
+ NAME H5LS_UD-${testname}-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_file_ext}>"
@@ -201,6 +209,9 @@
-D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
+ set_tests_properties (H5LS_UD-${testname}-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ )
endif ()
endmacro ()
diff --git a/tools/test/h5ls/h5ls_plugin.sh.in b/tools/test/h5ls/h5ls_plugin.sh.in
index 0077b07..83043cc 100644
--- a/tools/test/h5ls/h5ls_plugin.sh.in
+++ b/tools/test/h5ls/h5ls_plugin.sh.in
@@ -88,7 +88,7 @@ if [ $? != 0 ]; then
fi
# setup plugin path
-ENVCMD="env HDF5_PLUGIN_PATH=../${PLUGIN_LIBDIR}"
+ENVCMD="env HDF5_PLUGIN_PATH=../${PLUGIN_LIBDIR}:${HDF5_PLUGIN_PATH}"
#
# copy test files and expected output files from source dirs to test dir
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index a920c19..a323dfa 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -216,9 +216,6 @@
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5REPACK-h5repack-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN})
- set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES
- WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
- )
else ()
add_test (
NAME H5REPACK-h5repack-${testname}
@@ -234,7 +231,7 @@
)
endif ()
set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES
- FIXTURES_REQUIRED clear_h5repack
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
)
endmacro ()
@@ -251,9 +248,6 @@
NAME H5REPACK_OLD-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile}
)
- set_tests_properties (H5REPACK_OLD-${testname}-clear-objects PROPERTIES
- FIXTURES_REQUIRED clear_h5repack
- )
add_test (
NAME H5REPACK_OLD-${testname}
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
@@ -268,6 +262,13 @@
set_tests_properties (H5REPACK_OLD-${testname}_DFF PROPERTIES
DEPENDS H5REPACK_OLD-${testname}
)
+ add_test (
+ NAME H5REPACK_OLD-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile}
+ )
+ set_tests_properties (H5REPACK_OLD-${testname}-clean-objects PROPERTIES
+ DEPENDS H5REPACK_OLD-${testname}_DFF
+ )
endif ()
endif ()
endmacro ()
@@ -286,9 +287,6 @@
NAME H5REPACK-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile}
)
- set_tests_properties (H5REPACK-${testname}-clear-objects PROPERTIES
- FIXTURES_REQUIRED clear_h5repack
- )
add_test (
NAME H5REPACK-${testname}
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
@@ -303,6 +301,13 @@
set_tests_properties (H5REPACK-${testname}_DFF PROPERTIES
DEPENDS H5REPACK-${testname}
)
+ add_test (
+ NAME H5REPACK-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile}
+ )
+ set_tests_properties (H5REPACK-${testname}-clean-objects PROPERTIES
+ DEPENDS H5REPACK-${testname}_DFF
+ )
endif ()
endmacro ()
@@ -316,20 +321,20 @@
set_property(TEST H5REPACK_CMP-${testname} PROPERTY DISABLED)
endif ()
else ()
+ add_test (
+ NAME H5REPACK_CMP-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile}
+ )
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK_CMP-${testname}
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
)
- else ()
- add_test (
- NAME H5REPACK_CMP-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile}
- )
- set_tests_properties (H5REPACK_CMP-${testname}-clear-objects PROPERTIES
- FIXTURES_REQUIRED clear_h5repack
+ set_tests_properties (H5REPACK_CMP-${testname} PROPERTIES
+ DEPENDS H5REPACK_CMP-${testname}-clear-objects
)
+ else ()
add_test (
NAME H5REPACK_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
@@ -347,6 +352,13 @@
DEPENDS H5REPACK_CMP-${testname}-clear-objects
)
endif ()
+ add_test (
+ NAME H5REPACK_CMP-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile}
+ )
+ set_tests_properties (H5REPACK_CMP-${testname}-clean-objects PROPERTIES
+ DEPENDS H5REPACK_CMP-${testname}
+ )
endif ()
endmacro ()
@@ -360,24 +372,18 @@
set_property(TEST H5REPACK_MASK-${testname} PROPERTY DISABLED)
endif ()
else ()
+ add_test (
+ NAME H5REPACK_MASK-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile}
+ )
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK_MASK-${testname}
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
)
- set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES
- FIXTURES_REQUIRED clear_h5repack
- )
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
- NAME H5REPACK_MASK-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile}
- )
- set_tests_properties (H5REPACK_MASK-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}
- FIXTURES_REQUIRED clear_h5repack
- )
- add_test (
NAME H5REPACK_MASK-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
@@ -391,8 +397,17 @@
-D "TEST_ERRREF=${result_errcheck}"
-P "${HDF_RESOURCES_DIR}/grepTest.cmake"
)
- set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES DEPENDS H5REPACK_MASK-${testname}-clear-objects)
endif ()
+ set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES
+ DEPENDS H5REPACK_MASK-${testname}-clear-objects
+ )
+ add_test (
+ NAME H5REPACK_MASK-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile}
+ )
+ set_tests_properties (H5REPACK_MASK-${testname}-clean-objects PROPERTIES
+ DEPENDS H5REPACK_MASK-${testname}
+ )
endif ()
endmacro ()
@@ -410,6 +425,62 @@
NAME H5REPACK_DMP-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile}
)
+ add_test (
+ NAME H5REPACK_DMP-${testname}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
+ )
+ set_tests_properties (H5REPACK_DMP-${testname} PROPERTIES
+ DEPENDS H5REPACK_DMP-${testname}-clear-objects
+ )
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5REPACK_DMP-h5dump-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
+ -D "TEST_ARGS:STRING=-q;creation_order;-pH;out-${testname}.${resultfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${resultfile}-${testname}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${testname}.${resultfile}.ddl"
+ -P "${HDF_RESOURCES_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5REPACK_DMP-h5dump-${testname} PROPERTIES
+ DEPENDS H5REPACK_DMP-${testname}
+ )
+ add_test (
+ NAME H5REPACK_DMP-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile}
+ )
+ set_tests_properties (H5REPACK_DMP-${testname}-clean-objects PROPERTIES
+ DEPENDS H5REPACK_DMP-h5dump-${testname}
+ )
+ else ()
+ add_test (
+ NAME H5REPACK_DMP-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile}
+ )
+ set_tests_properties (H5REPACK_DMP-${testname}-clean-objects PROPERTIES
+ DEPENDS H5REPACK_DMP-${testname}
+ )
+ endif ()
+ endif ()
+ endmacro ()
+
+ macro (ADD_H5_DMP_NO_OPT_TEST testname testtype resultcode resultfile)
+ if ("${testtype}" STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5REPACK_DMP-${testname}
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}"
+ )
+ set_property(TEST H5REPACK_DMP-${testname} PROPERTY DISABLED)
+ endif ()
+ else ()
+ add_test (
+ NAME H5REPACK_DMP-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile}
+ )
set_tests_properties (H5REPACK_DMP-${testname}-clear-objects PROPERTIES
FIXTURES_REQUIRED clear_h5repack
)
@@ -426,7 +497,7 @@
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
- -D "TEST_ARGS:STRING=-q;creation_order;-pH;out-${testname}.${resultfile}"
+ -D "TEST_ARGS:STRING=out-${testname}.${resultfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}-${testname}.out"
-D "TEST_EXPECT=${resultcode}"
@@ -454,9 +525,6 @@
NAME H5REPACK_DIFF-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile}
)
- set_tests_properties (H5REPACK_DIFF-${testname}-clear-objects PROPERTIES
- FIXTURES_REQUIRED clear_h5repack
- )
add_test (
NAME H5REPACK_DIFF-${testname}
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
@@ -479,6 +547,13 @@
set_tests_properties (H5REPACK_DIFF-${testname}_DFF PROPERTIES
DEPENDS H5REPACK_DIFF-${testname}
)
+ add_test (
+ NAME H5REPACK_DIFF-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile}
+ )
+ set_tests_properties (H5REPACK_DIFF-${testname}-clean-objects PROPERTIES
+ DEPENDS H5REPACK_DIFF-${testname}_DFF
+ )
endif ()
endmacro ()
@@ -496,9 +571,6 @@
NAME H5REPACK_STAT-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${statarg}.${resultfile}
)
- set_tests_properties (H5REPACK_STAT-${testname}-clear-objects PROPERTIES
- FIXTURES_REQUIRED clear_h5repack
- )
add_test (
NAME H5REPACK_STAT-${testname}
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${statarg}.${resultfile}
@@ -520,7 +592,22 @@
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
set_tests_properties (H5REPACK_STAT-h5stat-${testname} PROPERTIES
- DEPENDS "H5REPACK_STAT-${testname}"
+ DEPENDS H5REPACK_STAT-${testname}
+ )
+ add_test (
+ NAME H5REPACK_STAT-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${statarg}.${resultfile}
+ )
+ set_tests_properties (H5REPACK_STAT-${testname}-clean-objects PROPERTIES
+ DEPENDS H5REPACK_STAT-h5stat-${testname}
+ )
+ else ()
+ add_test (
+ NAME H5REPACK_STAT-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${statarg}.${resultfile}
+ )
+ set_tests_properties (H5REPACK_STAT-${testname}-clean-objects PROPERTIES
+ DEPENDS H5REPACK_STAT-${testname}
)
endif ()
endif ()
@@ -541,9 +628,6 @@
NAME H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile}
)
- set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects PROPERTIES
- FIXTURES_REQUIRED clear_h5repack
- )
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
@@ -602,6 +686,13 @@
DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF
)
endif ()
+ add_test (
+ NAME H5REPACK_VERIFY_LAYOUT-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile}
+ )
+ set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}-clean-objects PROPERTIES
+ DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DMP
+ )
endif ()
endif ()
endmacro ()
@@ -622,9 +713,6 @@
NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile}
)
- set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clear-objects PROPERTIES
- FIXTURES_REQUIRED clear_h5repack
- )
add_test (
NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
@@ -649,6 +737,13 @@
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
DEPENDS H5REPACK_VERIFY_LAYOUT_VDS-${testname}
)
+ add_test (
+ NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile}
+ )
+ set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clean-objects PROPERTIES
+ DEPENDS H5REPACK_VERIFY_LAYOUT_VDS-${testname}_DMP
+ )
endif ()
endif ()
endmacro ()
@@ -660,9 +755,6 @@
NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile}
)
- set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects PROPERTIES
- FIXTURES_REQUIRED clear_h5repack
- )
add_test (
NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
@@ -686,6 +778,13 @@
set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}_DMP PROPERTIES
DEPENDS H5REPACK_VERIFY_SUPERBLOCK-${testname}
)
+ add_test (
+ NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile}
+ )
+ set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}-clean-objects PROPERTIES
+ DEPENDS H5REPACK_VERIFY_SUPERBLOCK-${testname}_DMP
+ )
endif ()
endmacro ()
@@ -694,9 +793,6 @@
NAME ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile}
)
- set_tests_properties (ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects PROPERTIES
- FIXTURES_REQUIRED clear_h5repack
- )
add_test (
NAME ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
@@ -705,6 +801,13 @@
DEPENDS ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects
WILL_FAIL "true"
)
+ add_test (
+ NAME ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile}
+ )
+ set_tests_properties (ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clean-objects PROPERTIES
+ DEPENDS ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}
+ )
endmacro ()
macro (ADD_H5_TEST_META testname testfile)
@@ -713,14 +816,7 @@
NAME H5REPACK_META-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove
testfiles/out-${testname}_N.${testname}.h5
- testfiles/out-${testname}_N.${testname}.out
- testfiles/out-${testname}_N.${testname}.out.err
testfiles/out-${testname}_M.${testname}.h5
- testfiles/out-${testname}_M.${testname}.out
- testfiles/out-${testname}_M.${testname}.out.err
- )
- set_tests_properties (H5REPACK_META-${testname}-clear-objects PROPERTIES
- FIXTURES_REQUIRED clear_h5repack
)
add_test (
NAME H5REPACK_META-${testname}_N
@@ -769,19 +865,23 @@
add_test (NAME H5REPACK_META-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
- -D "TEST_ONEFILE=out-${testname}_N.${testname}.out"
+ -D "TEST_ONEFILE=out-${testname}_N.${testname}.h5"
-D "TEST_TWOFILE=out-${testname}_M.${testname}.h5"
-D "TEST_FUNCTION=LTEQ"
-P "${HDF_RESOURCES_DIR}/fileCompareTest.cmake"
)
- if (CMAKE_VERSION VERSION_LESS "3.14.0")
- set_tests_properties (H5REPACK_META-${testname} PROPERTIES
- DISABLED "true"
- )
- endif ()
set_tests_properties (H5REPACK_META-${testname} PROPERTIES
DEPENDS H5REPACK_META-${testname}_M_DFF
)
+ add_test (
+ NAME H5REPACK_META-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ testfiles/out-${testname}_N.${testname}.h5
+ testfiles/out-${testname}_M.${testname}.h5
+ )
+ set_tests_properties (H5REPACK_META-${testname}-clean-objects PROPERTIES
+ DEPENDS H5REPACK_META-${testname}
+ )
endmacro ()
macro (ADD_H5_UD_TEST testname resultcode resultfile)
@@ -791,9 +891,6 @@
NAME H5REPACK_UD-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile}
)
- set_tests_properties (H5REPACK_UD-${testname}-clear-objects PROPERTIES
- FIXTURES_REQUIRED clear_h5repack
- )
add_test (
NAME H5REPACK_UD-${testname}
COMMAND "${CMAKE_COMMAND}"
@@ -829,7 +926,14 @@
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
set_tests_properties (H5REPACK_UD-${testname}-h5dump PROPERTIES
- DEPENDS "H5REPACK_UD-${testname}"
+ DEPENDS H5REPACK_UD-${testname}
+ )
+ add_test (
+ NAME H5REPACK_UD-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile}
+ )
+ set_tests_properties (H5REPACK_UD-${testname}-clean-objects PROPERTIES
+ DEPENDS H5REPACK_UD-${testname}-h5dump
)
endif ()
endmacro ()
@@ -853,7 +957,6 @@
)
set_tests_properties (H5REPACK_EXTERNAL-${testname}-clear-objects PROPERTIES
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
- FIXTURES_REQUIRED clear_h5repack
)
# make sure external data file 0 is available
add_test (
@@ -928,6 +1031,14 @@
DEPENDS H5REPACK_EXTERNAL-${testname}_DFF4
WILL_FAIL "true"
)
+ add_test (
+ NAME H5REPACK_EXTERNAL-${testname}-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove h5repack_${testfile}_rp.h5
+ )
+ set_tests_properties (H5REPACK_EXTERNAL-${testname}-clean-objects PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ DEPENDS H5REPACK_EXTERNAL-${testname}_DFF_FAIL
+ )
endif ()
endif ()
endmacro ()
@@ -970,123 +1081,6 @@
set (FILEV4 4_vds.h5)
set (FILEV5 5_vds.h5)
- if (HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- set (LIST_TO_CLEAR
- out-family.tfamily%05d.h5
- out-HDFFV-7840.h5diff_attr1.h5
- out-attr.h5repack_attr.h5
- out-native_attr.h5repack_attr.h5
- out-HDFFV-5932.h5repack_attr_refs.h5
- out-deflate_copy.h5repack_deflate.h5
- out-deflate_remove.h5repack_deflate.h5
- out-early.h5repack_early.h5
- out-fill.h5repack_fill.h5
- out-native_fill.h5repack_fill.h5
- out-gzip_verbose_filters.h5repack_filters.h5
- out-fletcher_copy.h5repack_fletcher.h5
- out-fletcher_remove.h5repack_fletcher.h5
- out-hlink.h5repack_hlink.h5
- out-chunk_18x13.h5repack_layout.h5
- out-chunk_20x10.h5repack_layout.h5
- out-chunk_compa.h5repack_layout.h5
- out-chunk_conti.h5repack_layout.h5
- out-compa.h5repack_layout.h5
- out-conti.h5repack_layout.h5
- out-deflate_file.h5repack_layout.h5
- out-deflate_limit.h5repack_layout.h5
- out-dset2_chunk_20x10.h5repack_layout.h5
- out-dset2_compa.h5repack_layout.h5
- out-dset2_conti.h5repack_layout.h5
- out-dset_compa_chunk.h5repack_layout.h5
- out-dset_compa_compa.h5repack_layout.h5
- out-dset_compa_conti.h5repack_layout.h5
- out-dset_conti_chunk.h5repack_layout.h5
- out-dset_conti_compa.h5repack_layout.h5
- out-dset_conti_conti.h5repack_layout.h5
- out-fletcher_all.h5repack_layout.h5
- out-fletcher_individual.h5repack_layout.h5
- out-global_filters.h5repack_layout.h5
- out-gzip_all.h5repack_layout.h5
- out-gzip_individual.h5repack_layout.h5
- out-layout.h5repack_layout.h5
- out-layout_long_switches.h5repack_layout.h5
- out-layout_short_switches.h5repack_layout.h5
- out-old_style_layout_short_switches.h5repack_layout.h5
- out-plugin_test.h5repack_layout.h5
- out-shuffle_all.h5repack_layout.h5
- out-shuffle_individual.h5repack_layout.h5
- out-upgrade_layout.h5repack_layouto.h5
- out-contig_small_compa.h5repack_layout2.h5
- out-contig_small_fixed_compa.h5repack_layout2.h5
- out-ckdim_biger.h5repack_layout3.h5
- out-ckdim_smaller.h5repack_layout3.h5
- out-chunk2chunk.h5repack_layout3.h5
- out-chunk2compa.h5repack_layout3.h5
- out-chunk2conti.h5repack_layout3.h5
- out-error1.h5repack_layout3.h5
- out-error2.h5repack_layout3.h5
- out-error3.h5repack_layout3.h5
- out-error4.h5repack_layout3.h5
- out-committed_dt.h5repack_named_dtypes.h5
- out-nbit_add.h5repack_nbit.h5
- out-nbit_copy.h5repack_nbit.h5
- out-nbit_remove.h5repack_nbit.h5
- out-add_alignment.h5repack_objs.h5
- out-add_userblock.h5repack_objs.h5
- out-objs.h5repack_objs.h5
- out-gt_mallocsize.h5repack_objs.h5
- out-bug1814.h5repack_refs.h5
- out-shuffle_copy.h5repack_shuffle.h5
- out-shuffle_remove.h5repack_shuffle.h5
- out-scale_add.h5repack_soffset.h5
- out-scale_copy.h5repack_soffset.h5
- out-scale_remove.h5repack_soffset.h5
- out-meta_short_M.meta_short.h5
- out-meta_short_N.meta_short.h5
- out-meta_long_M.meta_long.h5
- out-meta_long_N.meta_long.h5
- out-vds_compa.4_vds.h5
- out-vds_conti.4_vds.h5
- out-vds_chunk2x5x8.3_1_vds.h5
- out-vds_chunk3x6x9.2_vds.h5
- out-vds_dset_chunk20x10x5.1_vds.h5
- )
-
- set (LIST_TO_CLEAR ${LIST_TO_CLEAR} ${LIST_OTHER_TEST_FILES})
-
- foreach (h5_file ${LIST_HDF5_TEST_FILES})
- get_filename_component(fname "${h5_file}" NAME)
- set (LIST_TO_CLEAR ${LIST_TO_CLEAR}
- ${h5_file}.h5
- )
- endforeach ()
-
- foreach (h5_file ${LIST_TST_TEST_FILES})
- get_filename_component(fname "${h5_file}" NAME)
- set (LIST_TO_CLEAR ${LIST_TO_CLEAR}
- ${h5_file}.tst.out
- ${h5_file}.tst.out.err
- )
- endforeach ()
-
- foreach (h5_file ${LIST_DDL_TEST_FILES})
- get_filename_component(fname "${h5_file}" NAME)
- set (LIST_TO_CLEAR ${LIST_TO_CLEAR}
- ${h5_file}.ddl.out
- ${h5_file}.ddl.out.err
- )
- endforeach ()
- add_test (
- NAME H5REPACK-clearall-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${LIST_TO_CLEAR}
- )
- set_tests_properties (H5REPACK-clearall-objects PROPERTIES
- FIXTURES_SETUP clear_h5repack
- WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
- )
- endif ()
-
ADD_HELP_TEST(help 0 -h)
add_test (NAME H5REPACK-testh5repack_detect_szip COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:testh5repack_detect_szip>)
@@ -1102,7 +1096,7 @@
set (passRegex "no")
set_tests_properties (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no")
endif ()
- set_tests_properties (H5REPACK-testh5repack_detect_szip PROPERTIES DEPENDS H5REPACK-clearall-objects)
+ set_tests_properties (H5REPACK-testh5repack_detect_szip PROPERTIES DEPENDS H5REPACK-h5repack-${testname})
set (last_test "H5REPACK-testh5repack_detect_szip")
# add_test (NAME H5REPACK-h5repacktest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repacktest>)
diff --git a/tools/test/h5repack/CMakeVFDTests.cmake b/tools/test/h5repack/CMakeVFDTests.cmake
index f8ac10b..335ac28 100644
--- a/tools/test/h5repack/CMakeVFDTests.cmake
+++ b/tools/test/h5repack/CMakeVFDTests.cmake
@@ -22,59 +22,73 @@ H5_CREATE_VFD_DIR()
### T H E T E S T S M A C R O S ###
##############################################################################
##############################################################################
-
+set (H5REPACK_CLEANFILES
+ bounds_latest_latest.h5
+ h5repack_attr.h5
+ h5repack_attr_refs.h5
+ h5repack_deflate.h5
+ h5repack_early.h5
+ h5repack_ext.h5
+ h5repack_fill.h5
+ h5repack_filters.h5
+ h5repack_fletcher.h5
+ h5repack_hlink.h5
+ h5repack_layout.h5
+ h5repack_layouto.h5
+ h5repack_layout2.h5
+ h5repack_layout3.h5
+ h5repack_layout.UD.h5
+ h5repack_named_dtypes.h5
+ h5repack_nested_8bit_enum.h5
+ h5repack_nested_8bit_enum_deflated.h5
+ h5repack_nbit.h5
+ h5repack_objs.h5
+ h5repack_refs.h5
+ h5repack_shuffle.h5
+ h5repack_soffset.h5
+ h5repack_szip.h5
+ # fsm
+ h5repack_aggr.h5
+ h5repack_fsm_aggr_nopersist.h5
+ h5repack_fsm_aggr_persist.h5
+ h5repack_none.h5
+ h5repack_paged_nopersist.h5
+ h5repack_paged_persist.h5
+)
macro (ADD_VFD_TEST vfdname resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK-${vfdname}-h5repacktest-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove
- bounds_latest_latest.h5
- h5repack_attr.h5
- h5repack_attr_refs.h5
- h5repack_deflate.h5
- h5repack_early.h5
- h5repack_ext.h5
- h5repack_fill.h5
- h5repack_filters.h5
- h5repack_fletcher.h5
- h5repack_hlink.h5
- h5repack_layout.h5
- h5repack_layouto.h5
- h5repack_layout2.h5
- h5repack_layout3.h5
- h5repack_layout.UD.h5
- h5repack_named_dtypes.h5
- h5repack_nested_8bit_enum.h5
- h5repack_nested_8bit_enum_deflated.h5
- h5repack_nbit.h5
- h5repack_objs.h5
- h5repack_refs.h5
- h5repack_shuffle.h5
- h5repack_soffset.h5
- h5repack_szip.h5
- # fsm
- h5repack_aggr.h5
- h5repack_fsm_aggr_nopersist.h5
- h5repack_fsm_aggr_persist.h5
- h5repack_none.h5
- h5repack_paged_nopersist.h5
- h5repack_paged_persist.h5
+ COMMAND ${CMAKE_COMMAND} -E remove ${H5REPACK_CLEANFILES}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${vfdname}
)
- add_test (
- NAME H5REPACK_VFD-${vfdname}-h5repacktest
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5repacktest>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-h5repacktest.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (H5REPACK_VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS H5REPACK_VFD-${vfdname}-h5repacktest-clear-objects)
- set_tests_properties (H5REPACK_VFD-${vfdname}-h5repacktest PROPERTIES TIMEOUT ${CTEST_SHORT_TIMEOUT})
+ if (NOT "h5repacktest" IN_LIST H5REPACK_VFD_${vfdname}_SKIP_TESTS)
+ add_test (
+ NAME H5REPACK_VFD-${vfdname}-h5repacktest
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5repacktest>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-h5repacktest.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (H5REPACK_VFD-${vfdname}-h5repacktest PROPERTIES
+ DEPENDS H5REPACK_VFD-${vfdname}-h5repacktest-clear-objects
+ TIMEOUT ${CTEST_SHORT_TIMEOUT}
+ )
+ add_test (
+ NAME H5REPACK_VFD-${vfdname}-h5repacktest-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${H5REPACK_CLEANFILES}
+ )
+ set_tests_properties (H5REPACK_VFD-${vfdname}-h5repacktest-clean-objects PROPERTIES
+ DEPENDS H5REPACK_VFD-${vfdname}-h5repacktest
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${vfdname}
+ )
+ endif ()
endif ()
endmacro ()
diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in
index aaad148..826cd69 100644
--- a/tools/test/h5repack/h5repack.sh.in
+++ b/tools/test/h5repack/h5repack.sh.in
@@ -1123,6 +1123,56 @@ TOOLTEST_DUMP()
rm -f $outfile
}
+# This is same as TOOLTEST_DUMP() with comparing h5dump output
+# without any option
+#
+TOOLTEST_DUMP_NO_OPT()
+{
+ infile=$2
+ outfile=out-$1.$2
+ expect="$TESTDIR/$1.$2.ddl"
+ actual="$TESTDIR/out-$1.$2.out"
+ actual_err="$TESTDIR/out-$1.$2.err"
+
+ shift
+ shift
+
+ # Run test.
+ TESTING $H5REPACK $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ ) >$actual 2>$actual_err
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ VERIFY h5dump output $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5DUMP_BIN $outfile
+ ) >$actual 2>$actual_err
+ cat $actual_err >> $actual
+
+ RET=$?
+
+ fi
+
+ if cmp -s $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /'
+ fi
+
+ rm -f $actual $actual_err
+ rm -f $outfile
+}
+
# This is similar to TOOLTEST_DUMP().
# Test h5repack with options added for paged aggregation.
# h5stat is used on the repacked file and the expected output
diff --git a/tools/test/h5repack/h5repack_plugin.sh.in b/tools/test/h5repack/h5repack_plugin.sh.in
index 0331d85..91918f9 100644
--- a/tools/test/h5repack/h5repack_plugin.sh.in
+++ b/tools/test/h5repack/h5repack_plugin.sh.in
@@ -98,7 +98,7 @@ if [ $? != 0 ]; then
fi
# setup plugin path
-ENVCMD="env HDF5_PLUGIN_PATH=../${PLUGIN_LIBDIR}"
+ENVCMD="env HDF5_PLUGIN_PATH=../${PLUGIN_LIBDIR}:${HDF5_PLUGIN_PATH}"
COPY_TESTFILES_TO_TESTDIR()
{
diff --git a/tools/test/h5stat/CMakeTests.cmake b/tools/test/h5stat/CMakeTests.cmake
index c79c0a1..14bb5ea 100644
--- a/tools/test/h5stat/CMakeTests.cmake
+++ b/tools/test/h5stat/CMakeTests.cmake
@@ -114,6 +114,9 @@
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
endif ()
+ set_tests_properties (H5STAT-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}"
+ )
endmacro ()
macro (ADD_H5_ERR_TEST resultfile resultcode)
@@ -138,6 +141,9 @@
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
endif ()
+ set_tests_properties (H5STAT-${resultfile} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}"
+ )
endmacro ()
##############################################################################
@@ -146,17 +152,6 @@
##############################################################################
##############################################################################
- if (HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- foreach (ddl_file ${HDF5_REFERENCE_FILES})
- set (CLEAR_LIST ${CLEAR_LIST} ${ddl_file}.out ${ddl_file}.out.err)
- endforeach ()
- add_test (
- NAME H5STAT-clearall-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${CLEAR_LIST}
- )
- endif ()
-
# Test for help flag
ADD_H5_TEST (h5stat_help1 0 -h)
ADD_H5_TEST (h5stat_help2 0 --help)
diff --git a/tools/test/misc/CMakeTestsRepart.cmake b/tools/test/misc/CMakeTestsRepart.cmake
index 20ae263..04c74ec 100644
--- a/tools/test/misc/CMakeTestsRepart.cmake
+++ b/tools/test/misc/CMakeTestsRepart.cmake
@@ -72,6 +72,19 @@
family_to_sec2.h5
)
set_tests_properties (H5REPART-clearall-objects PROPERTIES FIXTURES_SETUP clear_testrepart)
+ add_test (
+ NAME H5REPART-clean-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ fst_family00000.h5
+ scd_family00000.h5
+ scd_family00001.h5
+ scd_family00002.h5
+ scd_family00003.h5
+ family_to_single.h5
+ family_to_sec2.h5
+ )
+ set_tests_properties (H5REPART-clean-objects PROPERTIES FIXTURES_CLEANUP clear_testrepart)
# repartition family member size to 20,000 bytes.
add_test (
@@ -116,6 +129,7 @@
)
set_tests_properties (H5REPART-h5repart_test PROPERTIES
DEPENDS "H5REPART-h5repart_20K;H5REPART-h5repart_5K;H5REPART-h5repart_single;H5REPART-h5repart_sec2"
+ FIXTURES_REQUIRED clear_testrepart
)
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES}
diff --git a/tools/test/perform/CMakeLists.txt b/tools/test/perform/CMakeLists.txt
index 268acbb..adc9a04 100644
--- a/tools/test/perform/CMakeLists.txt
+++ b/tools/test/perform/CMakeLists.txt
@@ -127,38 +127,6 @@ if (HDF5_ENABLE_FORMATTERS)
clang_format (HDF5_TOOLS_TEST_PERFORM_zip_perf_FORMAT zip_perf)
endif ()
-if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL)
- if (HDF5_BUILD_PERFORM_STANDALONE)
- #-- Adding test for h5perf
- set (h5perf_alone_SOURCES
- ${HDF5_TOOLS_DIR}/lib/io_timer.c
- ${HDF5_TOOLS_SRC_H5PERF_SOURCE_DIR}/pio_perf.c
- ${HDF5_TOOLS_SRC_H5PERF_SOURCE_DIR}/pio_engine.c
- ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/pio_standalone.c
- )
- add_executable (h5perf_alone ${h5perf_alone_SOURCES})
- target_include_directories (h5perf_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_TOOLS_DIR}/lib;${HDF5_TOOLS_SRC_H5PERF_SOURCE_DIR};${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- if (NOT BUILD_SHARED_LIBS)
- TARGET_C_PROPERTIES (h5perf_alone STATIC)
- target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIB_TARGET} ${LINK_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
- else ()
- TARGET_C_PROPERTIES (h5perf_alone SHARED)
- target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIBSH_TARGET} ${LINK_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
- endif ()
- set_target_properties (h5perf_alone PROPERTIES FOLDER perform)
- set_property (TARGET h5perf_alone
- APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE
- )
-
- #-----------------------------------------------------------------------------
- # Add Target to clang-format
- #-----------------------------------------------------------------------------
- if (HDF5_ENABLE_FORMATTERS)
- clang_format (HDF5_TOOLS_TEST_PERFORM_h5perf_alone_FORMAT h5perf_alone)
- endif ()
- endif ()
-endif ()
-
if (HDF5_TEST_TOOLS)
include (CMakeTests.cmake)
endif ()
diff --git a/tools/test/perform/CMakeTests.cmake b/tools/test/perform/CMakeTests.cmake
index ac6080b..acfe169 100644
--- a/tools/test/perform/CMakeTests.cmake
+++ b/tools/test/perform/CMakeTests.cmake
@@ -23,11 +23,7 @@ add_custom_target(zip_perf_files ALL COMMENT "Copying files needed by zip_perf t
# Add Tests
#-----------------------------------------------------------------------------
if (HDF5_TEST_SERIAL)
- # Remove any output file left over from previous test run
- add_test (
- NAME PERFORM_h5perform-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
+ set (PERFORM_CLEANFILES
chunk.h5
direct_write.h5
unix.raw
@@ -39,6 +35,20 @@ if (HDF5_TEST_SERIAL)
x-rowmaj-wr.dat
x-gnuplot
)
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME PERFORM_h5perform-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${PERFORM_CLEANFILES}
+ )
+ set_tests_properties (PERFORM_h5perform-clear-objects PROPERTIES FIXTURES_SETUP clear_perform)
+
+ add_test (
+ NAME PERFORM_h5perform-clean-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${PERFORM_CLEANFILES}
+ )
+ set_tests_properties (PERFORM_h5perform-clean-objects PROPERTIES FIXTURES_CLEANUP clear_perform)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME PERFORM_h5perf_serial COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5perf_serial>)
@@ -57,7 +67,7 @@ if (HDF5_TEST_SERIAL)
endif ()
set_tests_properties (PERFORM_h5perf_serial PROPERTIES
TIMEOUT ${CTEST_VERY_LONG_TIMEOUT}
- DEPENDS "PERFORM_h5perform-clearall-objects"
+ FIXTURES_REQUIRED clear_perform
)
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -76,7 +86,7 @@ if (HDF5_TEST_SERIAL)
)
endif ()
set_tests_properties (PERFORM_chunk PROPERTIES
- DEPENDS "PERFORM_h5perform-clearall-objects"
+ FIXTURES_REQUIRED clear_perform
)
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -95,7 +105,7 @@ if (HDF5_TEST_SERIAL)
)
endif ()
set_tests_properties (PERFORM_iopipe PROPERTIES
- DEPENDS "PERFORM_h5perform-clearall-objects"
+ FIXTURES_REQUIRED clear_perform
)
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -114,7 +124,7 @@ if (HDF5_TEST_SERIAL)
)
endif ()
set_tests_properties (PERFORM_overhead PROPERTIES
- DEPENDS "PERFORM_h5perform-clearall-objects"
+ FIXTURES_REQUIRED clear_perform
)
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -133,7 +143,7 @@ if (HDF5_TEST_SERIAL)
)
endif ()
set_tests_properties (PERFORM_perf_meta PROPERTIES
- DEPENDS "PERFORM_h5perform-clearall-objects"
+ FIXTURES_REQUIRED clear_perform
)
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -152,7 +162,7 @@ if (HDF5_TEST_SERIAL)
)
endif ()
set_tests_properties (PERFORM_zip_perf_help PROPERTIES
- DEPENDS "PERFORM_h5perform-clearall-objects"
+ FIXTURES_REQUIRED clear_perform
)
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -171,7 +181,8 @@ if (HDF5_TEST_SERIAL)
)
endif ()
set_tests_properties (PERFORM_zip_perf PROPERTIES
- DEPENDS "PERFORM_zip_perf_help;PERFORM_h5perform-clearall-objects"
+ DEPENDS "PERFORM_zip_perf_help"
+ FIXTURES_REQUIRED clear_perform
)
endif ()