Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand unit test coverage #453

Closed
wants to merge 56 commits into from
Closed
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
26843c9
wrap test chain funcs into class
jmjatlanta Jun 7, 2021
803f247
Merge branch 'dev' into jmj_testutils
jmjatlanta Aug 3, 2021
42859e5
Add alert tests
jmjatlanta Oct 26, 2021
bc97c3b
fix pub key
jmjatlanta Oct 26, 2021
037d902
Merge branch 'jmj_test_cleanup' into jmj_testutils
jmjatlanta Oct 27, 2021
948988c
Remove temp file
jmjatlanta Oct 28, 2021
bae9e3a
properly shutdown tests
jmjatlanta Oct 28, 2021
324a3dd
Move zcash tests to komodo
jmjatlanta Oct 28, 2021
fad7afb
serialize block header size test
jmjatlanta Oct 28, 2021
42bec82
mempool tests
jmjatlanta Oct 28, 2021
6e1257d
PoW tests
jmjatlanta Oct 28, 2021
defe10d
PoW min difficulty test
jmjatlanta Oct 28, 2021
6a331b8
Remove unnecessary header
jmjatlanta Oct 28, 2021
58aeb73
add txid tests
jmjatlanta Oct 28, 2021
abe48f6
Add coin_tests
jmjatlanta Oct 28, 2021
e8d9f80
Begin tests of ConnectBlock
jmjatlanta Nov 3, 2021
432c57f
fix for running all tests
jmjatlanta Nov 3, 2021
e46aae1
make static adjustable for unit testing
jmjatlanta Nov 3, 2021
399f9fb
Merge branch 'jmj_build_fix' into jmj_testutils
jmjatlanta Nov 3, 2021
fc14310
More ConnectBlock tests
jmjatlanta Nov 4, 2021
528d8f6
fix mempool nullptr
jmjatlanta Nov 4, 2021
16291af
Replace ptr with ref
jmjatlanta Nov 5, 2021
cfe4608
test double-spend in same block
jmjatlanta Nov 5, 2021
11991b3
Document mempool funcs
jmjatlanta Nov 9, 2021
4d1376d
Merge branch 'jmj_build_fix' into jmj_testutils
jmjatlanta Nov 9, 2021
c096f6e
const in myAddtomempool
jmjatlanta Nov 9, 2021
4cf000a
reverse iterate
jmjatlanta Nov 10, 2021
6d62418
More block tests
jmjatlanta Nov 15, 2021
6d87cce
Notary tests
jmjatlanta Feb 2, 2022
ee02430
allow debug builds
jmjatlanta Sep 21, 2021
a121375
make clean .a files
jmjatlanta Oct 8, 2021
0eaff09
hardforks in own object
jmjatlanta Oct 13, 2021
5da51a3
adjust hardfork defines
jmjatlanta Oct 14, 2021
03229d5
Handle cryptoconditions changes
jmjatlanta Oct 15, 2021
10cbee9
Rebuild libcc.so when dependencies change
jmjatlanta Oct 22, 2021
960fa3a
build cryptoconditions as static (incl Windows)
jmjatlanta Nov 5, 2021
4373f34
addrman no lock in ctor
jmjatlanta Jan 14, 2022
cb8c132
enable-debug script param
jmjatlanta Jan 14, 2022
7ecad6a
switch from -O3 to -O2
jmjatlanta Feb 22, 2022
634c1b2
clean komodo_state
jmjatlanta Feb 23, 2022
a7d20f8
merge dev into jmj_testutils
jmjatlanta Apr 12, 2022
433a2f5
merge dev into jmj_build_debug3
jmjatlanta May 10, 2022
7e09f1d
avoid comparing ptr to int
jmjatlanta May 10, 2022
e4c6605
Merge branch 'jmj_build_debug3' into jmj_testutils
jmjatlanta May 16, 2022
cf6af36
Fix locking cs_main in tests
jmjatlanta May 16, 2022
76bad69
Make TestWallet derive from CWallet
jmjatlanta May 20, 2022
770f6eb
Merge pull request #22 from jmjatlanta/jmj_testutils_wallet
jmjatlanta May 20, 2022
bcc5248
correctly serialize komodostate records
jmjatlanta Jun 13, 2022
e22e9aa
refactor to reduce casting
jmjatlanta Jun 14, 2022
876e824
remove dynamic cast from events
jmjatlanta Jun 14, 2022
0d8e72d
komodo_disconnect no longer used
jmjatlanta Jun 15, 2022
8db798b
Set max witness cache in wallet
jmjatlanta Jun 15, 2022
4c9039c
Merge s6 changes into testutils
jmjatlanta Jun 15, 2022
9ded975
fix miner fee in test
jmjatlanta Jun 15, 2022
fe25d9a
Get correct config file
jmjatlanta Jun 27, 2022
d4624fd
add test
jmjatlanta Jun 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,5 @@ Makefile.in
configure
doc/man/Makefile.in
src/Makefile.in
src/cc/customcc.so
src/cc/libcc.so
src/libcc.so
3 changes: 3 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,6 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-man

clean-local:
rm -rf test_bitcoin.coverage/ zcash-gtest.coverage/ total.coverage/

clean-all: clean-local
$(MAKE) -C src clean-all
4 changes: 2 additions & 2 deletions depends/hosts/darwin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ darwin_CXX=g++-8 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysro
darwin_CFLAGS=-pipe
darwin_CXXFLAGS=$(darwin_CFLAGS)

darwin_release_CFLAGS=-O1
darwin_release_CFLAGS=-g -O2
darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)

darwin_debug_CFLAGS=-O1
darwin_debug_CFLAGS=-g -O0
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)

darwin_native_toolchain=native_cctools
5 changes: 2 additions & 3 deletions depends/hosts/linux.mk
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
linux_CFLAGS=-pipe
linux_CXXFLAGS=$(linux_CFLAGS)

linux_release_CFLAGS=-O1
linux_release_CFLAGS=-g -O2
linux_release_CXXFLAGS=$(linux_release_CFLAGS)

linux_debug_CFLAGS=-O1
linux_debug_CFLAGS=-g -O0
linux_debug_CXXFLAGS=$(linux_debug_CFLAGS)

linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC

ifeq (86,$(findstring 86,$(build_arch)))
Expand Down
11 changes: 5 additions & 6 deletions depends/hosts/mingw32.mk
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
mingw32_CC=x86_64-w64-mingw32-gcc-posix
mingw32_CXX=x86_64-w64-mingw32-g++-posix
mingw32_CFLAGS=-pipe -std=c11
mingw32_CXXFLAGS=$(mingw32_CFLAGS) -std=c++11
mingw32_CXXFLAGS=-pipe -std=c++11

mingw32_release_CFLAGS=-O1
mingw32_release_CXXFLAGS=$(mingw32_release_CFLAGS)

mingw32_debug_CFLAGS=-O1
mingw32_debug_CXXFLAGS=$(mingw32_debug_CFLAGS)
mingw32_release_CFLAGS=-g -O2
mingw32_release_CXXFLAGS=$(mingw32_CXXFLAGS) $(mingw32_release_CFLAGS)

mingw32_debug_CFLAGS=-g -O0
mingw32_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
mingw32_debug_CXXFLAGS=$(mingw32_CXXFLAGS) $(mingw32_debug_CFLAGS)
4 changes: 2 additions & 2 deletions qa/pytest_komodo/chainconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"TONYCI": {
"rpc_user": "test",
"rpcpassword": "test",
"rpcallowip": "0.0.0.0/0",
"rpcallowip": "127.0.0.1",
"rpcport": 7000,
"port": 6000,
"rpcbind": "0.0.0.0",
"rpcbind": "127.0.0.1",
"ac_name": "TONYCI",
"ac_reward": "100000000000",
"ac_supply": "10000000000",
Expand Down
5 changes: 5 additions & 0 deletions qa/pytest_komodo/ci_cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
rm -Rf node_0
rm -Rf node_1
rm -Rf __pycache__/
rm TONYCI_7776
79 changes: 35 additions & 44 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DIST_SUBDIRS = secp256k1 univalue cryptoconditions

DIST_SUBDIRS = secp256k1 univalue
SUBDIRS = cryptoconditions
AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) $(SAN_LDFLAGS) $(HARDENED_LDFLAGS)
AM_CXXFLAGS = $(SAN_CXXFLAGS) $(HARDENED_CXXFLAGS) $(ERROR_CXXFLAGS)
AM_CPPFLAGS = $(HARDENED_CPPFLAGS)
Expand All @@ -15,7 +15,7 @@ LIBMEMENV += $(builddir)/leveldb/libmemenv.a
$(LIBLEVELDB): $(LIBMEMENV)

$(LIBLEVELDB) $(LIBMEMENV):
@echo "Building LevelDB ..." && $(MAKE) -C $(@D) $(@F) CXX="$(CXX)" \
$(AM_V_at)$(MAKE) -C $(@D) $(@F) CXX="$(CXX)" \
CC="$(CC)" PLATFORM=$(TARGET_OS) AR="$(AR)" $(LEVELDB_TARGET_FLAGS) \
OPT="$(AM_CXXFLAGS) $(PIE_FLAGS) $(CXXFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -D__STDC_LIMIT_MACROS"
endif
Expand All @@ -38,11 +38,11 @@ LIBBITCOIN_CLI=libbitcoin_cli.a
LIBBITCOIN_UTIL=libbitcoin_util.a
LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
LIBSECP256K1=secp256k1/libsecp256k1.la
LIBCRYPTOCONDITIONS=cryptoconditions/libcryptoconditions_core.la
LIBCRYPTOCONDITIONS=cryptoconditions/libcryptoconditions_core.a
LIBSNARK=snark/libsnark.a
LIBUNIVALUE=univalue/libunivalue.la
LIBCC=libcc.a
LIBZCASH=libzcash.a
LIBCJSON=libcjson.a

if ENABLE_ZMQ
LIBBITCOIN_ZMQ=libbitcoin_zmq.a
Expand All @@ -53,39 +53,28 @@ endif
if BUILD_BITCOIN_LIBS
LIBZCASH_CONSENSUS=libzcashconsensus.la
endif
if ENABLE_WALLET
LIBBITCOIN_WALLET=libbitcoin_wallet.a
endif

$(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) OPTFLAGS="-O2 -march=x86-64 -g "

LIBSNARK_CXXFLAGS = $(AM_CXXFLAGS) $(PIC_FLAGS) -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1 -fstack-protector-all
LIBSNARK_CONFIG_FLAGS = CURVE=ALT_BN128 NO_PROCPS=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT NO_COPY_DEPINST=1 NO_COMPILE_LIBGTEST=1
LIBSNARK_OPTFLAGS = $(CPPFLAGS) -march=x86-64
if HAVE_OPENMP
LIBSNARK_CONFIG_FLAGS += MULTICORE=1
endif
if TARGET_DARWIN
LIBSNARK_CONFIG_FLAGS += PLATFORM=darwin
endif

$(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) OPTFLAGS="$(LIBSNARK_OPTFLAGS) "

$(LIBSNARK): $(wildcard snark/src/*)
$(AM_V_at) CC="$(CC)" CXX="$(CXX)" AR="$(AR)" CXXFLAGS="$(LIBSNARK_CXXFLAGS)" $(MAKE) $(AM_MAKEFLAGS) -C snark/ DEPINST="$(LIBSNARK_DEPINST)" $(LIBSNARK_CONFIG_FLAGS) OPTFLAGS="-O2 -march=x86-64"
$(AM_V_at)CC="$(CC)" CXX="$(CXX)" AR="$(AR)" CXXFLAGS="$(LIBSNARK_CXXFLAGS)" $(MAKE) $(AM_MAKEFLAGS) -C snark/ DEPINST="$(LIBSNARK_DEPINST)" $(LIBSNARK_CONFIG_FLAGS) OPTFLAGS="$(LIBSNARK_OPTFLAGS)"

libsnark-tests: $(wildcard snark/src/*)
$(AM_V_at) CC="$(CC)" CXX="$(CXX)" AR="$(AR)" CXXFLAGS="$(LIBSNARK_CXXFLAGS)" $(MAKE) $(AM_MAKEFLAGS) -C snark/ check DEPINST="$(LIBSNARK_DEPINST)" $(LIBSNARK_CONFIG_FLAGS) OPTFLAGS="-O2 -march=x86-64"
$(AM_V_at)CC="$(CC)" CXX="$(CXX)" AR="$(AR)" CXXFLAGS="$(LIBSNARK_CXXFLAGS)" $(MAKE) $(AM_MAKEFLAGS) -C snark/ check DEPINST="$(LIBSNARK_DEPINST)" $(LIBSNARK_CONFIG_FLAGS) OPTFLAGS="$(LIBSNARK_OPTFLAGS)"

$(LIBUNIVALUE): $(wildcard univalue/lib/*)
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) OPTFLAGS="-O2 -march=x86-64 -g "

$(LIBCRYPTOCONDITIONS): $(wildcard cryptoconditions/src/*) $(wildcard cryptoconditions/include/*)
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) OPTFLAGS="-O2 -march=x86-64 -g "

#%.o: %.c
# $(CC) -c -o $@ $<

#$(LIBCJSON): cJSON.o komodo_cJSON.o komodo_cutils.o
# $(AR) cr $(LIBCJSON) $^
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) OPTFLAGS="$(LIBSNARK_OPTFLAGS)"

# libcjson build
LIBCJSON=libcjson.a
Expand Down Expand Up @@ -114,7 +103,7 @@ if ENABLE_PROTON
EXTRA_LIBRARIES += $(LIBBITCOIN_PROTON)
endif

lib_LTLIBRARIES = $(LIBZCASH_CONSENSUS)
lib_LTLIBRARIES = $(LIBZCASH_CONSENSUS) $(LIBCC)

bin_PROGRAMS =
noinst_PROGRAMS =
Expand Down Expand Up @@ -398,6 +387,11 @@ libbitcoin_wallet_a_SOURCES = \
$(BITCOIN_CORE_H) \
$(LIBZCASH_H)

# a shared library for cryptoconditions
libcc_a_SOURCES = cc/cclib.cpp
libcc_a_CXXFLAGS = -DBUILD_CUSTOMCC -I../secp256k1/include -I../depends/$(shell echo `../depends/config.guess`/include) -I./univalue/include -I./cryptoconditions/include -I./cryptoconditions/src -I./cryptoconditions/src/asn -I. -I./cc
libcc_a_LDFLAGS = -version-info 0:0:0

# crypto primitives library
crypto_libbitcoin_crypto_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_CONFIG_INCLUDES)
crypto_libbitcoin_crypto_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
Expand Down Expand Up @@ -463,12 +457,13 @@ libbitcoin_common_a_SOURCES = \
komodo_events.cpp \
komodo_gateway.cpp \
komodo_globals.cpp \
komodo_hardfork.cpp \
komodo_interest.cpp \
komodo_jumblr.cpp \
komodo_kv.cpp \
komodo_notary.cpp \
komodo_pax.cpp \
komodo_utils.cpp \
komodo_utils.cpp \
netbase.cpp \
metrics.cpp \
primitives/block.cpp \
Expand Down Expand Up @@ -575,18 +570,9 @@ komodod_LDADD += \
$(PROTON_LIBS) \
$(LIBBITCOIN_CRYPTO) \
$(LIBZCASH_LIBS) \
$(LIBCC) \
-lcurl

if TARGET_DARWIN
komodod_LDADD += libcc.dylib $(LIBSECP256K1)
endif
if TARGET_WINDOWS
komodod_LDADD += libcc.dll $(LIBSECP256K1)
endif
if TARGET_LINUX
komodod_LDADD += libcc.so $(LIBSECP256K1)
endif

if ENABLE_PROTON
komodod_LDADD += $(LIBBITCOIN_PROTON) $(PROTON_LIBS)
endif
Expand Down Expand Up @@ -668,7 +654,6 @@ komodo_tx_LDADD = \
$(LIBCRYPTOCONDITIONS)

komodo_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS)
#

# zcash protocol primitives #
libzcash_a_SOURCES = \
Expand All @@ -688,12 +673,11 @@ libzcash_a_SOURCES = \
zcash/circuit/prfs.tcc \
zcash/circuit/utils.tcc

libzcash_a_CPPFLAGS = -DMULTICORE -fopenmp -fPIC -DBINARY_OUTPUT -DCURVE_ALT_BN128 -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS $(HARDENED_CPPFLAGS) $(HARDENED_CXXFLAGS) $(HARDENED_LDFLAGS) -pipe $(SAN_LDFLAGS) -O1 -g -Wstack-protector $(SAN_CXXFLAGS) -fstack-protector-all -fPIE -fvisibility=hidden -DSTATIC $(BITCOIN_INCLUDES)

#libzcash_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
#libzcash_a_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
#libzcash_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -DMONTGOMERY_OUTPUT

libzcash_a_CPPFLAGS = -DMULTICORE -fopenmp -fPIC -DBINARY_OUTPUT -DCURVE_ALT_BN128 \
-DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS $(HARDENED_CPPFLAGS) \
$(HARDENED_CXXFLAGS) $(HARDENED_LDFLAGS) -pipe $(SAN_LDFLAGS) \
-Wstack-protector $(SAN_CXXFLAGS) -fstack-protector-all -fPIE -fvisibility=hidden \
-DSTATIC $(BITCOIN_INCLUDES)
libzcash_a_CXXFLAGS = $(SAN_CXXFLAGS) $(HARDENED_CXXFLAGS) -fwrapv -fno-strict-aliasing
libzcash_a_LDFLAGS = $(SAN_LDFLAGS) $(HARDENED_LDFLAGS)
libzcash_a_CPPFLAGS += -DMONTGOMERY_OUTPUT
Expand Down Expand Up @@ -742,6 +726,13 @@ clean-local:
-$(MAKE) -C univalue clean
rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno
-rm -f config.h
-$(RM) *.a
-$(RM) crypto/*.a
-$(RM) cryptoconditions/.libs/*.a

clean-all: clean-local
-$(MAKE) -C snark clean-all
-$(MAKE) -C univalue clean-all

.rc.o:
@test -f $(WINDRES)
Expand Down Expand Up @@ -769,6 +760,6 @@ endif

if ENABLE_TESTS
include Makefile.ktest.include
#include Makefile.test.include
#include Makefile.gtest.include
#include Makefile.test.include # bitcoin tests
#include Makefile.gtest.include # zcash tests
endif
28 changes: 13 additions & 15 deletions src/Makefile.gtest.include
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,43 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://www.opensource.org/licenses/mit-license.php .

TESTS += komodo-gtest
bin_PROGRAMS += komodo-gtest
TESTS += zcash-gtest
bin_PROGRAMS += zcash-gtest

# tool for generating our public parameters
komodo_gtest_SOURCES = \
zcash_gtest_SOURCES = \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aha, renamed to zcash_gtest as in fact it tests just zcash features

gtest/main.cpp \
gtest/utils.cpp \
gtest/test_checktransaction.cpp \
gtest/json_test_vectors.cpp \
gtest/json_test_vectors.h \
# gtest/test_foundersreward.cpp \
gtest/test_wallet_zkeys.cpp \
gtest/json_test_vectors.h

# These tests are order-dependent, because they
# depend on global state (see #1539)
if ENABLE_WALLET
zcash_gtest_SOURCES += \
wallet/gtest/test_wallet_zkeys.cpp
endif

zcash_gtest_SOURCES += \
gtest/test_tautology.cpp \
gtest/test_deprecation.cpp \
gtest/test_equihash.cpp \
gtest/test_httprpc.cpp \
gtest/test_joinsplit.cpp \
gtest/test_keys.cpp \
gtest/test_keystore.cpp \
gtest/test_noteencryption.cpp \
gtest/test_mempool.cpp \
gtest/test_merkletree.cpp \
gtest/test_metrics.cpp \
gtest/test_miner.cpp \
gtest/test_pow.cpp \
gtest/test_random.cpp \
gtest/test_rpc.cpp \
gtest/test_sapling_note.cpp \
gtest/test_transaction.cpp \
gtest/test_transaction_builder.cpp \
gtest/test_upgrades.cpp \
gtest/test_validation.cpp \
gtest/test_circuit.cpp \
gtest/test_txid.cpp \
gtest/test_libzcash_utils.cpp \
gtest/test_proofs.cpp \
gtest/test_paymentdisclosure.cpp \
Expand All @@ -54,22 +50,24 @@ zcash_gtest_SOURCES += \
wallet/gtest/test_wallet.cpp
endif

komodo_gtest_CPPFLAGS = $(AM_CPPFLAGS) -DMULTICORE -fopenmp -DBINARY_OUTPUT -DCURVE_ALT_BN128 -DSTATIC $(BITCOIN_INCLUDES)
komodo_gtest_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
zcash_gtest_CPPFLAGS = $(AM_CPPFLAGS) -DMULTICORE -fopenmp -DBINARY_OUTPUT -DCURVE_ALT_BN128 -DSTATIC $(BITCOIN_INCLUDES)
zcash_gtest_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)

komodo_gtest_LDADD = -lgtest -lgmock $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
$(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1)

if ENABLE_ZMQ
zcash_gtest_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
endif

if ENABLE_WALLET
komodo_gtest_LDADD += $(LIBBITCOIN_WALLET)
zcash_gtest_LDADD += $(LIBBITCOIN_WALLET)
endif

komodo_gtest_LDADD += $(LIBZCASH_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(LIBZCASH) $(LIBSNARK) $(LIBZCASH_LIBS)
zcash_gtest_LDADD += $(LIBZCASH_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(LIBZCASH) $(LIBSNARK) $(LIBZCASH_LIBS)

if ENABLE_PROTON
komodo_gtest_LDADD += $(LIBBITCOIN_PROTON) $(PROTON_LIBS)
zcash_gtest_LDADD += $(LIBBITCOIN_PROTON) $(PROTON_LIBS)
endif


Expand Down
12 changes: 11 additions & 1 deletion src/Makefile.ktest.include
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,17 @@ bin_PROGRAMS += komodo-test
test-komodo/test_netbase_tests.cpp \
test-komodo/test_events.cpp \
test-komodo/test_hex.cpp \
test-komodo/test_haraka_removal.cpp
test-komodo/test_alerts.cpp \
test-komodo/test_equihash.cpp \
test-komodo/test_random.cpp \
test-komodo/test_block.cpp \
test-komodo/test_mempool.cpp \
test-komodo/test_notary.cpp \
test-komodo/test_pow.cpp \
test-komodo/test_txid.cpp \
test-komodo/test_coins.cpp \
test-komodo/test_haraka_removal.cpp \
main.cpp

komodo_test_CPPFLAGS = $(komodod_CPPFLAGS)

Expand Down
1 change: 0 additions & 1 deletion src/Makefile.test.include
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ BITCOIN_TESTS =\
test/bloom_tests.cpp \
test/checkblock_tests.cpp \
test/Checkpoints_tests.cpp \
test/coins_tests.cpp \
test/compress_tests.cpp \
test/convertbits_tests.cpp \
test/crypto_tests.cpp \
Expand Down
Loading