[cfe-commits] r55751 - /cfe/trunk/test/TestRunner.sh
Daniel Dunbar
daniel at zuster.org
Wed Sep 3 17:30:12 PDT 2008
Author: ddunbar
Date: Wed Sep 3 19:30:11 2008
New Revision: 55751
URL: http://llvm.org/viewvc/llvm-project?rev=55751&view=rev
Log:
Update TestRunner to not report failure for XFAIL tests
Modified:
cfe/trunk/test/TestRunner.sh
Modified: cfe/trunk/test/TestRunner.sh
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/TestRunner.sh?rev=55751&r1=55750&r2=55751&view=diff
==============================================================================
--- cfe/trunk/test/TestRunner.sh (original)
+++ cfe/trunk/test/TestRunner.sh Wed Sep 3 19:30:11 2008
@@ -61,7 +61,12 @@
-e "s|%t|$TEMPOUTPUT|g" \
-e "s|clang|$CLANG|g" > $SCRIPT
-grep -q XFAIL $FILENAME && (printf "XFAILED '$TESTNAME': "; grep XFAIL $FILENAME)
+IS_XFAIL=0
+if (grep -q XFAIL $FILENAME); then
+ IS_XFAIL=1
+ printf "XFAILED '$TESTNAME': "
+ grep XFAIL $FILENAME
+fi
/bin/sh $SCRIPT > $OUTPUT 2>&1
SCRIPT_STATUS=$?
@@ -72,12 +77,22 @@
VG_STATUS=0
fi
+if [ $IS_XFAIL -ne 0 ]; then
+ if [ $SCRIPT_STATUS -ne 0 ]; then
+ SCRIPT_STATUS=0
+ else
+ SCRIPT_STATUS=1
+ fi
+fi
+
if [ $SCRIPT_STATUS -ne 0 -o $VG_STATUS -ne 0 ]; then
echo "******************** TEST '$TESTNAME' FAILED! ********************"
echo "Command: "
cat $SCRIPT
if [ $SCRIPT_STATUS -eq 0 ]; then
echo "Output:"
+ elif [ $IS_XFAIL -ne 0 ]; then
+ echo "Incorrect Output (Expected Failure):"
else
echo "Incorrect Output:"
fi
More information about the cfe-commits
mailing list