From a562617d2f3d5e0dc1f2f198a0a6c411137ebd93 Mon Sep 17 00:00:00 2001 From: grev Date: Sat, 4 Apr 2009 01:04:30 +0000 Subject: [PATCH] b=17973 i=Brian mpi_run: process mpi output to get an error --- lustre/tests/test-framework.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index d875b49..7f8f92b 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -2615,6 +2615,8 @@ get_mds_dir () { mpi_run () { local mpirun="$MPIRUN $MPIRUN_OPTIONS" local command="$mpirun $@" + local mpilog=$TMP/mpi.log + local rc if [ "$MPI_USER" != root -a $mpirun ]; then echo "+ chmod 0777 $MOUNT" @@ -2624,7 +2626,14 @@ mpi_run () { ls -ald $MOUNT echo "+ $command" - eval $command + eval $command 2>&1 > $mpilog || true + + rc=${PIPESTATUS[0]} + if [ $rc -eq 0 ] && grep -q "p4_error: : [^0]" $mpilog ; then + rc=1 + fi + cat $mpilog + return $rc } mdsrate_cleanup () { -- 1.8.3.1