mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Run clang tests with ASAN
This commit is contained in:
parent
e2ae644ffa
commit
62f707610e
@ -165,14 +165,14 @@ jobs:
|
|||||||
- test/soltest
|
- test/soltest
|
||||||
- test/tools/solfuzzer
|
- test/tools/solfuzzer
|
||||||
|
|
||||||
build_x86_clang7:
|
build_x86_clang7_asan:
|
||||||
docker:
|
docker:
|
||||||
- image: buildpack-deps:cosmic
|
- image: buildpack-deps:cosmic
|
||||||
environment:
|
environment:
|
||||||
TERM: xterm
|
TERM: xterm
|
||||||
CC: /usr/bin/clang-7
|
CC: /usr/bin/clang-7
|
||||||
CXX: /usr/bin/clang++-7
|
CXX: /usr/bin/clang++-7
|
||||||
CMAKE_OPTIONS: -DLLL=ON
|
CMAKE_OPTIONS: -DSANITIZE=address -DCMAKE_BUILD_TYPE=Debug
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
@ -183,6 +183,13 @@ jobs:
|
|||||||
./scripts/install_obsolete_jsoncpp_1_7_4.sh
|
./scripts/install_obsolete_jsoncpp_1_7_4.sh
|
||||||
- run: *setup_prerelease_commit_hash
|
- run: *setup_prerelease_commit_hash
|
||||||
- run: *run_build
|
- run: *run_build
|
||||||
|
- store_artifacts: *solc_artifact
|
||||||
|
- persist_to_workspace:
|
||||||
|
root: build
|
||||||
|
paths:
|
||||||
|
- solc/solc
|
||||||
|
- test/soltest
|
||||||
|
- test/tools/solfuzzer
|
||||||
|
|
||||||
build_x86_mac:
|
build_x86_mac:
|
||||||
macos:
|
macos:
|
||||||
@ -283,6 +290,36 @@ jobs:
|
|||||||
path: test_results/
|
path: test_results/
|
||||||
destination: test_results/
|
destination: test_results/
|
||||||
|
|
||||||
|
test_x86_clang7_asan:
|
||||||
|
docker:
|
||||||
|
- image: buildpack-deps:cosmic
|
||||||
|
environment:
|
||||||
|
TERM: xterm
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- attach_workspace:
|
||||||
|
at: build
|
||||||
|
- run:
|
||||||
|
name: Install dependencies
|
||||||
|
command: |
|
||||||
|
apt-get -qq update
|
||||||
|
apt-get -qy install llvm-7-dev libcvc4-dev libleveldb1v5 python-pip
|
||||||
|
# This is needed to resolve the symbols. Since we're using clang7 in the build, we must use the appropriate symbolizer.
|
||||||
|
update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-7 1
|
||||||
|
- run: mkdir -p test_results
|
||||||
|
- run:
|
||||||
|
name: Run tests with ASAN
|
||||||
|
command: |
|
||||||
|
ulimit -a
|
||||||
|
# Increase stack size because ASan makes stack frames bigger and that breaks our assumptions (in tests).
|
||||||
|
ulimit -s 16384
|
||||||
|
build/test/soltest --logger=JUNIT,test_suite,test_results/result.xml -- --no-ipc --testpath test
|
||||||
|
- store_test_results:
|
||||||
|
path: test_results/
|
||||||
|
- store_artifacts:
|
||||||
|
path: test_results/
|
||||||
|
destination: test_results/
|
||||||
|
|
||||||
test_x86_archlinux:
|
test_x86_archlinux:
|
||||||
docker:
|
docker:
|
||||||
- image: archlinux/base
|
- image: archlinux/base
|
||||||
@ -366,12 +403,18 @@ workflows:
|
|||||||
- build_emscripten
|
- build_emscripten
|
||||||
- build_x86_linux: *build_on_tags
|
- build_x86_linux: *build_on_tags
|
||||||
- build_x86_linux_cxx17: *build_on_tags
|
- build_x86_linux_cxx17: *build_on_tags
|
||||||
- build_x86_clang7: *build_on_tags
|
- build_x86_clang7_asan: *build_on_tags
|
||||||
- build_x86_mac: *build_on_tags
|
- build_x86_mac: *build_on_tags
|
||||||
- test_x86_linux:
|
- test_x86_linux:
|
||||||
<<: *build_on_tags
|
<<: *build_on_tags
|
||||||
requires:
|
requires:
|
||||||
- build_x86_linux
|
- build_x86_linux
|
||||||
|
- test_x86_clang7_asan:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only: develop
|
||||||
|
requires:
|
||||||
|
- build_x86_clang7_asan
|
||||||
- test_x86_mac:
|
- test_x86_mac:
|
||||||
<<: *build_on_tags
|
<<: *build_on_tags
|
||||||
requires:
|
requires:
|
||||||
|
@ -74,7 +74,6 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
|
|||||||
# into errors, which makes sense.
|
# into errors, which makes sense.
|
||||||
# http://stackoverflow.com/questions/21617158/how-to-silence-unused-command-line-argument-error-with-clang-without-disabling-i
|
# http://stackoverflow.com/questions/21617158/how-to-silence-unused-command-line-argument-error-with-clang-without-disabling-i
|
||||||
add_compile_options(-Qunused-arguments)
|
add_compile_options(-Qunused-arguments)
|
||||||
|
|
||||||
elseif(EMSCRIPTEN)
|
elseif(EMSCRIPTEN)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --memory-init-file 0")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --memory-init-file 0")
|
||||||
# Leave only exported symbols as public and aggressively remove others
|
# Leave only exported symbols as public and aggressively remove others
|
||||||
|
Loading…
Reference in New Issue
Block a user