Skip to content

Commit f063863

Browse files
committed
build: Remove unnecessary executables from gitian release
This removes the following executables from the binary gitian release: - test_bitcoin-qt[.exe] - bench_bitcoin[.exe] @jonasschnelli and me discussed this on IRC a few days ago - unlike the normal `bitcoin_tests` which is useful to see if it is safe to run bitcoin on a certain OS/environment combination, there is no good reason to include these. Better to leave them out to reduce the download size. Sizes from the 0.12 release: ``` 2.4M bitcoin-0.12.0/bin/bench_bitcoin.exe 22M bitcoin-0.12.0/bin/test_bitcoin-qt.exe ```
1 parent 28ad4d9 commit f063863

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

configure.ac

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ AC_ARG_ENABLE(tests,
9898
[use_tests=$enableval],
9999
[use_tests=yes])
100100

101+
AC_ARG_ENABLE(gui-tests,
102+
AS_HELP_STRING([--disable-gui-tests],[do not compile GUI tests (default is to compile if GUI and tests enabled)]),
103+
[use_gui_tests=$enableval],
104+
[use_gui_tests=$use_tests])
105+
101106
AC_ARG_ENABLE(bench,
102107
AS_HELP_STRING([--disable-bench],[do not compile benchmarks (default is to compile)]),
103108
[use_bench=$enableval],
@@ -919,8 +924,8 @@ else
919924
fi
920925

921926
dnl these are only used when qt is enabled
927+
BUILD_TEST_QT=""
922928
if test x$bitcoin_enable_qt != xno; then
923-
BUILD_QT=qt
924929
dnl enable dbus support
925930
AC_MSG_CHECKING([whether to build GUI with support for D-Bus])
926931
if test x$bitcoin_enable_qt_dbus != xno; then
@@ -950,9 +955,9 @@ if test x$bitcoin_enable_qt != xno; then
950955
fi
951956

952957
AC_MSG_CHECKING([whether to build test_bitcoin-qt])
953-
if test x$use_tests$bitcoin_enable_qt_test = xyesyes; then
958+
if test x$use_gui_tests$bitcoin_enable_qt_test = xyesyes; then
954959
AC_MSG_RESULT([yes])
955-
BUILD_TEST_QT="test"
960+
BUILD_TEST_QT="yes"
956961
else
957962
AC_MSG_RESULT([no])
958963
fi
@@ -963,9 +968,10 @@ AM_CONDITIONAL([ENABLE_ZMQ], [test "x$use_zmq" = "xyes"])
963968
AC_MSG_CHECKING([whether to build test_bitcoin])
964969
if test x$use_tests = xyes; then
965970
AC_MSG_RESULT([yes])
966-
BUILD_TEST="test"
971+
BUILD_TEST="yes"
967972
else
968973
AC_MSG_RESULT([no])
974+
BUILD_TEST=""
969975
fi
970976

971977
AC_MSG_CHECKING([whether to reduce exports])
@@ -983,9 +989,9 @@ AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin])
983989
AM_CONDITIONAL([BUILD_DARWIN], [test x$BUILD_OS = xdarwin])
984990
AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
985991
AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes])
986-
AM_CONDITIONAL([ENABLE_TESTS],[test x$use_tests = xyes])
992+
AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = xyes])
987993
AM_CONDITIONAL([ENABLE_QT],[test x$bitcoin_enable_qt = xyes])
988-
AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$use_tests$bitcoin_enable_qt_test = xyesyes])
994+
AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$BUILD_TEST_QT = xyes])
989995
AM_CONDITIONAL([ENABLE_BENCH],[test x$use_bench = xyes])
990996
AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes])
991997
AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes])
@@ -1026,9 +1032,6 @@ AC_SUBST(USE_QRCODE)
10261032
AC_SUBST(BOOST_LIBS)
10271033
AC_SUBST(TESTDEFS)
10281034
AC_SUBST(LEVELDB_TARGET_FLAGS)
1029-
AC_SUBST(BUILD_TEST)
1030-
AC_SUBST(BUILD_QT)
1031-
AC_SUBST(BUILD_TEST_QT)
10321035
AC_SUBST(MINIUPNPC_CPPFLAGS)
10331036
AC_SUBST(MINIUPNPC_LIBS)
10341037
AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py])

contrib/gitian-descriptors/gitian-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ files: []
2626
script: |
2727
WRAP_DIR=$HOME/wrapped
2828
HOSTS="i686-pc-linux-gnu x86_64-unknown-linux-gnu"
29-
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"
29+
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests LDFLAGS=-static-libstdc++"
3030
FAKETIME_HOST_PROGS=""
3131
FAKETIME_PROGS="date ar ranlib nm strip"
3232

contrib/gitian-descriptors/gitian-osx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ files:
3636
script: |
3737
WRAP_DIR=$HOME/wrapped
3838
HOSTS="x86_64-apple-darwin11"
39-
CONFIGFLAGS="--enable-reduce-exports GENISOIMAGE=$WRAP_DIR/genisoimage"
39+
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage"
4040
FAKETIME_HOST_PROGS=""
4141
FAKETIME_PROGS="ar ranlib date dmg genisoimage"
4242

contrib/gitian-descriptors/gitian-win.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ files: []
2929
script: |
3030
WRAP_DIR=$HOME/wrapped
3131
HOSTS="x86_64-w64-mingw32 i686-w64-mingw32"
32-
CONFIGFLAGS="--enable-reduce-exports"
32+
CONFIGFLAGS="--enable-reduce-exports --disable-gui-tests"
3333
FAKETIME_HOST_PROGS="g++ ar ranlib nm windres strip"
3434
FAKETIME_PROGS="date makensis zip"
3535

0 commit comments

Comments
 (0)