AddressSanitizer: don't use /tmp for temporary file in output tests.

llvm-svn: 151042
This commit is contained in:
Alexey Samsonov 2012-02-21 07:08:38 +00:00
parent da991549c0
commit 2d2f1711b7
1 changed files with 3 additions and 1 deletions

View File

@ -8,7 +8,7 @@ CC=$2
FILE_CHECK=$3
CXXFLAGS="-mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls"
SYMBOLIZER=../scripts/asan_symbolize.py
TMP_ASAN_REPORT=/tmp/asan_report
TMP_ASAN_REPORT=asan_report.tmp
run_program() {
./$1 2>&1 | $SYMBOLIZER 2> /dev/null | c++filt > $TMP_ASAN_REPORT
@ -18,6 +18,7 @@ run_program() {
check_program() {
run_program $1
$FILE_CHECK $2 --check-prefix=$3 < $TMP_ASAN_REPORT
rm -f $TMP_ASAN_REPORT
}
C_TEST=use-after-free
@ -63,6 +64,7 @@ for t in *.cc; do
$FILE_CHECK $c.cc --check-prefix="Check-$OS" < $TMP_ASAN_REPORT
fi
rm ./$exe
rm ./$TMP_ASAN_REPORT
[ -e "$so" ] && rm ./$so
done
done