]> Git Repo - VerusCoin.git/blob - src/Makefile.test.include
Auto merge of #3202 - str4d:3058-sapling-bech32, r=str4d
[VerusCoin.git] / src / Makefile.test.include
1 TESTS += test/test_bitcoin
2 noinst_PROGRAMS += test/test_bitcoin
3 TEST_SRCDIR = test
4 TEST_BINARY=test/test_bitcoin$(EXEEXT)
5
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         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/txcreatesign.hex
19
20 JSON_TEST_FILES = \
21   test/data/script_valid.json \
22   test/data/base58_keys_valid.json \
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 \
28   test/data/sighash.json \
29   test/data/merkle_roots.json \
30   test/data/merkle_roots_empty.json \
31   test/data/merkle_serialization.json \
32   test/data/merkle_witness_serialization.json \
33   test/data/merkle_path.json \
34   test/data/merkle_commitments.json \
35   test/data/merkle_roots_sapling.json \
36   test/data/merkle_roots_empty_sapling.json \
37   test/data/merkle_serialization_sapling.json \
38   test/data/merkle_witness_serialization_sapling.json \
39   test/data/merkle_path_sapling.json \
40   test/data/merkle_commitments_sapling.json \
41   test/data/g1_compressed.json \
42   test/data/g2_compressed.json
43
44 RAW_TEST_FILES = test/data/alertTests.raw
45
46 GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h)
47
48 BITCOIN_TESTS =\
49   test/arith_uint256_tests.cpp \
50   test/bignum.h \
51   test/addrman_tests.cpp \
52   test/alert_tests.cpp \
53   test/allocator_tests.cpp \
54   test/base32_tests.cpp \
55   test/base58_tests.cpp \
56   test/base64_tests.cpp \
57   test/bech32_tests.cpp \
58   test/bip32_tests.cpp \
59   test/bloom_tests.cpp \
60   test/checkblock_tests.cpp \
61   test/Checkpoints_tests.cpp \
62   test/coins_tests.cpp \
63   test/compress_tests.cpp \
64   test/crypto_tests.cpp \
65   test/DoS_tests.cpp \
66   test/equihash_tests.cpp \
67   test/getarg_tests.cpp \
68   test/hash_tests.cpp \
69   test/key_tests.cpp \
70   test/dbwrapper_tests.cpp \
71   test/main_tests.cpp \
72   test/mempool_tests.cpp \
73   test/miner_tests.cpp \
74   test/mruset_tests.cpp \
75   test/multisig_tests.cpp \
76   test/netbase_tests.cpp \
77   test/pmt_tests.cpp \
78   test/policyestimator_tests.cpp \
79   test/pow_tests.cpp \
80   test/prevector_tests.cpp \
81   test/raii_event_tests.cpp \
82   test/reverselock_tests.cpp \
83   test/rpc_tests.cpp \
84   test/sanity_tests.cpp \
85   test/scheduler_tests.cpp \
86   test/script_P2SH_tests.cpp \
87   test/script_tests.cpp \
88   test/scriptnum_tests.cpp \
89   test/serialize_tests.cpp \
90   test/sighash_tests.cpp \
91   test/sigopcount_tests.cpp \
92   test/skiplist_tests.cpp \
93   test/test_bitcoin.cpp \
94   test/test_bitcoin.h \
95   test/timedata_tests.cpp \
96   test/torcontrol_tests.cpp \
97   test/transaction_tests.cpp \
98   test/uint256_tests.cpp \
99   test/univalue_tests.cpp \
100   test/util_tests.cpp \
101   test/sha256compress_tests.cpp
102
103 if ENABLE_WALLET
104 BITCOIN_TESTS += \
105   test/accounting_tests.cpp \
106   wallet/test/wallet_tests.cpp \
107   test/rpc_wallet_tests.cpp
108 endif
109
110 test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
111 test_test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS) $(EVENT_CFLAGS)
112 test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
113   $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
114 test_test_bitcoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
115 if ENABLE_WALLET
116 test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
117 endif
118
119 test_test_bitcoin_LDADD += $(LIBZCASH_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(LIBZCASH) $(LIBSNARK) $(LIBZCASH_LIBS)
120 test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static
121
122 if ENABLE_ZMQ
123 test_test_bitcoin_LDADD += $(ZMQ_LIBS)
124 endif
125
126 if ENABLE_PROTON
127 test_test_bitcoin_LDADD += $(PROTON_LIBS)
128 endif
129
130 nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
131
132 $(BITCOIN_TESTS): $(GENERATED_TEST_FILES)
133
134 CLEAN_BITCOIN_TEST = test/*.gcda test/*.gcno $(GENERATED_TEST_FILES)
135
136 CLEANFILES += $(CLEAN_BITCOIN_TEST)
137
138 bitcoin_test: $(TEST_BINARY)
139
140 bitcoin_test_check: $(TEST_BINARY) FORCE
141         $(MAKE) check-TESTS TESTS=$^
142
143 bitcoin_test_clean : FORCE
144         rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)
145
146 check-local:
147         @echo "Running test/bitcoin-util-test.py..."
148         $(AM_V_at)srcdir=$(srcdir) PYTHONPATH=$(builddir)/test $(srcdir)/test/bitcoin-util-test.py
149         $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
150         $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C univalue check
151
152 %.json.h: %.json
153         @$(MKDIR_P) $(@D)
154         @echo "namespace json_tests{" > $@
155         @echo "static unsigned const char $(*F)[] = {" >> $@
156         @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x  ,//g' >> $@
157         @echo "};};" >> $@
158         @echo "Generated $@"
159
160 %.raw.h: %.raw
161         @$(MKDIR_P) $(@D)
162         @echo "namespace alert_tests{" > $@
163         @echo "static unsigned const char $(*F)[] = {" >> $@
164         @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x  ,//g' >> $@
165         @echo "};};" >> $@
166         @echo "Generated $@"
This page took 0.032328 seconds and 4 git commands to generate.