From a6add2ab923f20733a3dc866c6e2ec1c7b84eb64 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Fri, 1 Nov 2002 13:43:04 -0500 Subject: [svn-r6048] Purpose: Testing fix. Description: Correctly detect when one of the parallel tests fails and stop the make from proceeding. Platforms tested: modi4 (parallel), sleipnir (parallel) --- testpar/testph5.sh.in | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/testpar/testph5.sh.in b/testpar/testph5.sh.in index 409416b..f41639e 100644 --- a/testpar/testph5.sh.in +++ b/testpar/testph5.sh.in @@ -43,6 +43,11 @@ TOOLTEST() { # Run test. echo $RUNPARALLEL $TEST_APP_BIN "$@" eval $RUNPARALLEL $TEST_APP_BIN "$@" + + # Check if the command failed and increment nerrors if so. + if test $? -ne 0 ; then + nerrors="`expr $nerrors + 1`" + fi } ############################################################################## @@ -56,3 +61,12 @@ TOOLTEST # testphdf5 test using the MPI-POSIX VFL driver TOOLTEST -p +# Emit message about testing status +if test $nerrors -eq 0 ; then + echo "All $TEST_APP tests passed." +else + echo "ERROR! One or more $TEST_APP tests failed." +fi + +# Propagate a useful exit code +exit $nerrors -- cgit v0.12