]> Git Repo - VerusCoin.git/blob - src/Makefile.test.include
Merge pull request #97 from miketout/dev
[VerusCoin.git] / src / Makefile.test.include
1 # Copyright (c) 2016-2019 The Zcash developers
2 # Copyright (c) 2013-2019 The Bitcoin Core developers
3 # Copyright (c) 2013-2019 Bitcoin Developers
4 # Distributed under the MIT software license, see the accompanying
5 # file COPYING or https://www.opensource.org/licenses/mit-license.php .
6
7 TESTS += test/test_bitcoin
8 noinst_PROGRAMS += test/test_bitcoin
9 TEST_SRCDIR = test
10 TEST_BINARY=test/test_bitcoin$(EXEEXT)
11
12
13 EXTRA_DIST += \
14         test/bctest.py \
15         test/bitcoin-util-test.py \
16         test/data/bitcoin-util-test.json \
17         test/data/blanktx.hex \
18         test/data/tt-delin1-out.hex \
19         test/data/tt-delout1-out.hex \
20         test/data/tt-locktime317000-out.hex \
21         test/data/tx394b54bb.hex \
22         test/data/txcreate1.hex \
23         test/data/txcreate2.hex \
24         test/data/txcreatesign.hex \
25         test/wallet-utility.py \
26         test/data/wallet.dat
27
28 JSON_TEST_FILES = \
29   test/data/script_valid.json \
30   test/data/base58_keys_valid.json \
31   test/data/base58_encode_decode.json \
32   test/data/base58_keys_invalid.json \
33   test/data/script_invalid.json \
34   test/data/tx_invalid.json \
35   test/data/tx_valid.json \
36   test/data/sighash.json \
37   test/data/merkle_roots.json \
38   test/data/merkle_roots_empty.json \
39   test/data/merkle_serialization.json \
40   test/data/merkle_witness_serialization.json \
41   test/data/merkle_path.json \
42   test/data/merkle_commitments.json \
43   test/data/merkle_roots_sapling.json \
44   test/data/merkle_roots_empty_sapling.json \
45   test/data/merkle_serialization_sapling.json \
46   test/data/merkle_witness_serialization_sapling.json \
47   test/data/merkle_path_sapling.json \
48   test/data/merkle_commitments_sapling.json \
49   test/data/g1_compressed.json \
50   test/data/g2_compressed.json \
51   test/data/sapling_key_components.json
52
53 RAW_TEST_FILES = test/data/alertTests.raw
54
55 GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h)
56
57 BITCOIN_TESTS =\
58   test/arith_uint256_tests.cpp \
59   test/bignum.h \
60   test/addrman_tests.cpp \
61   test/alert_tests.cpp \
62   test/allocator_tests.cpp \
63   test/base32_tests.cpp \
64   test/base58_tests.cpp \
65   test/base64_tests.cpp \
66   test/bech32_tests.cpp \
67   test/bip32_tests.cpp \
68   test/bloom_tests.cpp \
69   test/checkblock_tests.cpp \
70   test/Checkpoints_tests.cpp \
71   test/coins_tests.cpp \
72   test/compress_tests.cpp \
73   test/convertbits_tests.cpp \
74   test/crypto_tests.cpp \
75   test/DoS_tests.cpp \
76   test/equihash_tests.cpp \
77   test/getarg_tests.cpp \
78   test/hash_tests.cpp \
79   test/key_tests.cpp \
80   test/dbwrapper_tests.cpp \
81   test/main_tests.cpp \
82   test/mempool_tests.cpp \
83   test/miner_tests.cpp \
84   test/mruset_tests.cpp \
85   test/multisig_tests.cpp \
86   test/netbase_tests.cpp \
87   test/pmt_tests.cpp \
88   test/policyestimator_tests.cpp \
89   test/pow_tests.cpp \
90   test/prevector_tests.cpp \
91   test/raii_event_tests.cpp \
92   test/reverselock_tests.cpp \
93   test/rpc_tests.cpp \
94   test/sanity_tests.cpp \
95   test/scheduler_tests.cpp \
96   test/script_P2SH_tests.cpp \
97   test/script_P2PKH_tests.cpp \
98   test/script_tests.cpp \
99   test/scriptnum_tests.cpp \
100   test/serialize_tests.cpp \
101   test/sighash_tests.cpp \
102   test/sigopcount_tests.cpp \
103   test/skiplist_tests.cpp \
104   test/test_bitcoin.cpp \
105   test/test_bitcoin.h \
106   test/timedata_tests.cpp \
107   test/torcontrol_tests.cpp \
108   test/transaction_tests.cpp \
109   test/uint256_tests.cpp \
110   test/univalue_tests.cpp \
111   test/util_tests.cpp \
112   test/sha256compress_tests.cpp
113
114 if ENABLE_WALLET
115 BITCOIN_TESTS += \
116         test/accounting_tests.cpp \
117         wallet/test/wallet_tests.cpp \
118         test/rpc_wallet_tests.cpp
119 endif
120
121 test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
122 test_test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) -fopenmp $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS) $(EVENT_CFLAGS)
123 test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBVERUS_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
124   $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
125 test_test_bitcoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
126 if ENABLE_WALLET
127 test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
128 endif
129 test_test_bitcoin_LDADD += $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) \
130   $(LIBLEVELDB) $(LIBMEMENV) $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1) $(EVENT_LIBS) $(EVENT_PTHREADS_LIBS)
131 test_test_bitcoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
132
133 test_test_bitcoin_LDADD += $(LIBZCASH_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(LIBZCASH) $(LIBSNARK) $(LIBZCASH_LIBS)
134 test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static
135
136 if ENABLE_ZMQ
137 test_test_bitcoin_LDADD += $(ZMQ_LIBS)
138 endif
139
140 if ENABLE_PROTON
141 test_test_bitcoin_LDADD += $(PROTON_LIBS)
142 endif
143
144 nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
145
146 $(BITCOIN_TESTS): $(GENERATED_TEST_FILES)
147
148 CLEAN_BITCOIN_TEST = test/*.gcda test/*.gcno $(GENERATED_TEST_FILES)
149
150 CLEANFILES += $(CLEAN_BITCOIN_TEST)
151
152 bitcoin_test: $(TEST_BINARY)
153
154 bitcoin_test_check: $(TEST_BINARY) FORCE
155         $(MAKE) check-TESTS TESTS=$^
156
157 bitcoin_test_clean : FORCE
158         rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)
159
160 check-local:
161         @echo "Running test/bitcoin-util-test.py..."
162         $(AM_V_at)srcdir=$(srcdir) PYTHONPATH=$(builddir)/test $(srcdir)/test/bitcoin-util-test.py
163 if ENABLE_WALLET
164         @echo "Running test/wallet-utility.py..."
165         $(AM_V_at)srcdir=$(srcdir) PYTHONPATH=$(builddir)/test $(srcdir)/test/wallet-utility.py
166 endif
167         $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
168         $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C univalue check
169
170 %.json.h: %.json
171         @$(MKDIR_P) $(@D)
172         @echo "namespace json_tests{" > $@
173         @echo "static unsigned const char $(*F)[] = {" >> $@
174         @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x  ,//g' >> $@
175         @echo "};};" >> $@
176         @echo "Generated $@"
177
178 %.raw.h: %.raw
179         @$(MKDIR_P) $(@D)
180         @echo "namespace alert_tests{" > $@
181         @echo "static unsigned const char $(*F)[] = {" >> $@
182         @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x  ,//g' >> $@
183         @echo "};};" >> $@
184         @echo "Generated $@"
This page took 0.032747 seconds and 4 git commands to generate.