Skip to content

Commit 0ae15bd

Browse files
committed
Merge #14036: travis: Run unit tests --with-sanitizers=undefined
fad8afa travis: Run unit tests --with-sanitizers=undefined (MarcoFalke) 0d00fd5 depends: allow CC/CXX to be overridden during configure (Cory Fields) Pull request description: See issue #12691 Tree-SHA512: 0772e8e037411cb4664270945a0fc9c0c1ed24eeaf5308460baee707868f7b700d8e740a6babb1d02bc818a8a4b71d9e33601ab2cc850ff315755fcf3d79d29e
2 parents deed63f + fad8afa commit 0ae15bd

File tree

2 files changed

+25
-14
lines changed

2 files changed

+25
-14
lines changed

.travis.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ stages:
1414
env:
1515
global:
1616
- MAKEJOBS=-j3
17-
- RUN_TESTS=false
17+
- RUN_UNIT_TESTS=true
18+
- RUN_FUNCTIONAL_TESTS=true
1819
- RUN_BENCH=false # Set to true for any one job that has debug enabled, to quickly check bench is not crashing or hitting assertions
1920
- DOCKER_NAME_TAG=ubuntu:18.04
2021
- LC_ALL=C.UTF-8
@@ -59,10 +60,10 @@ script:
5960
- cd bitcoin-$HOST
6061
- BEGIN_FOLD configure; DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false); END_FOLD
6162
- BEGIN_FOLD build; DOCKER_EXEC make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1 ; false ); END_FOLD
62-
- if [ "$RUN_TESTS" = "true" ]; then BEGIN_FOLD unit-tests; DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1; END_FOLD; fi
63+
- if [ "$RUN_UNIT_TESTS" = "true" ]; then BEGIN_FOLD unit-tests; DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1; END_FOLD; fi
6364
- if [ "$RUN_BENCH" = "true" ]; then BEGIN_FOLD bench; DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib $OUTDIR/bin/bench_bitcoin -scaling=0.001 ; END_FOLD; fi
6465
- if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then extended="--extended --exclude feature_pruning,feature_dbcrash"; fi
65-
- if [ "$RUN_TESTS" = "true" ]; then BEGIN_FOLD functional-tests; DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 --coverage --quiet --failfast ${extended}; END_FOLD; fi
66+
- if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then BEGIN_FOLD functional-tests; DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 --coverage --quiet --failfast ${extended}; END_FOLD; fi
6667
after_script:
6768
- echo $TRAVIS_COMMIT_RANGE
6869
- echo $TRAVIS_COMMIT_LOG
@@ -74,6 +75,8 @@ jobs:
7475
HOST=arm-linux-gnueabihf
7576
PACKAGES="g++-arm-linux-gnueabihf"
7677
DEP_OPTS="NO_QT=1"
78+
RUN_UNIT_TESTS=false
79+
RUN_FUNCTIONAL_TESTS=false
7780
GOAL="install"
7881
BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
7982
# Win32
@@ -83,7 +86,6 @@ jobs:
8386
DPKG_ADD_ARCH="i386"
8487
DEP_OPTS="NO_QT=1"
8588
PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt wine32"
86-
RUN_TESTS=true
8789
GOAL="install"
8890
BITCOIN_CONFIG="--enable-reduce-exports"
8991
# Win64
@@ -92,7 +94,6 @@ jobs:
9294
HOST=x86_64-w64-mingw32
9395
DEP_OPTS="NO_QT=1"
9496
PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64"
95-
RUN_TESTS=true
9697
GOAL="install"
9798
BITCOIN_CONFIG="--enable-reduce-exports"
9899
# 32-bit + dash
@@ -101,7 +102,6 @@ jobs:
101102
HOST=i686-pc-linux-gnu
102103
PACKAGES="g++-multilib python3-zmq"
103104
DEP_OPTS="NO_QT=1"
104-
RUN_TESTS=true
105105
GOAL="install"
106106
BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"
107107
CONFIG_SHELL="/bin/dash"
@@ -111,26 +111,32 @@ jobs:
111111
HOST=x86_64-unknown-linux-gnu
112112
PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools protobuf-compiler libdbus-1-dev libharfbuzz-dev libprotobuf-dev"
113113
DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1"
114-
RUN_TESTS=true
115-
RUN_BENCH=true
116114
GOAL="install"
117115
BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports --enable-debug CXXFLAGS=\"-g0 -O2\""
118-
# x86_64 Linux (Qt5 & system libs)
116+
# x86_64 Linux (no depends, only system libs)
119117
- stage: test
120118
env: >-
121119
HOST=x86_64-unknown-linux-gnu
122120
PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libssl1.0-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev"
123121
NO_DEPENDS=1
124-
RUN_TESTS=true
125122
GOAL="install"
126123
BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --enable-glibc-back-compat --enable-reduce-exports --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER"
124+
# x86_64 Linux (sanitizers)
125+
- stage: test
126+
env: >-
127+
HOST=x86_64-unknown-linux-gnu
128+
PACKAGES="clang python3-zmq qtbase5-dev qttools5-dev-tools libssl1.0-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev"
129+
NO_DEPENDS=1
130+
RUN_BENCH=true
131+
RUN_FUNCTIONAL_TESTS=false # Disabled for now, can be combined with the other x86_64 linux NO_DEPENDS job when functional tests pass the sanitizers
132+
GOAL="install"
133+
BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --enable-glibc-back-compat --enable-reduce-exports --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER --with-sanitizers=undefined CC=clang CXX=clang++"
127134
# x86_64 Linux, No wallet
128135
- stage: test
129136
env: >-
130137
HOST=x86_64-unknown-linux-gnu
131138
PACKAGES="python3"
132139
DEP_OPTS="NO_WALLET=1"
133-
RUN_TESTS=true
134140
GOAL="install"
135141
BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
136142
# Cross-Mac
@@ -139,6 +145,8 @@ jobs:
139145
HOST=x86_64-apple-darwin14
140146
PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git"
141147
OSX_SDK=10.11
148+
RUN_UNIT_TESTS=false
149+
RUN_FUNCTIONAL_TESTS=false
142150
GOAL="all deploy"
143151
BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror"
144152
- stage: lint

depends/config.site.in

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,12 @@ fi
6161
CPPFLAGS="-I$depends_prefix/include/ $CPPFLAGS"
6262
LDFLAGS="-L$depends_prefix/lib $LDFLAGS"
6363

64-
CC="@CC@"
65-
CXX="@CXX@"
66-
OBJC="${CC}"
64+
if test -n "@CC@" -a -z "${CC}"; then
65+
CC="@CC@"
66+
fi
67+
if test -n "@CXX@" -a -z "${CXX}"; then
68+
CXX="@CXX@"
69+
fi
6770
PYTHONPATH=$depends_prefix/native/lib/python/dist-packages:$PYTHONPATH
6871

6972
if test -n "@AR@"; then

0 commit comments

Comments
 (0)