HDFFV-10632 update autotools test scripts to match cmake
This commit is contained in:
@@ -79,6 +79,18 @@ $SRC_H5STAT_TESTFILES/h5stat_idx.h5
|
||||
$SRC_H5STAT_TESTFILES/h5stat_threshold.h5
|
||||
"
|
||||
|
||||
LIST_ERR_TEST_FILES="
|
||||
$SRC_H5STAT_TESTFILES/h5stat_err_refcount.err
|
||||
$SRC_H5STAT_TESTFILES/h5stat_err_old_layout.err
|
||||
$SRC_H5STAT_TESTFILES/h5stat_err_old_fill.err
|
||||
$SRC_H5STAT_TESTFILES/h5stat_err1_links.err
|
||||
$SRC_H5STAT_TESTFILES/h5stat_err1_dims.err
|
||||
$SRC_H5STAT_TESTFILES/h5stat_err1_numattrs.err
|
||||
$SRC_H5STAT_TESTFILES/h5stat_err2_numattrs.err
|
||||
$SRC_H5STAT_TESTFILES/h5stat_notexist.err
|
||||
$SRC_H5STAT_TESTFILES/h5stat_nofile.err
|
||||
"
|
||||
|
||||
LIST_OTHER_TEST_FILES="
|
||||
$SRC_H5STAT_TESTFILES/h5stat_err_refcount.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_err_old_layout.ddl
|
||||
@@ -100,17 +112,13 @@ $SRC_H5STAT_TESTFILES/h5stat_newgrat.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_newgrat-UG.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_newgrat-UA.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_idx.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_err1_links.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_links1.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_links2.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_links3.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_links4.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_links5.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_err1_dims.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_dims1.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_dims2.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_err1_numattrs.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_err2_numattrs.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_numattrs1.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_numattrs2.ddl
|
||||
$SRC_H5STAT_TESTFILES/h5stat_numattrs3.ddl
|
||||
@@ -120,7 +128,7 @@ $SRC_H5STAT_TESTFILES/h5stat_numattrs4.ddl
|
||||
#
|
||||
# copy test files and expected output files from source dirs to test dir
|
||||
#
|
||||
COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES"
|
||||
COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_ERR_TEST_FILES $LIST_OTHER_TEST_FILES"
|
||||
|
||||
COPY_TESTFILES_TO_TESTDIR()
|
||||
{
|
||||
@@ -184,8 +192,9 @@ TESTING() {
|
||||
#
|
||||
TOOLTEST() {
|
||||
expect="$TESTDIR/$1"
|
||||
expect_err="$TESTDIR/`basename $1 .ddl`.err"
|
||||
actual="$TESTDIR/`basename $1 .ddl`.out"
|
||||
actual_err="$TESTDIR/`basename $1 .ddl`.err"
|
||||
actual_err="$TESTDIR/`basename $1 .ddl`.out.err"
|
||||
actual_sav=${actual}-sav
|
||||
actual_err_sav=${actual_err}-sav
|
||||
shift
|
||||
@@ -202,14 +211,17 @@ TOOLTEST() {
|
||||
STDOUT_FILTER $actual
|
||||
cp $actual_err $actual_err_sav
|
||||
STDERR_FILTER $actual_err
|
||||
cat $actual_err >> $actual
|
||||
|
||||
if [ ! -f $expect ]; then
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
# Compare error files if the expect file doesn't exist.
|
||||
if $CMP $expect_err $actual_err; then
|
||||
echo " PASSED"
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result (*.err) differs from actual result (*.out.err)"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect_err $actual_err |sed 's/^/ /'
|
||||
fi
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user