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 tesing 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 durring issue #4360. Also
fixed job for testing LTO with clang on debian-buster
in travis-ci, changed it to the same as in gitlab-ci,
changed default clang to clang-8.

Closes #4359
  • Loading branch information
avtikhon authored and kyukhin committed Jul 19, 2019
1 parent 1a2addb commit 55f7586
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ release_lto_clang8:
script:
- ${GITLAB_MAKE} test_debian_no_deps

release_asan_clang8:
image: ${IMAGE_TEST_LTO}
stage: test
tags:
- docker_test
script:
- ${GITLAB_MAKE} test_asan_debian_no_deps

osx_13_release:
only:
refs:
Expand Down
26 changes: 26 additions & 0 deletions .travis.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ test: test_$(TRAVIS_OS_NAME)
# Redirect some targets via docker
test_linux: docker_test_debian
coverage: docker_coverage_debian
lto: docker_test_debian
lto_clang8: docker_test_debian_clang8
asan: docker_test_asan_debian

docker_%:
mkdir -p ~/.cache/ccache
Expand All @@ -39,6 +42,8 @@ docker_%:
# Linux #
#########

# Depends

deps_debian:
apt-get update ${APT_EXTRA_FLAGS} && apt-get install -y -f \
build-essential cmake coreutils sed \
Expand All @@ -55,6 +60,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 @@ -64,6 +71,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 @@ -84,6 +95,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
16 changes: 12 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,19 @@ jobs:
os: osx
osx_image: xcode9.4
if: branch = "master"
# Special targets (only LTO for now).
# Special targets for LTO.
- name: "LTO build + test (Linux, gcc)"
env: >
TARGET=test
TARGET=lto
CMAKE_EXTRA_PARAMS=-DENABLE_LTO=ON
DOCKER_IMAGE=packpack/packpack:debian-buster
APT_EXTRA_FLAGS="--allow-releaseinfo-change-version --allow-releaseinfo-change-suite"
if: branch = "master"
- name: "LTO build + test (Linux, clang)"
- name: "LTO build + test (Linux, clang8)"
env: >
TARGET=test
TARGET=lto_clang8
CC=clang-8
CXX=clang++-8
CMAKE_EXTRA_PARAMS=-DENABLE_LTO=ON
DOCKER_IMAGE=packpack/packpack:debian-buster
APT_EXTRA_FLAGS="--allow-releaseinfo-change-version --allow-releaseinfo-change-suite"
Expand All @@ -58,6 +60,12 @@ jobs:
os: osx
env: TARGET=test CMAKE_EXTRA_PARAMS=-DENABLE_LTO=ON
if: branch = "master"
# Special targets for ASAN.
- name: "ASAN build + test (Linux, clang8)"
env: >
TARGET=asan
DOCKER_IMAGE=packpack/packpack:debian-buster
APT_EXTRA_FLAGS="--allow-releaseinfo-change-version --allow-releaseinfo-change-suite"
# Deploy targets (they also catch distro-specific problems).
- name: "Create and deploy tarball"
env: TARGET=source
Expand Down
7 changes: 7 additions & 0 deletions test/app-tap/json.skipcond
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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 55f7586

Please sign in to comment.