Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 89ddd0b

Browse files
tcm-marcelpervazea
authored andcommitted
Enable tests with Address Sanitizer for Mac builds on Travis (#1315) (#1335)
* [travis] Enable checks with Address Sanitizer for Mac builds * Installing missing ant package on Mac
1 parent cbf4b89 commit 89ddd0b

File tree

2 files changed

+20
-48
lines changed

2 files changed

+20
-48
lines changed

.travis.yml

Lines changed: 19 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ matrix:
1010
compiler: clang
1111
env:
1212
# NAME has no actual use, just to make the travis jobs overview more clear
13-
- NAME="clang Debug"
13+
- NAME="clang Debug/Tests/AddressSanitizer"
1414
- PELOTON_BUILD_TYPE=Debug
15+
- SANITIZER=Address
1516
- COVERALLS=Off
1617

1718
# Linux builds for gcc 5
@@ -32,31 +33,8 @@ matrix:
3233
- CXX=g++-5
3334
- CC=gcc-5
3435
- PELOTON_BUILD_TYPE=Debug
36+
- SANITIZER=Address
3537
- COVERALLS=On
36-
# override script value to run also tests and benchmarks
37-
script:
38-
# create build directory
39-
- mkdir build
40-
- cd build
41-
# run cmake. NOTE: the PATH is made explicit to avoid automatic selection of the preinstalled llvm version in the Travis trusty image
42-
- PATH=/usr/lib/llvm-3.7/bin:/usr/bin:$PATH cmake -DCOVERALLS=$COVERALLS -DCMAKE_PREFIX_PATH=`llvm-config-3.7 --prefix` -DCMAKE_BUILD_TYPE=$PELOTON_BUILD_TYPE -DUSE_SANITIZER=Address ..
43-
# build
44-
- make -j4
45-
# run tests
46-
- if [[ $TRAVIS_OS_NAME != 'osx' ]]; then make check -j4; fi
47-
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then ASAN_OPTIONS=detect_container_overflow=0 make check -j4; fi
48-
# build benchmarks
49-
- make benchmark -j4
50-
# install peloton
51-
- make install
52-
# run psql tests
53-
- bash ../script/testing/psql/psql_test.sh
54-
# run jdbc tests
55-
- python ../script/validators/jdbc_validator.py
56-
# run junit tests
57-
- python ../script/testing/junit/run_junit.py
58-
# upload coverage info
59-
- make coveralls
6038

6139
- os: linux
6240
sudo: required
@@ -75,29 +53,8 @@ matrix:
7553
- CXX=g++-5
7654
- CC=gcc-5
7755
- PELOTON_BUILD_TYPE=Release
56+
- SANITIZER=
7857
- COVERALLS=Off
79-
# override script value to run also tests and benchmarks
80-
script:
81-
# create build directory
82-
- mkdir build
83-
- cd build
84-
# run cmake. NOTE: the PATH is made explicit to avoid automatic selection of the preinstalled llvm version in the Travis trusty image
85-
- PATH=/usr/lib/llvm-3.7/bin:/usr/bin:$PATH cmake -DCOVERALLS=$COVERALLS -DCMAKE_PREFIX_PATH=`llvm-config-3.7 --prefix` -DCMAKE_BUILD_TYPE=$PELOTON_BUILD_TYPE -DUSE_SANITIZER=Address ..
86-
# build
87-
- make -j4
88-
# run tests
89-
- if [[ $TRAVIS_OS_NAME != 'osx' ]]; then make check -j4; fi
90-
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then ASAN_OPTIONS=detect_container_overflow=0 make check -j4; fi
91-
# build benchmarks
92-
- make benchmark -j4
93-
# install peloton
94-
- make install
95-
# run psql tests
96-
- bash ../script/testing/psql/psql_test.sh
97-
# run jdbc tests
98-
- python ../script/validators/jdbc_validator.py
99-
# run junit tests
100-
- python ../script/testing/junit/run_junit.py
10158

10259
install:
10360
# setup environment
@@ -114,6 +71,20 @@ script:
11471
- mkdir build
11572
- cd build
11673
# run cmake. NOTE: the PATH is made explicit to avoid automatic selection of the preinstalled llvm version in the Travis trusty image
117-
- PATH=/usr/lib/llvm-3.7/bin:/usr/bin:$PATH cmake -DCOVERALLS=$COVERALLS -DCMAKE_PREFIX_PATH=`llvm-config-3.7 --prefix` -DCMAKE_BUILD_TYPE=$PELOTON_BUILD_TYPE -DUSE_SANITIZER=Address ..
74+
- PATH=/usr/lib/llvm-3.7/bin:/usr/bin:$PATH cmake -DCOVERALLS=$COVERALLS -DCMAKE_PREFIX_PATH=`llvm-config-3.7 --prefix` -DCMAKE_BUILD_TYPE=$PELOTON_BUILD_TYPE -DUSE_SANITIZER=$SANITIZER ..
11875
# build
11976
- make -j4
77+
# run tests
78+
- if [[ $TRAVIS_OS_NAME != 'osx' ]]; then make check -j4; fi
79+
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then ASAN_OPTIONS=detect_container_overflow=0 make check -j4; fi
80+
# install peloton
81+
- make install
82+
# run psql tests
83+
- bash ../script/testing/psql/psql_test.sh
84+
# run jdbc tests
85+
- python ../script/validators/jdbc_validator.py
86+
# run junit tests
87+
- if [[ $TRAVIS_OS_NAME != 'osx' ]]; then python ../script/testing/junit/run_junit.py; fi
88+
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then ASAN_OPTIONS=detect_container_overflow=0 python ../script/testing/junit/run_junit.py; fi
89+
# upload coverage info
90+
- if [[ $TRAVIS_OS_NAME == 'On' ]]; then make coveralls; fi

script/installation/packages.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ elif [ "$DISTRO" = "DARWIN" ]; then
353353
brew install python
354354
brew upgrade python
355355
brew install eigen
356+
brew install ant
356357
# Brew installs correct version of Protobuf(3.5.1 >= 3.4.0)
357358
# So we can directly install tensorflow
358359
install_tf "$TFCApiFile" "$TF_VERSION" "$LinkerConfigCmd"

0 commit comments

Comments
 (0)