diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-09-04 00:30:11 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-09-04 00:30:11 +0000 |
commit | 607b17b7362e4a47d0e14bdf72fe9f51527c3ee1 (patch) | |
tree | df61e52c12d49bf4d49f1ea5db6d85dac6c16d68 /test/TestRunner.sh | |
parent | 628a42e04d86605bc703b5da9472d7f6056ea131 (diff) |
Update TestRunner to not report failure for XFAIL tests
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/TestRunner.sh')
-rwxr-xr-x | test/TestRunner.sh | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/TestRunner.sh b/test/TestRunner.sh index 767d9660d5..455674cc02 100755 --- a/test/TestRunner.sh +++ b/test/TestRunner.sh @@ -61,7 +61,12 @@ grep 'RUN:' $FILENAME | \ -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 @@ else 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 |