[cfe-commits] r55782 - /cfe/trunk/test/TestRunner.sh
Nuno Lopes
nunoplopes at sapo.pt
Thu Sep 4 11:33:57 PDT 2008
Author: nlopes
Date: Thu Sep 4 13:33:57 2008
New Revision: 55782
URL: http://llvm.org/viewvc/llvm-project?rev=55782&view=rev
Log:
fix running tests with valgrind (there were a lot of bogus failures and warnings)
currently clang passes all tests under valgrind with the leak checker disabled :P (and fails most otherwise)
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=55782&r1=55781&r2=55782&view=diff
==============================================================================
--- cfe/trunk/test/TestRunner.sh (original)
+++ cfe/trunk/test/TestRunner.sh Thu Sep 4 13:33:57 2008
@@ -46,20 +46,20 @@
CLANG="clang"
fi
if [ -n "$VG" ]; then
- rm -f $OUTPUT.vg.*
- CLANG="valgrind --leak-check=full --quiet --log-file=$OUTPUT.vg.%p $CLANG"
+ rm -f $OUTPUT.vg
+ CLANG="valgrind --leak-check=full --quiet --log-file=$OUTPUT.vg $CLANG"
fi
SCRIPT=$OUTPUT.script
TEMPOUTPUT=$OUTPUT.tmp
grep 'RUN:' $FILENAME | \
sed -e "s|^.*RUN:\(.*\)$|\1|g" \
+ -e "s|clang|$CLANG|g" \
-e "s|%s|$SUBST|g" \
-e "s|%llvmgcc|llvm-gcc -emit-llvm|g" \
-e "s|%llvmgxx|llvm-g++ -emit-llvm|g" \
-e "s|%prcontext|prcontext.tcl|g" \
- -e "s|%t|$TEMPOUTPUT|g" \
- -e "s|clang|$CLANG|g" > $SCRIPT
+ -e "s|%t|$TEMPOUTPUT|g" > $SCRIPT
IS_XFAIL=0
if (grep -q XFAIL $FILENAME); then
@@ -72,7 +72,8 @@
SCRIPT_STATUS=$?
if [ -n "$VG" ]; then
- VG_STATUS=`cat $OUTPUT.vg.* | wc -l`
+ [ ! -s $OUTPUT.vg ]
+ VG_STATUS=$?
else
VG_STATUS=0
fi
@@ -99,7 +100,7 @@
cat $OUTPUT
if [ $VG_STATUS -ne 0 ]; then
echo "Valgrind Output:"
- cat $OUTPUT.vg.*
+ cat $OUTPUT.vg
fi
echo "******************** TEST '$TESTNAME' FAILED! ********************"
exit 1
More information about the cfe-commits
mailing list