File tree Expand file tree Collapse file tree 5 files changed +40
-30
lines changed
Expand file tree Collapse file tree 5 files changed +40
-30
lines changed Original file line number Diff line number Diff line change @@ -717,6 +717,8 @@ if EMBEDDED_LEVELDB
717717include Makefile.leveldb.include
718718endif
719719
720+ include Makefile.test_util.include
721+
720722if ENABLE_TESTS
721723include Makefile.test.include
722724endif
Original file line number Diff line number Diff line change @@ -40,10 +40,6 @@ bench_bench_bitcoin_SOURCES = \
4040 bench/lockedpool.cpp \
4141 bench/poly1305.cpp \
4242 bench/prevector.cpp \
43- test/util/transaction_utils.h \
44- test/util/transaction_utils.cpp \
45- test/util/setup_common.h \
46- test/util/setup_common.cpp \
4743 test/util.h \
4844 test/util.cpp
4945
@@ -59,6 +55,7 @@ bench_bench_bitcoin_LDADD = \
5955 $(LIBBITCOIN_UTIL) \
6056 $(LIBBITCOIN_CONSENSUS) \
6157 $(LIBBITCOIN_CRYPTO) \
58+ $(LIBTEST_UTIL) \
6259 $(LIBLEVELDB) \
6360 $(LIBLEVELDB_SSE42) \
6461 $(LIBMEMENV) \
Original file line number Diff line number Diff line change @@ -26,12 +26,6 @@ TEST_QT_H = \
2626 qt/test/util.h \
2727 qt/test/wallettests.h
2828
29- TEST_BITCOIN_CPP = \
30- test/util/setup_common.cpp
31-
32- TEST_BITCOIN_H = \
33- test/util/setup_common.h
34-
3529qt_test_test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
3630 $(QT_INCLUDES) $(QT_TEST_INCLUDES)
3731
@@ -42,9 +36,7 @@ qt_test_test_bitcoin_qt_SOURCES = \
4236 qt/test/test_main.cpp \
4337 qt/test/uritests.cpp \
4438 qt/test/util.cpp \
45- $(TEST_QT_H) \
46- $(TEST_BITCOIN_CPP) \
47- $(TEST_BITCOIN_H)
39+ $(TEST_QT_H)
4840if ENABLE_WALLET
4941qt_test_test_bitcoin_qt_SOURCES += \
5042 qt/test/addressbooktests.cpp \
@@ -54,7 +46,7 @@ endif # ENABLE_WALLET
5446
5547nodist_qt_test_test_bitcoin_qt_SOURCES = $(TEST_QT_MOC_CPP)
5648
57- qt_test_test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER)
49+ qt_test_test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER) $(LIBTEST_UTIL)
5850if ENABLE_WALLET
5951qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_UTIL) $(LIBBITCOIN_WALLET)
6052endif
Original file line number Diff line number Diff line change @@ -58,31 +58,19 @@ RAW_TEST_FILES =
5858GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h)
5959
6060BITCOIN_TEST_SUITE = \
61- test/util/blockfilter.cpp \
62- test/util/blockfilter.h \
63- test/util/logging.cpp \
64- test/util/logging.h \
65- test/util/transaction_utils.cpp \
66- test/util/transaction_utils.h \
6761 test/main.cpp \
68- test/util/setup_common.h \
69- test/util/setup_common.cpp \
70- test/util/str.h \
71- test/util/str.cpp
62+ $(TEST_UTIL_H)
7263
7364FUZZ_SUITE = \
7465 test/fuzz/fuzz.cpp \
7566 test/fuzz/fuzz.h \
76- test/fuzz/FuzzedDataProvider.h \
77- test/util/setup_common.cpp \
78- test/util/setup_common.h \
79- test/util/str.cpp \
80- test/util/str.h
67+ test/fuzz/FuzzedDataProvider.h
8168
8269FUZZ_SUITE_LD_COMMON = \
8370 $(LIBBITCOIN_SERVER) \
8471 $(LIBBITCOIN_COMMON) \
8572 $(LIBBITCOIN_UTIL) \
73+ $(LIBTEST_UTIL) \
8674 $(LIBBITCOIN_CONSENSUS) \
8775 $(LIBBITCOIN_CRYPTO) \
8876 $(LIBUNIVALUE) \
@@ -198,7 +186,7 @@ endif
198186
199187test_test_bitcoin_SOURCES = $(BITCOIN_TEST_SUITE) $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
200188test_test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(TESTDEFS) $(EVENT_CFLAGS)
201- test_test_bitcoin_LDADD =
189+ test_test_bitcoin_LDADD = $(LIBTEST_UTIL)
202190if ENABLE_WALLET
203191test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
204192endif
Original file line number Diff line number Diff line change 1+ # Copyright (c) 2013-2019 The Bitcoin Core developers
2+ # Distributed under the MIT software license, see the accompanying
3+ # file COPYING or http://www.opensource.org/licenses/mit-license.php.
4+
5+ LIBTEST_UTIL=libtest_util.a
6+
7+ EXTRA_LIBRARIES += \
8+ $(LIBTEST_UTIL)
9+
10+ TEST_UTIL_H = \
11+ test/util/blockfilter.h \
12+ test/util/logging.h \
13+ test/util/setup_common.h \
14+ test/util/str.h \
15+ test/util/transaction_utils.h
16+
17+ libtest_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS)
18+ libtest_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
19+ libtest_util_a_SOURCES = \
20+ test/util/blockfilter.cpp \
21+ test/util/logging.cpp \
22+ test/util/setup_common.cpp \
23+ test/util/str.cpp \
24+ test/util/transaction_utils.cpp \
25+ $(TEST_UTIL_H)
26+
27+ LIBTEST_UTIL += $(LIBBITCOIN_SERVER)
28+ LIBTEST_UTIL += $(LIBBITCOIN_COMMON)
29+ LIBTEST_UTIL += $(LIBBITCOIN_UTIL)
30+ LIBTEST_UTIL += $(LIBBITCOIN_CRYPTO_BASE)
31+
You can’t perform that action at this time.
0 commit comments