Skip to content

Commit 73a8408

Browse files
author
MarcoFalke
committed
Merge bitcoin#14092: tests: Dry run bench_bitcoin as part "make check" to allow for quick identification of assertion/sanitizer failures in benchmarking code
dfef0df tests: Dry run bench_bitcoin (-evals=1 -scaling=0: <1 second running time) as part "make check" to allow for quick identification of assertion/sanitizer failures in benchmarking code (practicalswift) 00c6306 Remove RUN_BENCH logic (practicalswift) Pull request description: Dry run `bench_bitcoin` (`-evals=1 -scaling=0`: <1 second running time) as part `make check` to allow for quick identification of assertion/sanitizer failures or crashes in benchmarking code. This is already tested in Travis but it is nice to have it locally too. The cost is near zero. Tree-SHA512: 1f51b86b34bf97f75785f2694891d80f1bfb3e050211e6f6c35d8d9bc80c75bdebaa5ebfa51855ac0cf76d8773c3026bc576f60d0227afb0e646d728b83abde7
2 parents dac2caa + dfef0df commit 73a8408

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

.travis.yml

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ env:
1616
- MAKEJOBS=-j3
1717
- RUN_UNIT_TESTS=true
1818
- RUN_FUNCTIONAL_TESTS=true
19-
- RUN_BENCH=false # Set to true for any one job that has debug enabled, to quickly check bench is not crashing or hitting assertions
2019
- DOCKER_NAME_TAG=ubuntu:18.04
2120
- BOOST_TEST_RANDOM=1$TRAVIS_BUILD_ID
2221
- CCACHE_SIZE=100M
@@ -118,7 +117,6 @@ jobs:
118117
HOST=x86_64-unknown-linux-gnu
119118
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"
120119
NO_DEPENDS=1
121-
RUN_BENCH=true
122120
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
123121
GOAL="install"
124122
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++"

.travis/test_06_script.sh

-6
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ if [ "$RUN_UNIT_TESTS" = "true" ]; then
5050
END_FOLD
5151
fi
5252

53-
if [ "$RUN_BENCH" = "true" ]; then
54-
BEGIN_FOLD bench
55-
DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib $OUTDIR/bin/bench_bitcoin -scaling=0.001
56-
END_FOLD
57-
fi
58-
5953
if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
6054
extended="--extended --exclude feature_pruning"
6155
fi

src/Makefile.test.include

+15
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,15 @@ CLEAN_BITCOIN_TEST = test/*.gcda test/*.gcno $(GENERATED_TEST_FILES) $(BITCOIN_T
169169

170170
CLEANFILES += $(CLEAN_BITCOIN_TEST)
171171

172+
if TARGET_WINDOWS
172173
bitcoin_test: $(TEST_BINARY)
174+
else
175+
if ENABLE_BENCH
176+
bitcoin_test: $(TEST_BINARY) $(BENCH_BINARY)
177+
else
178+
bitcoin_test: $(TEST_BINARY)
179+
endif
180+
endif
173181

174182
bitcoin_test_check: $(TEST_BINARY) FORCE
175183
$(MAKE) check-TESTS TESTS=$^
@@ -184,6 +192,13 @@ if BUILD_BITCOIN_TX
184192
endif
185193
@echo "Running test/util/rpcauth-test.py..."
186194
$(PYTHON) $(top_builddir)/test/util/rpcauth-test.py
195+
if TARGET_WINDOWS
196+
else
197+
if ENABLE_BENCH
198+
@echo "Running bench/bench_bitcoin -evals=1 -scaling=0..."
199+
$(BENCH_BINARY) -evals=1 -scaling=0 > /dev/null
200+
endif
201+
endif
187202
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
188203
if EMBEDDED_UNIVALUE
189204
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C univalue check

0 commit comments

Comments
 (0)