Misc normalizations with develop

This commit is contained in:
Dana Robinson
2020-08-14 18:59:24 -07:00
parent 686dbefff5
commit 25520640b2
29 changed files with 622 additions and 630 deletions

View File

@@ -135,24 +135,24 @@ CLEAN_TESTFILES_AND_TESTDIR()
# -h print help page
while [ $# -gt 0 ]; do
case "$1" in
-p) # reset the tool name and bin to run ph5diff tests
TESTNAME=ph5diff
H5DIFF=../../src/h5diff/ph5diff # The tool name
H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary
pmode=yes
shift
;;
-p) # reset the tool name and bin to run ph5diff tests
TESTNAME=ph5diff
H5DIFF=../../src/h5diff/ph5diff # The tool name
H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary
pmode=yes
shift
;;
-h) # print help page
echo "$0 [-p] [-h]"
echo " -p run ph5diff tests"
echo " -h print help page"
shift
exit 0
;;
echo "$0 [-p] [-h]"
echo " -p run ph5diff tests"
echo " -h print help page"
shift
exit 0
;;
*) # unknown option
echo "$0: Unknown option ($1)"
exit 1
;;
exit 1
;;
esac
done
@@ -218,19 +218,21 @@ TOOLTEST() {
# Run test.
TESTING $H5DIFF $@
(
#echo "#############################"
#echo "Expected output for '$H5DIFF $@'"
#echo "#############################"
cd $TESTDIR
eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
#echo "#############################"
#echo "Expected output for '$H5DIFF $@'"
#echo "#############################"
cd $TESTDIR
eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
) >$actual 2>$actual_err
EXIT_CODE=$?
# save actual and actual_err in case they are needed later.
cp $actual $actual_sav
STDOUT_FILTER $actual
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
cat $actual_err >> $actual
# don't add exit code check in pmode, as it causes failure. (exit code
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
@@ -260,27 +262,29 @@ TOOLTEST() {
actual_sorted=actual_sorted
sort $expect -o $expect_sorted
sort $actual -o $actual_sorted
# remove "EXIT CODE:" line from expect file. test for exit code
# is done by serial mode.
grep -v "EXIT CODE:" $expect_sorted > $expect_sorted.noexit
mv $expect_sorted.noexit $expect_sorted
if $CMP $expect_sorted $actual_sorted; then
echo " PASSED"
else
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
if test yes = "$verbose"; then
echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
$DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
echo "====The actual output ($actual_sav)"
sed 's/^/ /' < $actual_sav
echo "====The actual stderr ($actual_err_sav)"
sed 's/^/ /' < $actual_err_sav
echo "====End of actual stderr ($actual_err_sav)"
echo ""
if $CMP $expect_sorted $actual_sorted; then
echo " PASSED"
else
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
if test yes = "$verbose"; then
echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
$DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
echo "====The actual output ($actual_sav)"
sed 's/^/ /' < $actual_sav
echo "====The actual stderr ($actual_err_sav)"
sed 's/^/ /' < $actual_err_sav
echo "====End of actual stderr ($actual_err_sav)"
echo ""
fi
fi
fi
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
@@ -306,18 +310,20 @@ TOOLTEST_ERR() {
# Run test.
TESTING $H5DIFF $@
(
#echo "#############################"
#echo "Expected output for '$H5DIFF $@'"
#echo "#############################"
cd $TESTDIR
eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
#echo "#############################"
#echo "Expected output for '$H5DIFF $@'"
#echo "#############################"
cd $TESTDIR
eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
) >$actual 2>$actual_err
EXIT_CODE=$?
# save actual and actual_err in case they are needed later.
cp $actual $actual_sav
STDOUT_FILTER $actual
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
# don't add exit code check in pmode, as it causes failure. (exit code
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
@@ -348,23 +354,24 @@ TOOLTEST_ERR() {
sort $expect_err -o $expect_sorted
sort $actual_err -o $actual_sorted
mv $expect_sorted.noexit $expect_sorted
if $CMP $expect_sorted $actual_sorted; then
echo " PASSED"
else
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
if test yes = "$verbose"; then
echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
$DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
echo "====The actual output ($actual_sav)"
sed 's/^/ /' < $actual_sav
echo "====The actual stderr ($actual_err_sav)"
sed 's/^/ /' < $actual_err_sav
echo "====End of actual stderr ($actual_err_sav)"
echo ""
if $CMP $expect_sorted $actual_sorted; then
echo " PASSED"
else
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
if test yes = "$verbose"; then
echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
$DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
echo "====The actual output ($actual_sav)"
sed 's/^/ /' < $actual_sav
echo "====The actual stderr ($actual_err_sav)"
sed 's/^/ /' < $actual_err_sav
echo "====End of actual stderr ($actual_err_sav)"
echo ""
fi
fi
fi
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then