Ulimit the test, and print out a more interesting output if failure occurs

llvm-svn: 6216
This commit is contained in:
Chris Lattner 2003-05-14 19:54:07 +00:00
parent 38b65d5b3e
commit 795282d9b9

View File

@ -11,6 +11,7 @@
#
FILENAME=$1
TESTNAME=$1
SUBST=$1
OUTPUT=Output/$FILENAME.out
@ -20,19 +21,22 @@ if test $# != 1; then
# and the file to output to.
SUBST=$2
OUTPUT=$3
TESTNAME=$3
fi
ulimit -t 40
SCRIPT=$OUTPUT.script
grep 'RUN:' $FILENAME | sed "s|^.*RUN:\(.*\)$|\1|g;s|%s|$SUBST|g" > $SCRIPT
/bin/sh $SCRIPT > $OUTPUT 2>&1 || (
echo "******************** TEST '$FILENAME' FAILED! ********************"
echo "******************** TEST '$TESTNAME' FAILED! ********************"
echo "Command: "
cat $SCRIPT
echo "Output:"
cat $OUTPUT
rm $OUTPUT
echo "******************** TEST '$FILENAME' FAILED! ********************"
echo "******************** TEST '$TESTNAME' FAILED! ********************"
)