0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-03 09:56:38 -05:00

Merge bitcoin/bitcoin#24291: build: Remove negated --enable-fuzz checks from build system

fa7cbc6e5c build: Remove negated --enable-fuzz checks from build system (MarcoFalke)

Pull request description:

  It is confusing to enable the unit test binary with `ENABLE_TESTS && !ENABLE_FUZZ`, but every other binary is enabled with a simple flag. For example `ENABLE_BENCH`, or `ENABLE_FUZZ_BINARY`.

  Fix that by turning `ENABLE_TESTS` back into meaning "enable unit test binary".

ACKs for top commit:
  laanwj:
    Code review re-ACK fa7cbc6e5c

Tree-SHA512: 2eca26d365fe1d60ff7b87c882a441273cc64bc5eefdc10ec1a0975db24f9b47f591ce8ef53f14eb02d8e3271510e503bfd1a3d09a5d1b35fe44f531f318e87e
This commit is contained in:
laanwj 2022-06-22 10:28:51 +02:00
commit b1a824dd06
No known key found for this signature in database
GPG key ID: 1E4AED62986CD25D
3 changed files with 6 additions and 7 deletions

View file

@ -1303,6 +1303,7 @@ if test "$enable_fuzz" = "yes"; then
bitcoin_enable_qt_test=no
bitcoin_enable_qt_dbus=no
use_bench=no
use_tests=no
use_external_signer=no
use_upnp=no
use_natpmp=no
@ -1559,7 +1560,7 @@ fi
dnl libevent check
use_libevent=no
if test "$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench" != "nonononono"; then
if test "$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$enable_fuzz_binary$use_tests$use_bench" != "nononononono"; then
PKG_CHECK_MODULES([EVENT], [libevent >= 2.1.8], [use_libevent=yes], [AC_MSG_ERROR([libevent version 2.1.8 or greater not found.])])
if test "$TARGET_OS" != "windows"; then
PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads >= 2.1.8], [], [AC_MSG_ERROR([libevent_pthreads version 2.1.8 or greater not found.])])
@ -1846,8 +1847,8 @@ else
AC_MSG_RESULT([no])
fi
if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests" = "nononononononono"; then
AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui --enable-bench or --enable-tests])
if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$enable_fuzz_binary$use_bench$use_tests" = "nonononononononono"; then
AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui --enable-fuzz(-binary) --enable-bench or --enable-tests])
fi
AM_CONDITIONAL([TARGET_DARWIN], [test "$TARGET_OS" = "darwin"])

View file

@ -1053,9 +1053,7 @@ include Makefile.leveldb.include
include Makefile.test_util.include
include Makefile.test_fuzz.include
if ENABLE_TESTS
include Makefile.test.include
endif
if ENABLE_BENCH
include Makefile.bench.include

View file

@ -6,7 +6,7 @@ if ENABLE_FUZZ_BINARY
noinst_PROGRAMS += test/fuzz/fuzz
endif
if !ENABLE_FUZZ
if ENABLE_TESTS
bin_PROGRAMS += test/test_bitcoin
endif
@ -371,7 +371,7 @@ endif
endif
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
if !ENABLE_FUZZ
if ENABLE_TESTS
UNIVALUE_TESTS = univalue/test/object univalue/test/unitester univalue/test/no_nul
noinst_PROGRAMS += $(UNIVALUE_TESTS)
TESTS += $(UNIVALUE_TESTS)