Merge #14092: tests: Dry run bench_bitcoin as part "make check" to allow for quick identification of assertion/sanitizer failures in benchmarking code

dfef0df840 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)
00c6306a61 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
This commit is contained in:
MarcoFalke 2018-11-05 09:30:23 -05:00
commit 73a8408bc3
No known key found for this signature in database
GPG key ID: D2EA4850E7528B25
3 changed files with 15 additions and 8 deletions

View file

@ -16,7 +16,6 @@ env:
- MAKEJOBS=-j3 - MAKEJOBS=-j3
- RUN_UNIT_TESTS=true - RUN_UNIT_TESTS=true
- RUN_FUNCTIONAL_TESTS=true - RUN_FUNCTIONAL_TESTS=true
- RUN_BENCH=false # Set to true for any one job that has debug enabled, to quickly check bench is not crashing or hitting assertions
- DOCKER_NAME_TAG=ubuntu:18.04 - DOCKER_NAME_TAG=ubuntu:18.04
- BOOST_TEST_RANDOM=1$TRAVIS_BUILD_ID - BOOST_TEST_RANDOM=1$TRAVIS_BUILD_ID
- CCACHE_SIZE=100M - CCACHE_SIZE=100M
@ -118,7 +117,6 @@ jobs:
HOST=x86_64-unknown-linux-gnu HOST=x86_64-unknown-linux-gnu
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" 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"
NO_DEPENDS=1 NO_DEPENDS=1
RUN_BENCH=true
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 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
GOAL="install" GOAL="install"
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++" 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++"

View file

@ -50,12 +50,6 @@ if [ "$RUN_UNIT_TESTS" = "true" ]; then
END_FOLD END_FOLD
fi fi
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
if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
extended="--extended --exclude feature_pruning" extended="--extended --exclude feature_pruning"
fi fi

View file

@ -169,7 +169,15 @@ CLEAN_BITCOIN_TEST = test/*.gcda test/*.gcno $(GENERATED_TEST_FILES) $(BITCOIN_T
CLEANFILES += $(CLEAN_BITCOIN_TEST) CLEANFILES += $(CLEAN_BITCOIN_TEST)
if TARGET_WINDOWS
bitcoin_test: $(TEST_BINARY) bitcoin_test: $(TEST_BINARY)
else
if ENABLE_BENCH
bitcoin_test: $(TEST_BINARY) $(BENCH_BINARY)
else
bitcoin_test: $(TEST_BINARY)
endif
endif
bitcoin_test_check: $(TEST_BINARY) FORCE bitcoin_test_check: $(TEST_BINARY) FORCE
$(MAKE) check-TESTS TESTS=$^ $(MAKE) check-TESTS TESTS=$^
@ -184,6 +192,13 @@ if BUILD_BITCOIN_TX
endif endif
@echo "Running test/util/rpcauth-test.py..." @echo "Running test/util/rpcauth-test.py..."
$(PYTHON) $(top_builddir)/test/util/rpcauth-test.py $(PYTHON) $(top_builddir)/test/util/rpcauth-test.py
if TARGET_WINDOWS
else
if ENABLE_BENCH
@echo "Running bench/bench_bitcoin -evals=1 -scaling=0..."
$(BENCH_BINARY) -evals=1 -scaling=0 > /dev/null
endif
endif
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
if EMBEDDED_UNIVALUE if EMBEDDED_UNIVALUE
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C univalue check $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C univalue check