-
Notifications
You must be signed in to change notification settings - Fork 172
/
Makefile.test.include
executable file
·141 lines (120 loc) · 4.21 KB
/
Makefile.test.include
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/licenses/mit-license.php.
TESTS += test/test_gridcoin
bin_PROGRAMS += test/test_gridcoin
TEST_SRCDIR = test
TEST_BINARY=test/test_gridcoin$(EXEEXT)
JSON_TEST_FILES = \
test/data/base58_encode_decode.json \
test/data/key_io_invalid.json \
test/data/key_io_valid.json \
test/data/script_valid.json \
test/data/script_invalid.json \
test/data/tx_invalid.json \
test/data/tx_valid.json
BINARY_TEST_FILES = \
test/data/mainnet_beacon.bin \
test/data/superblock_packed.bin \
test/data/testnet_beacon.bin
TEXT_TEST_FILES = \
test/data/superblock.txt \
test/data/superblock_unpacked.txt
GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(BINARY_TEST_FILES:.bin=.bin.h) $(TEXT_TEST_FILES:.txt=.txt.h)
# test_n binary #
GRIDCOIN_TESTS =\
test/checkpoints_tests.cpp \
test/dos_tests.cpp \
test/accounting_tests.cpp \
test/addrman_tests.cpp \
test/allocator_tests.cpp \
test/base32_tests.cpp \
test/base58_tests.cpp \
test/base64_tests.cpp \
test/bip32_tests.cpp \
test/compilerbug_tests.cpp \
test/crypto_tests.cpp \
test/fs_tests.cpp \
test/getarg_tests.cpp \
test/gridcoin_tests.cpp \
test/gridcoin/beacon_tests.cpp \
test/gridcoin/block_finder_tests.cpp \
test/gridcoin/claim_tests.cpp \
test/gridcoin/contract_tests.cpp \
test/gridcoin/cpid_tests.cpp \
test/gridcoin/enumbytes_tests.cpp \
test/gridcoin/magnitude_tests.cpp \
test/gridcoin/mrc_tests.cpp \
test/gridcoin/project_tests.cpp \
test/gridcoin/protocol_tests.cpp \
test/gridcoin/researcher_tests.cpp \
test/gridcoin/scraper_registry_tests.cpp \
test/gridcoin/sidestake_tests.cpp \
test/gridcoin/superblock_tests.cpp \
test/key_tests.cpp \
test/key_io_tests.cpp \
test/merkle_tests.cpp \
test/mruset_tests.cpp \
test/multisig_tests.cpp \
test/netbase_tests.cpp \
test/net_tests.cpp \
test/random_tests.cpp \
test/rpc_tests.cpp \
test/sanity_tests.cpp \
test/scheduler_tests.cpp \
test/script_p2sh_tests.cpp \
test/script_tests.cpp \
test/serialize_tests.cpp \
test/sigopcount_tests.cpp \
test/sync_tests.cpp \
test/test_gridcoin.cpp \
test/test_gridcoin.h \
test/transaction_tests.cpp \
test/uint256_tests.cpp \
test/util_tests.cpp \
test/wallet_tests.cpp
test_test_gridcoin_SOURCES = $(GRIDCOIN_TESTS) $(JSON_TEST_FILES) $(BINARY_TEST_FILES) $(TEXT_TEST_FILES)
test_test_gridcoin_CPPFLAGS = $(AM_CPPFLAGS) $(GRIDCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS) $(EVENT_CFLAGS)
test_test_gridcoin_LDADD = $(LIBGRIDCOIN_UTIL) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBLEVELDB_SSE42) $(LIBMEMENV) $(LIBSECP256K1) $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(EVENT_LIBS) $(EVENT_PTHREADS_LIBS) $(CURL_LIBS) $(LIBZIP_LIBS)
test_test_gridcoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
test_test_gridcoin_LDADD += $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBGRIDCOIN_CRYPTO)
test_test_gridcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static
if ENABLE_WALLET
if EMBEDDED_BDB
test_test_gridcoin_LDADD += $(LIBDB)
else
test_test_gridcoin_LDADD += $(BDB_LIBS)
endif
endif
nodist_test_test_gridcoin_SOURCES = $(GENERATED_TEST_FILES)
$(GRIDCOIN_TESTS): $(GENERATED_TEST_FILES)
CLEAN_GRIDCOIN_TEST = test/*.gcda test/*.gcno $(GENERATED_TEST_FILES)
CLEANFILES += $(CLEAN_GRIDCOIN_TEST)
gridcoin_test: $(TEST_BINARY)
gridcoin_test_check: $(TEST_BINARY) FORCE
$(MAKE) check-TESTS TESTS=$^
gridcoin_test_clean : FORCE
rm -f $(CLEAN_GRIDCOIN_TEST) $(test_test_GRIDCOIN_OBJECTS) $(TEST_BINARY)
%.json.h: %.json
@$(MKDIR_P) $(@D)
@{ \
echo "namespace json_tests{" && \
echo "static unsigned const char $(*F)[] = {" && \
$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \
echo "};};"; \
} > "[email protected]" && mv -f "[email protected]" "$@"
@echo "Generated $@"
%.bin.h: %.bin
@$(MKDIR_P) $(@D)
@{ \
echo "static unsigned const char $(*F)_bin[] = {" && \
$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \
echo "};"; \
} > "[email protected]" && mv -f "[email protected]" "$@"
@echo "Generated $@"
%.txt.h: %.txt
@$(MKDIR_P) $(@D)
@{ \
echo "static const std::string $(*F)_text = R\"(" && cat $< && echo ")\";"; \
} > "[email protected]" && mv -f "[email protected]" "$@"
@echo "Generated $@"