summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-12-22 17:55:43 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-12-22 17:55:43 (GMT)
commit9d9044e0e9dcd79495be7727a9696e9926811142 (patch)
tree0067609239e063dda14dc81f6c50e1f0187d78f0
parentf679b7495d68244b4eaa92fe7f16d058caeeb2ab (diff)
parentb6bc749eac68335004ad80edc0f4e28322631d15 (diff)
downloadhdf5-9d9044e0e9dcd79495be7727a9696e9926811142.zip
hdf5-9d9044e0e9dcd79495be7727a9696e9926811142.tar.gz
hdf5-9d9044e0e9dcd79495be7727a9696e9926811142.tar.bz2
Merge pull request #2178 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'b6bc749eac68335004ad80edc0f4e28322631d15': Grep needs to search error file Correct flaws in test scripts and files grep for failure text in error stack Add list to function arg Test files for new ref types h5diff test script files Add ref changes to test script
-rw-r--r--tools/test/h5diff/CMakeTests.cmake2
-rw-r--r--tools/test/h5diff/testfiles/h5diff_reg.txt6
-rw-r--r--tools/test/h5diff/testh5diff.sh.in22
-rw-r--r--tools/test/h5dump/testh5dump.sh.in38
-rw-r--r--tools/test/perform/CMakeLists.txt14
5 files changed, 70 insertions, 12 deletions
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index d03926a..347f796 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -212,6 +212,7 @@
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_56.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_57.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_58.txt
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_58_ref.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_59.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_500.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_501.txt
@@ -293,6 +294,7 @@
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_90.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_8625.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_8639.txt
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_reg.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_ud.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_udfail.err
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_udfail.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_reg.txt b/tools/test/h5diff/testfiles/h5diff_reg.txt
index 19dae48..d4f5415 100644
--- a/tools/test/h5diff/testfiles/h5diff_reg.txt
+++ b/tools/test/h5diff/testfiles/h5diff_reg.txt
@@ -1,12 +1,12 @@
dataset: </Dataset3> and </Dataset3>
-attribute: <Attr1> and <Attr1>
+attribute: <Attr1 of <(null)>> and <Attr1 of <(null)>>
0 differences found
Warning: Cannot open referenced attribute: attribute 1
Warning: Cannot open referenced attribute: attribute 2
-attribute: <Attr2> and <Attr2>
+attribute: <Attr2 of <(null)>> and <Attr2 of <(null)>>
0 differences found
-attribute: <Attr3> and <Attr3>
+attribute: <Attr3 of <(null)>> and <Attr3 of <(null)>>
0 differences found
0 differences found
obj1 obj2
diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in
index 557d2ff..2d490a8 100644
--- a/tools/test/h5diff/testh5diff.sh.in
+++ b/tools/test/h5diff/testh5diff.sh.in
@@ -150,6 +150,19 @@ $SRC_TOOLS_TESTFILES/vds/5_c.h5
$SRC_TOOLS_TESTFILES/vds/5_vds.h5
"
+LIST_HDF5_STD_REF_OBJ_TEST_FILES="
+$SRC_TOOLS_TESTFILES/trefer_attr.h5
+$SRC_TOOLS_TESTFILES/trefer_compat.h5
+$SRC_TOOLS_TESTFILES/trefer_ext1.h5
+$SRC_TOOLS_TESTFILES/trefer_ext2.h5
+$SRC_TOOLS_TESTFILES/trefer_grp.h5
+$SRC_TOOLS_TESTFILES/trefer_obj_del.h5
+$SRC_TOOLS_TESTFILES/trefer_obj.h5
+$SRC_TOOLS_TESTFILES/trefer_param.h5
+$SRC_TOOLS_TESTFILES/trefer_reg_1d.h5
+$SRC_TOOLS_TESTFILES/trefer_reg.h5
+"
+
LIST_OTHER_TEST_FILES="
$SRC_H5DIFF_TESTFILES/h5diff_10.txt
$SRC_H5DIFF_TESTFILES/h5diff_100.txt
@@ -259,6 +272,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_55.txt
$SRC_H5DIFF_TESTFILES/h5diff_56.txt
$SRC_H5DIFF_TESTFILES/h5diff_57.txt
$SRC_H5DIFF_TESTFILES/h5diff_58.txt
+$SRC_H5DIFF_TESTFILES/h5diff_58_ref.txt
$SRC_H5DIFF_TESTFILES/h5diff_59.txt
$SRC_H5DIFF_TESTFILES/h5diff_500.txt
$SRC_H5DIFF_TESTFILES/h5diff_501.txt
@@ -338,6 +352,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_80.txt
$SRC_H5DIFF_TESTFILES/h5diff_90.txt
$SRC_H5DIFF_TESTFILES/h5diff_8625.txt
$SRC_H5DIFF_TESTFILES/h5diff_8639.txt
+$SRC_H5DIFF_TESTFILES/h5diff_reg.txt
$SRC_H5DIFF_TESTFILES/h5diff_v1.txt
$SRC_H5DIFF_TESTFILES/h5diff_v2.txt
$SRC_H5DIFF_TESTFILES/h5diff_v3.txt
@@ -347,7 +362,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_vlstr.txt
#
# copy test files and expected output files from source dirs to test dir
#
-COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_HDF5_VDS_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_HDF5_TEST_FILES_XML $LIST_OTHER_TEST_FILES_XML"
+COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_HDF5_VDS_TEST_FILES $LIST_HDF5_STD_REF_OBJ_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_HDF5_TEST_FILES_XML $LIST_OTHER_TEST_FILES_XML"
COPY_TESTFILES_TO_TESTDIR()
{
@@ -691,7 +706,10 @@ TOOLTEST h5diff_56.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset6a dset6b
TOOLTEST h5diff_57.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset7a dset7b
# 5.8 (region reference)
-TOOLTEST h5diff_58.txt -v h5diff_dset1.h5 h5diff_dset2.h5 refreg
+TOOLTEST h5diff_58.txt -v2 h5diff_dset1.h5 h5diff_dset2.h5 refreg
+TOOLTEST h5diff_58_ref.txt -v2 h5diff_dset1.h5 h5diff_dset2.h5 /g1/reference2D
+# STD_REF_OBJ
+TOOLTEST h5diff_reg.txt -v2 trefer_attr.h5 trefer_ext2.h5 Dataset3 Dataset3
# test for both dset and attr with same type but with different size
# ( HDDFV-7942 )
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index dc7d999..53c8927 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -941,6 +941,42 @@ GREPTEST()
fi
}
+# Call the h5dump tool and grep for a value but disables plugin filter loading
+# txttype ERRTXT greps test error output, otherwise greps test output
+GREPTEST2()
+{
+ txttype=$1
+ expectdata=$2
+ actual=$TESTDIR/$3
+ actual_err="$TESTDIR/`basename $3 .ddl`.oerr"
+ shift
+ shift
+ shift
+
+ # Run test.
+ TESTING $DUMPER -p $@
+ (
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
+ ) >$actual 2>$actual_err
+ if [ "$txttype" = "ERRTXT" ]; then
+ $GREP "$expectdata" $actual_err > /dev/null
+ else
+ $GREP "$expectdata" $actual > /dev/null
+ fi
+ if [ $? -eq 0 ]; then
+ echo " PASSED"
+ else
+ echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err
+ fi
+}
+
# Print a "SKIP" message
SKIP() {
TESTING $DUMPER $@
@@ -1390,7 +1426,7 @@ TOOLTEST4 textlinkfar.ddl --enable-error-stack textlinkfar.h5
TOOLTEST4 textlink.ddl --enable-error-stack textlink.h5
# test for error stack display (BZ2048)
-TOOLTEST5 filter_fail.ddl --enable-error-stack filter_fail.h5
+GREPTEST2 ERRTXT "filter plugins disabled" filter_fail.ddl --enable-error-stack filter_fail.h5
# test for -o -y for dataset with attributes
TOOLTEST2 tall-6.exp --enable-error-stack -y -o tall-6.txt -d /g1/g1.1/dset1.1.1 tall.h5
diff --git a/tools/test/perform/CMakeLists.txt b/tools/test/perform/CMakeLists.txt
index 38dd605..f5a0243 100644
--- a/tools/test/perform/CMakeLists.txt
+++ b/tools/test/perform/CMakeLists.txt
@@ -23,18 +23,19 @@ set_target_properties (h5perf_serial PROPERTIES FOLDER perform)
if (HDF5_BUILD_PERFORM_STANDALONE)
#-- Adding test for h5perf_serial_alone
set (h5perf_serial_alone_SOURCES
+ ${HDF5_TOOLS_DIR}/lib/io_timer.c
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/sio_perf.c
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/sio_engine.c
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/sio_standalone.c
)
add_executable (h5perf_serial_alone ${h5perf_serial_alone_SOURCES})
- target_include_directories (h5perf_serial_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (h5perf_serial_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TOOLS_DIR}/lib;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (h5perf_serial_alone STATIC)
- target_link_libraries (h5perf_serial_alone PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ target_link_libraries (h5perf_serial_alone PRIVATE ${HDF5_LIB_TARGET})
else ()
TARGET_C_PROPERTIES (h5perf_serial_alone SHARED)
- target_link_libraries (h5perf_serial_alone PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ target_link_libraries (h5perf_serial_alone PRIVATE ${HDF5_LIBSH_TARGET})
endif ()
set_target_properties (h5perf_serial_alone PROPERTIES FOLDER perform)
set_property (TARGET h5perf_serial_alone
@@ -169,18 +170,19 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING)
if (HDF5_BUILD_PERFORM_STANDALONE)
#-- Adding test for h5perf
set (h5perf_alone_SOURCES
+ ${HDF5_TOOLS_DIR}/lib/io_timer.c
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/pio_perf.c
${HDF5_TOOLS_TEST_PERFORM_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_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (h5perf_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TOOLS_DIR}/lib;$<$<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_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIB_TARGET})
else ()
TARGET_C_PROPERTIES (h5perf_alone SHARED)
- target_link_libraries (h5perf_alone PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIBSH_TARGET})
endif ()
set_target_properties (h5perf_alone PROPERTIES FOLDER perform)
set_property (TARGET h5perf_alone