Skip to content

Commit

Permalink
test: need ASAN testing in commit process
Browse files Browse the repository at this point in the history
Added ASAN testing in commit process, used clang-8 for
ASAN build under debian-buster image. Added for testing
only the passing test suites, the rest of the tests
not used and will be enabled during issue #4360.

Due to the lack of LTO testing for 1.10 branch, all LTO
related changes have been stripped from the original commit.

Also added skip condition files for tests:
  box/func_reload
  box/function1
which fail only on 1.10 with ASAN.

Closes #4359

(partly cherry picked from commit 55f7586)
  • Loading branch information
avtikhon authored and kyukhin committed Nov 26, 2019
1 parent cf99b51 commit 6f8c7ac
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitlab-ci.yml
Expand Up @@ -85,6 +85,11 @@ release_lto_clang8:
script:
- ${GITLAB_MAKE} test_debian_no_deps

release_asan_clang8:
<<: *docker_test_clang8_definition
script:
- ${GITLAB_MAKE} test_asan_debian_no_deps

osx_13_release:
<<: *release_only_definition
<<: *vbox_definition
Expand Down
22 changes: 22 additions & 0 deletions .travis.mk
Expand Up @@ -17,6 +17,7 @@ test: test_$(TRAVIS_OS_NAME)
# Redirect some targets via docker
test_linux: docker_test_debian
coverage: docker_coverage_debian
asan: docker_test_asan_debian

docker_%:
mkdir -p ~/.cache/ccache
Expand Down Expand Up @@ -69,6 +70,8 @@ deps_buster_clang_8: deps_debian
apt-get update
apt-get install -y clang-8 llvm-8-dev

# Release

build_debian:
cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON ${CMAKE_EXTRA_PARAMS}
make -j
Expand All @@ -78,6 +81,10 @@ test_debian_no_deps: build_debian

test_debian: deps_debian test_debian_no_deps

test_debian_clang8: deps_debian deps_buster_clang_8 test_debian_no_deps

# Debug with coverage

build_coverage_debian:
cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_GCOV=ON
make -j
Expand All @@ -98,6 +105,21 @@ test_coverage_debian_no_deps: build_coverage_debian

coverage_debian: deps_debian test_coverage_debian_no_deps

# ASAN

build_asan_debian:
CC=clang-8 CXX=clang++-8 cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON ${CMAKE_EXTRA_PARAMS}
CC=clang-8 CXX=clang++-8 cmake . -DENABLE_ASAN=ON ${CMAKE_EXTRA_PARAMS}
make -j

test_asan_debian_no_deps: build_asan_debian
# temporary excluded engine/ and replication/ suites with some tests from other suites by issue #4360
cd test && ASAN=ON ASAN_OPTIONS=detect_leaks=0 ./test-run.py --force $(TEST_RUN_EXTRA_PARAMS) \
app/ app-tap/ box/ box-py/ box-tap/ engine_long/ long_run-py/ luajit-tap/ \
replication-py/ small/ sql/ sql-tap/ swim/ unit/ vinyl/ wal_off/ xlog/ xlog-py/

test_asan_debian: deps_debian deps_buster_clang_8 test_asan_debian_no_deps

#######
# OSX #
#######
Expand Down
7 changes: 7 additions & 0 deletions test/app-tap/json.skipcond
@@ -0,0 +1,7 @@
import os

# Disabled at ASAN build due to issue #4360.
if os.getenv("ASAN") == 'ON':
self.skip = 1

# vim: set ft=python:
7 changes: 7 additions & 0 deletions test/box/func_reload.skipcond
@@ -0,0 +1,7 @@
import os

# Disabled at ASAN build due to issue #4360.
if os.getenv("ASAN") == 'ON':
self.skip = 1

# vim: set ft=python:
7 changes: 7 additions & 0 deletions test/box/function1.skipcond
@@ -0,0 +1,7 @@
import os

# Disabled at ASAN build due to issue #4360.
if os.getenv("ASAN") == 'ON':
self.skip = 1

# vim: set ft=python:
7 changes: 7 additions & 0 deletions test/unit/guard.skipcond
@@ -0,0 +1,7 @@
import os

# Disabled at ASAN build due to issue #4360.
if os.getenv("ASAN") == 'ON':
self.skip = 1

# vim: set ft=python:
7 changes: 7 additions & 0 deletions test/unit/msgpack.skipcond
@@ -0,0 +1,7 @@
import os

# Disabled at ASAN build due to issue #4360.
if os.getenv("ASAN") == 'ON':
self.skip = 1

# vim: set ft=python:

0 comments on commit 6f8c7ac

Please sign in to comment.