From f8e83e11c6d3fc13b369a425c240825935c17cf9 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 4 Oct 2011 03:16:21 -0500 Subject: [svn-r21458] Problem: Function TOOLTEST_OUTPUT does not filter the extra system messages sent to stdout or stderr, thus causing output mismatched with expected output. Solution: Added STDOUT_FILTER and STDERR_FILTER to filter them out. Tested: Tested LLNL uDawn (Blue-Gene cluster), for serial mode only. --- tools/h5jam/testh5jam.sh.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/h5jam/testh5jam.sh.in b/tools/h5jam/testh5jam.sh.in index 14b381c..f359926 100644 --- a/tools/h5jam/testh5jam.sh.in +++ b/tools/h5jam/testh5jam.sh.in @@ -86,6 +86,9 @@ $SRC_H5JAM_TESTFILES/h5unjam-help.txt $SRC_H5JAM_TESTFILES/h5jam-ub-nohdf5.txt " +# Source in the output filter function definitions. +. $srcdir/../../bin/output_filter.sh + # # copy test files and expected output files from source dirs to test dir # @@ -462,6 +465,8 @@ TOOLTEST_OUTPUT() { expect="$TESTDIR/$1" actual="$TESTDIR/`basename $1 .ls`.out" actual_err="$TESTDIR/`basename $1 .ls`.err" + actual_sav=${actual}-sav + actual_err_sav=${actual_err}-sav shift retvalexpect=$1 shift @@ -472,6 +477,11 @@ TOOLTEST_OUTPUT() { $TOOLCMD "$@" ) >$actual 2>$actual_err + # 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 # combine stderr to stdout for output compare cat $actual_err >> $actual -- cgit v0.12