Commit 7e720bc0 authored by David Johnson's avatar David Johnson

Include WFA exceptions inline in email so the problem is obvious.

parent e9f4757c
Pipeline #1902 passed with stage
in 2 seconds
......@@ -325,11 +325,29 @@ else
# Controller logfiles get large; just send last 500 lines in attachment
TMPF=`mktemp`
tail -500 $TESTDIR/${CONTROLLERLOGFILE_SHORT} > $TMPF
echo "ERROR ${TESTNAME} $NOPROGMSG $DONEMSG $UMSG $SMSG (UERR=$UERR UDONE=$UDONE SERR=$SERR)" \
| mailx -s "ERROR ${TESTNAME} $DONEMSG $UMSG $SMSG" \
BTMPF=`mktemp`
echo "ERROR ${TESTNAME} $NOPROGMSG $DONEMSG $UMSG $SMSG (UERR=$UERR UDONE=$UDONE SERR=$SERR)" > $BTMPF
if [ $UERR -eq 0 ]; then
start=`grep -n Traceback $TESTDIR/${UWFALOGFILE_SHORT} | cut -d: -f 1`
total=`wc -l $TESTDIR/${UWFALOGFILE_SHORT} | awk '/ / { print \$1 }'`
tlines=`expr $total - $start + 10`
echo "\nException from uWFA:\n" >> $BTMPF
tail -$tlines $TESTDIR/${UWFALOGFILE_SHORT} >> $BTMPF
fi
if [ $SERR -eq 0 ]; then
start=`grep -n Traceback $TESTDIR/${SWFALOGFILE_SHORT} | cut -d: -f 1`
total=`wc -l $TESTDIR/${SWFALOGFILE_SHORT} | awk '/ / { print \$1 }'`
tlines=`expr $total - $start + 10`
echo "\nException from sWFA:\n" >> $BTMPF
tail -$tlines $TESTDIR/${SWFALOGFILE_SHORT} >> $BTMPF
fi
cat $BTMPF | mailx -s "ERROR ${TESTNAME} $DONEMSG $UMSG $SMSG" \
-a $TESTDIR/${UWFALOGFILE_SHORT} -a $TESTDIR/${SWFALOGFILE_SHORT} \
-a $TMPF "$TESTEMAIL"
rm -f $TMPF
rm -f $BTMPF
fi
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment