]>
Commit | Line | Data |
---|---|---|
be434929 | 1 | TESTS += test/test_bitcoin |
65e8ba4d CF |
2 | bin_PROGRAMS += test/test_bitcoin |
3 | TEST_SRCDIR = test | |
4 | TEST_BINARY=test/test_bitcoin$(EXEEXT) | |
5 | ||
d7893863 JG |
6 | |
7 | EXTRA_DIST += \ | |
8 | test/bctest.py \ | |
9 | test/bitcoin-util-test.py \ | |
10 | test/data/bitcoin-util-test.json \ | |
df4d61e6 JG |
11 | test/data/blanktx.hex \ |
12 | test/data/tt-delin1-out.hex \ | |
13 | test/data/tt-delout1-out.hex \ | |
14 | test/data/tt-locktime317000-out.hex \ | |
15 | test/data/tx394b54bb.hex \ | |
a65e3207 | 16 | test/data/txcreate1.hex \ |
2c14d153 ES |
17 | test/data/txcreate2.hex \ |
18 | test/data/txcreatesign.hex | |
d7893863 | 19 | |
65e8ba4d CF |
20 | JSON_TEST_FILES = \ |
21 | test/data/script_valid.json \ | |
22 | test/data/base58_keys_valid.json \ | |
65e8ba4d CF |
23 | test/data/base58_encode_decode.json \ |
24 | test/data/base58_keys_invalid.json \ | |
25 | test/data/script_invalid.json \ | |
26 | test/data/tx_invalid.json \ | |
27 | test/data/tx_valid.json \ | |
e1ff849d SB |
28 | test/data/sighash.json \ |
29 | test/data/merkle_roots.json \ | |
bf2e3122 | 30 | test/data/merkle_roots_empty.json \ |
e1ff849d SB |
31 | test/data/merkle_serialization.json \ |
32 | test/data/merkle_witness_serialization.json \ | |
f0dab51c SB |
33 | test/data/merkle_path.json \ |
34 | test/data/g1_compressed.json \ | |
35 | test/data/g2_compressed.json | |
65e8ba4d CF |
36 | |
37 | RAW_TEST_FILES = test/data/alertTests.raw | |
38 | ||
39 | GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h) | |
40 | ||
41 | BITCOIN_TESTS =\ | |
bfc60703 | 42 | test/arith_uint256_tests.cpp \ |
65e8ba4d | 43 | test/bignum.h \ |
8375e1a3 | 44 | test/addrman_tests.cpp \ |
65e8ba4d CF |
45 | test/alert_tests.cpp \ |
46 | test/allocator_tests.cpp \ | |
47 | test/base32_tests.cpp \ | |
48 | test/base58_tests.cpp \ | |
49 | test/base64_tests.cpp \ | |
26414ca4 | 50 | test/bip32_tests.cpp \ |
65e8ba4d | 51 | test/bloom_tests.cpp \ |
65e8ba4d CF |
52 | test/checkblock_tests.cpp \ |
53 | test/Checkpoints_tests.cpp \ | |
ed27e53c | 54 | test/coins_tests.cpp \ |
771d5002 | 55 | test/compress_tests.cpp \ |
3820e01e | 56 | test/crypto_tests.cpp \ |
65e8ba4d | 57 | test/DoS_tests.cpp \ |
020bed60 | 58 | test/equihash_tests.cpp \ |
65e8ba4d | 59 | test/getarg_tests.cpp \ |
977cdade | 60 | test/hash_tests.cpp \ |
65e8ba4d CF |
61 | test/key_tests.cpp \ |
62 | test/main_tests.cpp \ | |
ad9e86dc | 63 | test/mempool_tests.cpp \ |
65e8ba4d CF |
64 | test/miner_tests.cpp \ |
65 | test/mruset_tests.cpp \ | |
66 | test/multisig_tests.cpp \ | |
67 | test/netbase_tests.cpp \ | |
68 | test/pmt_tests.cpp \ | |
b649e039 | 69 | test/policyestimator_tests.cpp \ |
34e5015c | 70 | test/pow_tests.cpp \ |
6b51b9b1 | 71 | test/reverselock_tests.cpp \ |
65e8ba4d | 72 | test/rpc_tests.cpp \ |
d58c5d6f | 73 | test/sanity_tests.cpp \ |
68d370be | 74 | test/scheduler_tests.cpp \ |
65e8ba4d CF |
75 | test/script_P2SH_tests.cpp \ |
76 | test/script_tests.cpp \ | |
771d5002 | 77 | test/scriptnum_tests.cpp \ |
65e8ba4d | 78 | test/serialize_tests.cpp \ |
771d5002 | 79 | test/sighash_tests.cpp \ |
65e8ba4d | 80 | test/sigopcount_tests.cpp \ |
236982c2 | 81 | test/skiplist_tests.cpp \ |
65e8ba4d | 82 | test/test_bitcoin.cpp \ |
51598b26 | 83 | test/test_bitcoin.h \ |
d1e26d4e | 84 | test/timedata_tests.cpp \ |
65e8ba4d | 85 | test/transaction_tests.cpp \ |
dba2e914 | 86 | test/uint256_tests.cpp \ |
e85267be | 87 | test/univalue_tests.cpp \ |
8466467a | 88 | test/util_tests.cpp \ |
6850b45e | 89 | test/sha256compress_tests.cpp |
65e8ba4d CF |
90 | |
91 | if ENABLE_WALLET | |
92 | BITCOIN_TESTS += \ | |
93 | test/accounting_tests.cpp \ | |
50c72f23 | 94 | wallet/test/wallet_tests.cpp \ |
65e8ba4d CF |
95 | test/rpc_wallet_tests.cpp |
96 | endif | |
97 | ||
98 | test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES) | |
fd7c139e | 99 | test_test_bitcoin_CPPFLAGS = -fopenmp $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS) |
cbe39a38 | 100 | test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \ |
6850b45e | 101 | $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1) |
65e8ba4d CF |
102 | if ENABLE_WALLET |
103 | test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET) | |
104 | endif | |
55668266 | 105 | |
08d6b02d | 106 | test_test_bitcoin_LDADD += $(LIBZCASH_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBZCASH) $(LIBZCASH_LIBS) |
f6185770 | 107 | test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static |
65e8ba4d CF |
108 | |
109 | nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES) | |
110 | ||
111 | $(BITCOIN_TESTS): $(GENERATED_TEST_FILES) | |
112 | ||
113 | CLEAN_BITCOIN_TEST = test/*.gcda test/*.gcno $(GENERATED_TEST_FILES) | |
114 | ||
115 | CLEANFILES += $(CLEAN_BITCOIN_TEST) | |
116 | ||
117 | bitcoin_test: $(TEST_BINARY) | |
118 | ||
119 | bitcoin_test_check: $(TEST_BINARY) FORCE | |
120 | $(MAKE) check-TESTS TESTS=$^ | |
121 | ||
122 | bitcoin_test_clean : FORCE | |
123 | rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY) | |
6b9f0d55 | 124 | |
4300876c | 125 | check-local: |
be434929 CF |
126 | @echo "Running test/bitcoin-util-test.py..." |
127 | $(AM_V_at)srcdir=$(srcdir) PYTHONPATH=$(builddir)/test $(srcdir)/test/bitcoin-util-test.py | |
4300876c CF |
128 | $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check |
129 | ||
6b9f0d55 CF |
130 | %.json.h: %.json |
131 | @$(MKDIR_P) $(@D) | |
132 | @echo "namespace json_tests{" > $@ | |
133 | @echo "static unsigned const char $(*F)[] = {" >> $@ | |
134 | @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@ | |
135 | @echo "};};" >> $@ | |
136 | @echo "Generated $@" | |
137 | ||
138 | %.raw.h: %.raw | |
139 | @$(MKDIR_P) $(@D) | |
140 | @echo "namespace alert_tests{" > $@ | |
141 | @echo "static unsigned const char $(*F)[] = {" >> $@ | |
142 | @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@ | |
143 | @echo "};};" >> $@ | |
144 | @echo "Generated $@" |