Unify claimtrie tests, add some additional root hash checks #181

Closed
BrannonKing wants to merge 291 commits from unify_claimtrie_tests into master
4 changed files with 32 additions and 35 deletions
Showing only changes of commit a1c1d813ae - Show all commits

7
.gitignore vendored
View file

@ -2,14 +2,11 @@
*.exe *.exe
src/bitcoin src/bitcoin
src/bitcoind
src/lbrycrdd src/lbrycrdd
src/bitcoin-cli
src/lbrycrd-cli src/lbrycrd-cli
src/bitcoin-tx
src/lbrycrd-tx src/lbrycrd-tx
src/test/test_bitcoin src/test/test_lbrycrd
src/qt/test/test_bitcoin-qt src/qt/test/test_lbrycrd-qt
# autoreconf # autoreconf
Makefile.in Makefile.in

View file

@ -1,5 +1,5 @@
bin_PROGRAMS += qt/test/test_bitcoin-qt bin_PROGRAMS += qt/test/test_lbrycrd-qt
TESTS += qt/test/test_bitcoin-qt TESTS += qt/test/test_lbrycrd-qt
TEST_QT_MOC_CPP = qt/test/moc_uritests.cpp TEST_QT_MOC_CPP = qt/test/moc_uritests.cpp
@ -12,37 +12,37 @@ TEST_QT_H = \
qt/test/paymentrequestdata.h \ qt/test/paymentrequestdata.h \
qt/test/paymentservertests.h qt/test/paymentservertests.h
qt_test_test_bitcoin_qt_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \ qt_test_test_lbrycrd_qt_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
$(QT_INCLUDES) $(QT_TEST_INCLUDES) $(PROTOBUF_CFLAGS) $(QT_INCLUDES) $(QT_TEST_INCLUDES) $(PROTOBUF_CFLAGS)
qt_test_test_bitcoin_qt_SOURCES = \ qt_test_test_lbrycrd_qt_SOURCES = \
qt/test/test_main.cpp \ qt/test/test_main.cpp \
qt/test/uritests.cpp \ qt/test/uritests.cpp \
$(TEST_QT_H) $(TEST_QT_H)
if ENABLE_WALLET if ENABLE_WALLET
qt_test_test_bitcoin_qt_SOURCES += \ qt_test_test_lbrycrd_qt_SOURCES += \
qt/test/paymentservertests.cpp qt/test/paymentservertests.cpp
endif endif
nodist_qt_test_test_bitcoin_qt_SOURCES = $(TEST_QT_MOC_CPP) nodist_qt_test_test_lbrycrd_qt_SOURCES = $(TEST_QT_MOC_CPP)
qt_test_test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER) qt_test_test_lbrycrd_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER)
if ENABLE_WALLET if ENABLE_WALLET
qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET) qt_test_test_lbrycrd_qt_LDADD += $(LIBBITCOIN_WALLET)
endif endif
qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) \ qt_test_test_lbrycrd_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) \
$(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \ $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
$(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1)
qt_test_test_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) qt_test_test_lbrycrd_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
CLEAN_BITCOIN_QT_TEST = $(TEST_QT_MOC_CPP) qt/test/*.gcda qt/test/*.gcno CLEAN_BITCOIN_QT_TEST = $(TEST_QT_MOC_CPP) qt/test/*.gcda qt/test/*.gcno
CLEANFILES += $(CLEAN_BITCOIN_QT_TEST) CLEANFILES += $(CLEAN_BITCOIN_QT_TEST)
test_bitcoin_qt : qt/test/test_bitcoin-qt$(EXEEXT) test_lbrycrd_qt : qt/test/test_lbrycrd-qt$(EXEEXT)
test_bitcoin_qt_check : qt/test/test_bitcoin-qt$(EXEEXT) FORCE test_lbrycrd_qt_check : qt/test/test_lbrycrd-qt$(EXEEXT) FORCE
$(MAKE) check-TESTS TESTS=$^ $(MAKE) check-TESTS TESTS=$^
test_bitcoin_qt_clean: FORCE test_lbrycrd_qt_clean: FORCE
rm -f $(CLEAN_BITCOIN_QT_TEST) $(qt_test_test_bitcoin_qt_OBJECTS) rm -f $(CLEAN_BITCOIN_QT_TEST) $(qt_test_test_lbrycrd_qt_OBJECTS)

View file

@ -1,7 +1,7 @@
TESTS += test/test_bitcoin TESTS += test/test_lbrycrd
bin_PROGRAMS += test/test_bitcoin bin_PROGRAMS += test/test_lbrycrd
TEST_SRCDIR = test TEST_SRCDIR = test
TEST_BINARY=test/test_bitcoin$(EXEEXT) TEST_BINARY=test/test_lbrycrd$(EXEEXT)
EXTRA_DIST += \ EXTRA_DIST += \
@ -85,18 +85,18 @@ BITCOIN_TESTS += \
test/rpc_wallet_tests.cpp test/rpc_wallet_tests.cpp
endif endif
test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES) test_test_lbrycrd_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
test_test_bitcoin_CPPFLAGS = $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS) test_test_lbrycrd_CPPFLAGS = $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)
test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \ test_test_lbrycrd_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
$(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1) $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1)
if ENABLE_WALLET if ENABLE_WALLET
test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET) test_test_lbrycrd_LDADD += $(LIBBITCOIN_WALLET)
endif endif
test_test_bitcoin_LDADD += $(LIBBITCOIN_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) test_test_lbrycrd_LDADD += $(LIBBITCOIN_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static test_test_lbrycrd_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static
nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES) nodist_test_test_lbrycrd_SOURCES = $(GENERATED_TEST_FILES)
$(BITCOIN_TESTS): $(GENERATED_TEST_FILES) $(BITCOIN_TESTS): $(GENERATED_TEST_FILES)
@ -104,13 +104,13 @@ CLEAN_BITCOIN_TEST = test/*.gcda test/*.gcno $(GENERATED_TEST_FILES)
CLEANFILES += $(CLEAN_BITCOIN_TEST) CLEANFILES += $(CLEAN_BITCOIN_TEST)
bitcoin_test: $(TEST_BINARY) lbrycrd_test: $(TEST_BINARY)
bitcoin_test_check: $(TEST_BINARY) FORCE lbrycrd_test_check: $(TEST_BINARY) FORCE
$(MAKE) check-TESTS TESTS=$^ $(MAKE) check-TESTS TESTS=$^
bitcoin_test_clean : FORCE lbrycrd_test_clean : FORCE
rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY) rm -f $(CLEAN_BITCOIN_TEST) $(test_test_lbrycrd_OBJECTS) $(TEST_BINARY)
check-local: check-local:
@echo "Running test/bitcoin-util-test.py..." @echo "Running test/bitcoin-util-test.py..."

View file

@ -401,7 +401,7 @@ boost::filesystem::path GetDefaultDataDir()
// Unix: ~/.lbrycrd // Unix: ~/.lbrycrd
#ifdef WIN32 #ifdef WIN32
// Windows // Windows
return GetSpecialFolderPath(CSIDL_APPDATA) / "Bitcoin"; return GetSpecialFolderPath(CSIDL_APPDATA) / "lbrycrd";
#else #else
fs::path pathRet; fs::path pathRet;
char* pszHome = getenv("HOME"); char* pszHome = getenv("HOME");
@ -413,7 +413,7 @@ boost::filesystem::path GetDefaultDataDir()
// Mac // Mac
pathRet /= "Library/Application Support"; pathRet /= "Library/Application Support";
TryCreateDirectory(pathRet); TryCreateDirectory(pathRet);
return pathRet / "Bitcoin"; return pathRet / "lbrycrd";
#else #else
// Unix // Unix
return pathRet / ".lbrycrd"; return pathRet / ".lbrycrd";