[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.
This commit is contained in:
Albert Cheng 2001-08-14 11:35:43 -05:00
parent 4f6a24f099
commit bb1c2afd58

View File

@ -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
}