Add ZeroMQ support. Notify blocks and transactions via ZeroMQ
[bitcoinplatinum.git] / src / Makefile.test.include
blobcee35926a5d752c8217eaf6156b74390f656a6e7
1 TESTS += test/test_bitcoin
2 bin_PROGRAMS += test/test_bitcoin
3 TEST_SRCDIR = test
4 TEST_BINARY=test/test_bitcoin$(EXEEXT)
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         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 \
16         test/data/txcreate1.hex \
17         test/data/txcreate2.hex \
18         test/data/txcreatedata1.hex \
19         test/data/txcreatedata2.hex \
20         test/data/txcreatesign.hex
22 JSON_TEST_FILES = \
23   test/data/script_valid.json \
24   test/data/base58_keys_valid.json \
25   test/data/base58_encode_decode.json \
26   test/data/base58_keys_invalid.json \
27   test/data/script_invalid.json \
28   test/data/tx_invalid.json \
29   test/data/tx_valid.json \
30   test/data/sighash.json
32 RAW_TEST_FILES = test/data/alertTests.raw
34 GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h)
36 BITCOIN_TESTS =\
37   test/arith_uint256_tests.cpp \
38   test/bignum.h \
39   test/alert_tests.cpp \
40   test/allocator_tests.cpp \
41   test/base32_tests.cpp \
42   test/base58_tests.cpp \
43   test/base64_tests.cpp \
44   test/bip32_tests.cpp \
45   test/bloom_tests.cpp \
46   test/checkblock_tests.cpp \
47   test/Checkpoints_tests.cpp \
48   test/coins_tests.cpp \
49   test/compress_tests.cpp \
50   test/crypto_tests.cpp \
51   test/DoS_tests.cpp \
52   test/getarg_tests.cpp \
53   test/hash_tests.cpp \
54   test/key_tests.cpp \
55   test/limitedmap_tests.cpp \
56   test/main_tests.cpp \
57   test/mempool_tests.cpp \
58   test/miner_tests.cpp \
59   test/mruset_tests.cpp \
60   test/multisig_tests.cpp \
61   test/netbase_tests.cpp \
62   test/pmt_tests.cpp \
63   test/policyestimator_tests.cpp \
64   test/pow_tests.cpp \
65   test/reverselock_tests.cpp \
66   test/rpc_tests.cpp \
67   test/sanity_tests.cpp \
68   test/scheduler_tests.cpp \
69   test/script_P2SH_tests.cpp \
70   test/script_tests.cpp \
71   test/scriptnum_tests.cpp \
72   test/serialize_tests.cpp \
73   test/sighash_tests.cpp \
74   test/sigopcount_tests.cpp \
75   test/skiplist_tests.cpp \
76   test/test_bitcoin.cpp \
77   test/test_bitcoin.h \
78   test/timedata_tests.cpp \
79   test/transaction_tests.cpp \
80   test/txvalidationcache_tests.cpp \
81   test/uint256_tests.cpp \
82   test/univalue_tests.cpp \
83   test/util_tests.cpp
85 if ENABLE_WALLET
86 BITCOIN_TESTS += \
87   test/accounting_tests.cpp \
88   wallet/test/wallet_tests.cpp \
89   test/rpc_wallet_tests.cpp
90 endif
92 test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
93 test_test_bitcoin_CPPFLAGS = $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)
94 test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
95   $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1)
96 if ENABLE_WALLET
97 test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
98 endif
100 test_test_bitcoin_LDADD += $(LIBBITCOIN_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
101 test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static
103 if ENABLE_ZMQ
104 test_test_bitcoin_LDADD += $(ZMQ_LIBS)
105 endif
107 nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
109 $(BITCOIN_TESTS): $(GENERATED_TEST_FILES)
111 CLEAN_BITCOIN_TEST = test/*.gcda test/*.gcno $(GENERATED_TEST_FILES)
113 CLEANFILES += $(CLEAN_BITCOIN_TEST)
115 bitcoin_test: $(TEST_BINARY)
117 bitcoin_test_check: $(TEST_BINARY) FORCE
118         $(MAKE) check-TESTS TESTS=$^
120 bitcoin_test_clean : FORCE
121         rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)
123 check-local:
124         @echo "Running test/bitcoin-util-test.py..."
125         $(AM_V_at)srcdir=$(srcdir) PYTHONPATH=$(builddir)/test $(srcdir)/test/bitcoin-util-test.py
126         $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
128 %.json.h: %.json
129         @$(MKDIR_P) $(@D)
130         @echo "namespace json_tests{" > $@
131         @echo "static unsigned const char $(*F)[] = {" >> $@
132         @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x  ,//g' >> $@
133         @echo "};};" >> $@
134         @echo "Generated $@"
136 %.raw.h: %.raw
137         @$(MKDIR_P) $(@D)
138         @echo "namespace alert_tests{" > $@
139         @echo "static unsigned const char $(*F)[] = {" >> $@
140         @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x  ,//g' >> $@
141         @echo "};};" >> $@
142         @echo "Generated $@"