diff options
author | Edward Z. Yang <ezyang@mit.edu> | 2018-02-24 17:04:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-24 17:04:25 -0500 |
commit | 40d79e4447acf218836132eabb9d4b0d7bfede77 (patch) | |
tree | 76516177db37163763f9c3827625915ce9198231 /.jenkins/test.sh | |
parent | 1ff537ca7198ddef7e76d0f75c001d0b3f41d7fd (diff) | |
download | pytorch-40d79e4447acf218836132eabb9d4b0d7bfede77.tar.gz pytorch-40d79e4447acf218836132eabb9d4b0d7bfede77.tar.bz2 pytorch-40d79e4447acf218836132eabb9d4b0d7bfede77.zip |
Turn on ASAN in continuous integration. (#5271)
I know this works because I had to squelch a bunch of ASAN
errors in multiprocessing.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Diffstat (limited to '.jenkins/test.sh')
-rwxr-xr-x | .jenkins/test.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.jenkins/test.sh b/.jenkins/test.sh index 9ab4c59242..6614bcc8d7 100755 --- a/.jenkins/test.sh +++ b/.jenkins/test.sh @@ -40,6 +40,12 @@ echo "Testing pytorch" export OMP_NUM_THREADS=4 export MKL_NUM_THREADS=4 +if [[ "$JOB_NAME" == *asan* ]]; then + export PATH="/usr/lib/llvm-5.0/bin:$PATH" + export ASAN_OPTIONS=detect_leaks=0:symbolize=1 + export PYTORCH_TEST_WITH_ASAN=1 +fi + # JIT C++ extensions require ninja. git clone https://github.com/ninja-build/ninja --quiet pushd ninja @@ -47,6 +53,10 @@ python ./configure.py --bootstrap export PATH="$PWD:$PATH" popd +if [[ "$JOB_NAME" == *asan* ]]; then + export LD_PRELOAD=/usr/lib/llvm-5.0/lib/clang/5.0.0/lib/linux/libclang_rt.asan-x86_64.so +fi + time test/run_test.sh -- -v rm -rf ninja |