From 55f7586ac36760f31255fee7b70606f466f30e04 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Wed, 17 Jul 2019 10:50:25 +0300 Subject: [PATCH] test: need ASAN testing in commit process 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 --- .gitlab-ci.yml | 8 ++++++++ .travis.mk | 26 ++++++++++++++++++++++++++ .travis.yml | 16 ++++++++++++---- test/app-tap/json.skipcond | 7 +++++++ test/unit/guard.skipcond | 7 +++++++ test/unit/msgpack.skipcond | 7 +++++++ 6 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 test/app-tap/json.skipcond create mode 100644 test/unit/guard.skipcond create mode 100644 test/unit/msgpack.skipcond diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 818a84fe049e..a7b2b3804704 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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: diff --git a/.travis.mk b/.travis.mk index fbbe0f79ad33..720108f2a5f9 100644 --- a/.travis.mk +++ b/.travis.mk @@ -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 @@ -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 \ @@ -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 @@ -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 @@ -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 # ####### diff --git a/.travis.yml b/.travis.yml index 4e5c0e2e2ec8..61c887296e3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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" @@ -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 diff --git a/test/app-tap/json.skipcond b/test/app-tap/json.skipcond new file mode 100644 index 000000000000..e46fd1088322 --- /dev/null +++ b/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: diff --git a/test/unit/guard.skipcond b/test/unit/guard.skipcond new file mode 100644 index 000000000000..e46fd1088322 --- /dev/null +++ b/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: diff --git a/test/unit/msgpack.skipcond b/test/unit/msgpack.skipcond new file mode 100644 index 000000000000..e46fd1088322 --- /dev/null +++ b/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: