diff options
author | Kostya Serebryany <kcc@google.com> | 2011-12-14 00:05:22 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2011-12-14 00:05:22 +0000 |
commit | e85da735537011f48660e1cee798a0b37a8e82e3 (patch) | |
tree | d7362847afe0f09ef255a3b18f4d35243f56c6a7 | |
parent | ac6ae7302de21fb82fa2b14a71402f22afbf3ed4 (diff) | |
download | bcm5719-llvm-e85da735537011f48660e1cee798a0b37a8e82e3.tar.gz bcm5719-llvm-e85da735537011f48660e1cee798a0b37a8e82e3.zip |
[asan] fix the test runner to detect build breakages; add a test for -pie
llvm-svn: 146528
-rwxr-xr-x | compiler-rt/lib/asan/tests/test_output.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/compiler-rt/lib/asan/tests/test_output.sh b/compiler-rt/lib/asan/tests/test_output.sh index dff48d2c286..594394dd2be 100755 --- a/compiler-rt/lib/asan/tests/test_output.sh +++ b/compiler-rt/lib/asan/tests/test_output.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e # fail on any error + OS=`uname` CXX=$1 CC=$2 @@ -7,9 +9,14 @@ CXXFLAGS="-mno-omit-leaf-frame-pointer" 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 @@ for t in *.tmpl; do 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 |