neovim/.ci/clang-asan.sh
Thiago de Arruda 276ac99350 travis: Remove install_functional_test_deps function
It is no longer needed after the lua client was added as dependency
(@69561ea922ae6789703c06cbc245929d7c625db9)
2014-10-21 11:07:13 -03:00

43 lines
1.2 KiB
Bash

. "$CI_SCRIPTS/common.sh"
set_environment /opt/neovim-deps/64
sudo pip install cpp-coveralls
clang_version=3.4
if [ ! -d /usr/local/clang-$clang_version ]; then
echo "Downloading clang $clang_version..."
sudo mkdir /usr/local/clang-$clang_version
wget -q -O - http://llvm.org/releases/$clang_version/clang+llvm-$clang_version-x86_64-unknown-ubuntu12.04.xz \
| sudo tar xJf - --strip-components=1 -C /usr/local/clang-$clang_version
fi
export CC=/usr/local/clang-$clang_version/bin/clang
symbolizer=/usr/local/clang-$clang_version/bin/llvm-symbolizer
export SANITIZE=1
export ASAN_SYMBOLIZER_PATH=$symbolizer
export ASAN_OPTIONS="detect_leaks=1:log_path=$tmpdir/asan"
export TSAN_OPTIONS="external_symbolizer_path=$symbolizer:log_path=$tmpdir/tsan"
export SKIP_UNITTEST=1
export UBSAN_OPTIONS="log_path=$tmpdir/ubsan" # not sure if this works
install_dir="$(pwd)/dist"
$MAKE_CMD cmake CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON -DCMAKE_INSTALL_PREFIX=$install_dir -DUSE_GCOV=ON"
if ! $MAKE_CMD test; then
asan_check "$tmpdir"
exit 1
fi
asan_check "$tmpdir"
if ! $MAKE_CMD oldtest; then
reset
asan_check "$tmpdir"
exit 1
fi
asan_check "$tmpdir"
coveralls --encoding iso-8859-1 || echo 'coveralls upload failed.'
$MAKE_CMD install