]>
Commit | Line | Data |
---|---|---|
d7893863 | 1 | TESTS += test/test_bitcoin test/bitcoin-util-test.py |
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 \ | |
11 | test/data/blanktx.hex | |
12 | ||
65e8ba4d CF |
13 | JSON_TEST_FILES = \ |
14 | test/data/script_valid.json \ | |
15 | test/data/base58_keys_valid.json \ | |
16 | test/data/sig_canonical.json \ | |
17 | test/data/sig_noncanonical.json \ | |
18 | test/data/base58_encode_decode.json \ | |
19 | test/data/base58_keys_invalid.json \ | |
20 | test/data/script_invalid.json \ | |
21 | test/data/tx_invalid.json \ | |
22 | test/data/tx_valid.json \ | |
23 | test/data/sighash.json | |
24 | ||
25 | RAW_TEST_FILES = test/data/alertTests.raw | |
26 | ||
27 | GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h) | |
28 | ||
29 | BITCOIN_TESTS =\ | |
30 | test/bignum.h \ | |
31 | test/alert_tests.cpp \ | |
32 | test/allocator_tests.cpp \ | |
33 | test/base32_tests.cpp \ | |
34 | test/base58_tests.cpp \ | |
35 | test/base64_tests.cpp \ | |
36 | test/bloom_tests.cpp \ | |
37 | test/canonical_tests.cpp \ | |
38 | test/checkblock_tests.cpp \ | |
39 | test/Checkpoints_tests.cpp \ | |
40 | test/compress_tests.cpp \ | |
3820e01e | 41 | test/crypto_tests.cpp \ |
65e8ba4d CF |
42 | test/DoS_tests.cpp \ |
43 | test/getarg_tests.cpp \ | |
977cdade | 44 | test/hash_tests.cpp \ |
65e8ba4d CF |
45 | test/key_tests.cpp \ |
46 | test/main_tests.cpp \ | |
47 | test/miner_tests.cpp \ | |
48 | test/mruset_tests.cpp \ | |
49 | test/multisig_tests.cpp \ | |
50 | test/netbase_tests.cpp \ | |
51 | test/pmt_tests.cpp \ | |
52 | test/rpc_tests.cpp \ | |
53 | test/script_P2SH_tests.cpp \ | |
54 | test/script_tests.cpp \ | |
55 | test/serialize_tests.cpp \ | |
56 | test/sigopcount_tests.cpp \ | |
236982c2 | 57 | test/skiplist_tests.cpp \ |
65e8ba4d CF |
58 | test/test_bitcoin.cpp \ |
59 | test/transaction_tests.cpp \ | |
60 | test/uint256_tests.cpp \ | |
61 | test/util_tests.cpp \ | |
62 | test/scriptnum_tests.cpp \ | |
63 | test/sighash_tests.cpp | |
64 | ||
65 | if ENABLE_WALLET | |
66 | BITCOIN_TESTS += \ | |
67 | test/accounting_tests.cpp \ | |
68 | test/wallet_tests.cpp \ | |
69 | test/rpc_wallet_tests.cpp | |
70 | endif | |
71 | ||
72 | test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES) | |
f4d81129 | 73 | test_test_bitcoin_CPPFLAGS = $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS) |
cbe39a38 | 74 | test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \ |
65e8ba4d CF |
75 | $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) |
76 | if ENABLE_WALLET | |
77 | test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET) | |
78 | endif | |
55668266 CF |
79 | |
80 | if USE_LIBSECP256K1 | |
81 | test_test_bitcoin_LDADD += secp256k1/libsecp256k1.la | |
82 | endif | |
83 | ||
6b099402 | 84 | test_test_bitcoin_LDADD += $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) |
e432a5f0 | 85 | test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) |
65e8ba4d CF |
86 | |
87 | nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES) | |
88 | ||
89 | $(BITCOIN_TESTS): $(GENERATED_TEST_FILES) | |
90 | ||
91 | CLEAN_BITCOIN_TEST = test/*.gcda test/*.gcno $(GENERATED_TEST_FILES) | |
92 | ||
93 | CLEANFILES += $(CLEAN_BITCOIN_TEST) | |
94 | ||
95 | bitcoin_test: $(TEST_BINARY) | |
96 | ||
97 | bitcoin_test_check: $(TEST_BINARY) FORCE | |
98 | $(MAKE) check-TESTS TESTS=$^ | |
99 | ||
100 | bitcoin_test_clean : FORCE | |
101 | rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY) | |
6b9f0d55 CF |
102 | |
103 | %.json.h: %.json | |
104 | @$(MKDIR_P) $(@D) | |
105 | @echo "namespace json_tests{" > $@ | |
106 | @echo "static unsigned const char $(*F)[] = {" >> $@ | |
107 | @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@ | |
108 | @echo "};};" >> $@ | |
109 | @echo "Generated $@" | |
110 | ||
111 | %.raw.h: %.raw | |
112 | @$(MKDIR_P) $(@D) | |
113 | @echo "namespace alert_tests{" > $@ | |
114 | @echo "static unsigned const char $(*F)[] = {" >> $@ | |
115 | @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@ | |
116 | @echo "};};" >> $@ | |
117 | @echo "Generated $@" |