[llvm-commits] [compiler-rt] r146528 - /compiler-rt/trunk/lib/asan/tests/test_output.sh
Kostya Serebryany
kcc at google.com
Tue Dec 13 16:05:22 PST 2011
Author: kcc
Date: Tue Dec 13 18:05:22 2011
New Revision: 146528
URL: http://llvm.org/viewvc/llvm-project?rev=146528&view=rev
Log:
[asan] fix the test runner to detect build breakages; add a test for -pie
Modified:
compiler-rt/trunk/lib/asan/tests/test_output.sh
Modified: compiler-rt/trunk/lib/asan/tests/test_output.sh
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/test_output.sh?rev=146528&r1=146527&r2=146528&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/test_output.sh (original)
+++ compiler-rt/trunk/lib/asan/tests/test_output.sh Tue Dec 13 18:05:22 2011
@@ -1,5 +1,7 @@
#!/bin/bash
+set -e # fail on any error
+
OS=`uname`
CXX=$1
CC=$2
@@ -7,9 +9,14 @@
SYMBOLIZER=../scripts/asan_symbolize.py
C_TEST=use-after-free
-$CC -g -faddress-sanitizer -O2 $C_TEST.c || exit 1
echo "Sanity checking a test in pure C"
-./a.out 2>&1 | grep "heap-use-after-free" > /dev/null || exit 1
+$CC -g -faddress-sanitizer -O2 $C_TEST.c
+./a.out 2>&1 | grep "heap-use-after-free" > /dev/null
+rm ./a.out
+
+echo "Sanity checking a test in pure C with -pie"
+$CC -g -faddress-sanitizer -O2 $C_TEST.c -pie
+./a.out 2>&1 | grep "heap-use-after-free" > /dev/null
rm ./a.out
for t in *.tmpl; do
@@ -29,7 +36,7 @@
else
actual_t="$t"
fi
- ./$exe 2>&1 | $SYMBOLIZER 2> /dev/null | c++filt | ./match_output.py $actual_t || exit 1
+ ./$exe 2>&1 | $SYMBOLIZER 2> /dev/null | c++filt | ./match_output.py $actual_t
echo $exe
rm ./$exe
[ -e "$so" ] && rm ./$so
More information about the llvm-commits
mailing list