From bb1c2afd589310c98b1f4535c2af36c8085e108c Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 14 Aug 2001 11:35:43 -0500 Subject: [svn-r4342] Purpose: Improvement Description: The stdout and stderr were both redirected to an output file. This works fine in tradition sequential Unix machines. But in some parallel systems (like mpi-jobs in IBM SP), the stderr is merged with stdout alright but not in the exact order as expected. This is not deterministic in parallel jobs. So, the test output are all there but the ordering maynot be as expected. Solution: Redirect stderr to separated file and append it to the stdout file after test-command is executed. Then compare it with the expected output. This eliminate the assumption that stdout and stderr must merged in "chronical orders". Platforms tested: tested in v1.4. Folded it into v1.5. --- tools/h5dump/testh5dump.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/h5dump/testh5dump.sh b/tools/h5dump/testh5dump.sh index 2a64fa7..3c532ef 100755 --- a/tools/h5dump/testh5dump.sh +++ b/tools/h5dump/testh5dump.sh @@ -40,18 +40,19 @@ TESTING() { TOOLTEST() { expect="$srcdir/../testfiles/$1" actual="../testfiles/`basename $1 .ddl`.out" + actual_err="../testfiles/`basename $1 .ddl`.err" shift # Run test. TESTING $DUMPER $@ - ( echo "#############################" echo "Expected output for '$DUMPER $@'" echo "#############################" cd $srcdir/../testfiles $RUNSERIAL $DUMPER_BIN "$@" - ) >$actual 2>&1 + ) >$actual 2>$actual_err + cat $actual_err >> $actual if $CMP $expect $actual; then echo " PASSED" @@ -64,7 +65,7 @@ TOOLTEST() { # Clean up output file if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual + rm -f $actual $actual_err fi } -- cgit v0.12