Skip to content

Commit b1a824d

Browse files
committed
Merge bitcoin#24291: build: Remove negated --enable-fuzz checks from build system
fa7cbc6 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 fa7cbc6 Tree-SHA512: 2eca26d365fe1d60ff7b87c882a441273cc64bc5eefdc10ec1a0975db24f9b47f591ce8ef53f14eb02d8e3271510e503bfd1a3d09a5d1b35fe44f531f318e87e
2 parents e3b06e8 + fa7cbc6 commit b1a824d

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

configure.ac

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,6 +1303,7 @@ if test "$enable_fuzz" = "yes"; then
13031303
bitcoin_enable_qt_test=no
13041304
bitcoin_enable_qt_dbus=no
13051305
use_bench=no
1306+
use_tests=no
13061307
use_external_signer=no
13071308
use_upnp=no
13081309
use_natpmp=no
@@ -1559,7 +1560,7 @@ fi
15591560
dnl libevent check
15601561

15611562
use_libevent=no
1562-
if test "$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench" != "nonononono"; then
1563+
if test "$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$enable_fuzz_binary$use_tests$use_bench" != "nononononono"; then
15631564
PKG_CHECK_MODULES([EVENT], [libevent >= 2.1.8], [use_libevent=yes], [AC_MSG_ERROR([libevent version 2.1.8 or greater not found.])])
15641565
if test "$TARGET_OS" != "windows"; then
15651566
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
18461847
AC_MSG_RESULT([no])
18471848
fi
18481849

1849-
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
1850-
AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui --enable-bench or --enable-tests])
1850+
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
1851+
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])
18511852
fi
18521853

18531854
AM_CONDITIONAL([TARGET_DARWIN], [test "$TARGET_OS" = "darwin"])

src/Makefile.am

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,9 +1053,7 @@ include Makefile.leveldb.include
10531053
include Makefile.test_util.include
10541054
include Makefile.test_fuzz.include
10551055

1056-
if ENABLE_TESTS
10571056
include Makefile.test.include
1058-
endif
10591057

10601058
if ENABLE_BENCH
10611059
include Makefile.bench.include

src/Makefile.test.include

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if ENABLE_FUZZ_BINARY
66
noinst_PROGRAMS += test/fuzz/fuzz
77
endif
88

9-
if !ENABLE_FUZZ
9+
if ENABLE_TESTS
1010
bin_PROGRAMS += test/test_bitcoin
1111
endif
1212

@@ -371,7 +371,7 @@ endif
371371
endif
372372
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
373373

374-
if !ENABLE_FUZZ
374+
if ENABLE_TESTS
375375
UNIVALUE_TESTS = univalue/test/object univalue/test/unitester univalue/test/no_nul
376376
noinst_PROGRAMS += $(UNIVALUE_TESTS)
377377
TESTS += $(UNIVALUE_TESTS)

0 commit comments

Comments
 (0)