From 19a00efd982756f5b56d38c03b8db8b28f0ff5df Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Mon, 26 Nov 2012 15:45:17 -0500 Subject: [svn-r23055] Bug fix: HDFFV-8233 testh5stat.sh fails in LLNL uDawn. The test actually ran as expected but it did not prepare for the extra error messages from the MPI process. Solution: This sort of problem has been fixed by using the output filters in output_filter.sh. testh5stat.sh is updated to use the output filters. Tested: uDawn. --- tools/h5stat/testh5stat.sh.in | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/h5stat/testh5stat.sh.in b/tools/h5stat/testh5stat.sh.in index 74071d0..ab97698 100644 --- a/tools/h5stat/testh5stat.sh.in +++ b/tools/h5stat/testh5stat.sh.in @@ -133,6 +133,9 @@ TESTING() { echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' } +# Source in the output filter function definitions. +. $srcdir/../../bin/output_filter.sh + # Run a test and print PASS or *FAIL*. If a test fails then increment # the `nerrors' global variable and (if $verbose is set) display the # difference between the actual output and the expected output. The @@ -145,6 +148,8 @@ TOOLTEST() { expect="$TESTDIR/$1" actual="$TESTDIR/`basename $1 .ddl`.out" actual_err="$TESTDIR/`basename $1 .ddl`.err" + actual_sav=${actual}-sav + actual_err_sav=${actual_err}-sav shift # Run test. @@ -156,8 +161,13 @@ TOOLTEST() { cd $TESTDIR $RUNSERIAL $STAT_BIN $@ ) >$actual 2>$actual_err - cat $actual_err >> $actual + # 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 if [ ! -f $expect ]; then # Create the expect file if it doesn't yet exist. @@ -174,7 +184,7 @@ TOOLTEST() { # Clean up output file if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err + rm -f $actual $actual_err $actual_sav $actual_err_sav fi } -- cgit v0.12