rename test/bench
This commit is contained in:
@@ -181,7 +181,7 @@ baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtere
|
||||
|
||||
test_bitcoin.info: baseline_filtered_combined.info
|
||||
$(MAKE) -C src/ check
|
||||
$(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@
|
||||
$(LCOV) -c -d $(abs_builddir)/src -t test_blackmore -o $@
|
||||
$(LCOV) -z -d $(abs_builddir)/src
|
||||
$(LCOV) -z -d $(abs_builddir)/src/leveldb
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ bitcoin (0.5.0~rc3-natty0) natty; urgency=low
|
||||
|
||||
bitcoin (0.5.0~rc1-natty1) natty; urgency=low
|
||||
|
||||
* Add test_bitcoin to build test
|
||||
* Add test_blackmore to build test
|
||||
* Fix clean
|
||||
* Remove unnecessary build-dependancies
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- mode: makefile; coding: utf-8 -*-
|
||||
|
||||
#DEB_MAKE_CHECK_TARGET = test_bitcoin
|
||||
#build/bitcoind::
|
||||
# $(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),,src/test_bitcoin)
|
||||
#DEB_MAKE_CHECK_TARGET = test_blackmore
|
||||
#build/blackmored::
|
||||
# $(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),,src/test_blackmore)
|
||||
|
||||
DEB_INSTALL_EXAMPLES_bitcoind += debian/examples/*
|
||||
DEB_INSTALL_MANPAGES_bitcoind += debian/manpages/*
|
||||
|
||||
@@ -123,10 +123,10 @@ If only supported symbols are used the return value will be 0 and the output wil
|
||||
|
||||
If there are 'unsupported' symbols, the return value will be 1 a list like this will be printed:
|
||||
|
||||
.../64/test_bitcoin: symbol memcpy from unsupported version GLIBC_2.14
|
||||
.../64/test_bitcoin: symbol __fdelt_chk from unsupported version GLIBC_2.15
|
||||
.../64/test_bitcoin: symbol std::out_of_range::~out_of_range() from unsupported version GLIBCXX_3.4.15
|
||||
.../64/test_bitcoin: symbol _ZNSt8__detail15_List_nod from unsupported version GLIBCXX_3.4.15
|
||||
.../64/test_blackmore: symbol memcpy from unsupported version GLIBC_2.14
|
||||
.../64/test_blackmore: symbol __fdelt_chk from unsupported version GLIBC_2.15
|
||||
.../64/test_blackmore: symbol std::out_of_range::~out_of_range() from unsupported version GLIBCXX_3.4.15
|
||||
.../64/test_blackmore: symbol _ZNSt8__detail15_List_nod from unsupported version GLIBCXX_3.4.15
|
||||
|
||||
update-translations.py
|
||||
======================
|
||||
|
||||
@@ -34,7 +34,7 @@ files:
|
||||
- "MacOSX10.11.sdk.tar.gz"
|
||||
script: |
|
||||
WRAP_DIR=$HOME/wrapped
|
||||
HOSTS="x86_64-apple-darwin14"
|
||||
HOSTS="x86_64-apple-darwin16"
|
||||
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage"
|
||||
FAKETIME_HOST_PROGS=""
|
||||
FAKETIME_PROGS="ar ranlib date dmg genisoimage"
|
||||
|
||||
@@ -34,7 +34,7 @@ Source23: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/contrib/
|
||||
|
||||
#selinux
|
||||
Source30: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/contrib/rpm/bitcoin.te
|
||||
# Source31 - what about bitcoin-tx and bench_bitcoin ???
|
||||
# Source31 - what about bitcoin-tx and bench_blackmore ???
|
||||
Source31: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/contrib/rpm/bitcoin.fc
|
||||
Source32: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/contrib/rpm/bitcoin.if
|
||||
|
||||
@@ -142,9 +142,9 @@ Group: Applications/System
|
||||
This package provides several command line utilities for interacting with a
|
||||
bitcoin-core daemon.
|
||||
|
||||
The bitcoin-cli utility allows you to communicate and control a bitcoin daemon
|
||||
The blackmore-cli utility allows you to communicate and control a bitcoin daemon
|
||||
over RPC, the bitcoin-tx utility allows you to create a custom transaction, and
|
||||
the bench_bitcoin utility can be used to perform some benchmarks.
|
||||
the bench_blackmore utility can be used to perform some benchmarks.
|
||||
|
||||
This package contains utilities needed by the bitcoin-server package.
|
||||
|
||||
@@ -423,7 +423,7 @@ rm -rf %{buildroot}
|
||||
%doc COPYING bitcoin.conf.example doc/README.md
|
||||
%attr(0755,root,root) %{_bindir}/bitcoin-cli
|
||||
%attr(0755,root,root) %{_bindir}/bitcoin-tx
|
||||
%attr(0755,root,root) %{_bindir}/bench_bitcoin
|
||||
%attr(0755,root,root) %{_bindir}/bench_blackmore
|
||||
%attr(0644,root,root) %{_mandir}/man1/bitcoin-cli.1*
|
||||
%attr(0644,root,root) %{_mandir}/man5/bitcoin.conf.5*
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ For linux RISC-V 64-bit cross compilation (there are no packages for 32-bit):
|
||||
|
||||
sudo apt-get install g++-riscv64-linux-gnu binutils-riscv64-linux-gnu
|
||||
|
||||
RISC-V known issue: gcc-7.3.0 and gcc-7.3.1 result in a broken `test_bitcoin` executable (see https://github.com/bitcoin/bitcoin/pull/13543),
|
||||
RISC-V known issue: gcc-7.3.0 and gcc-7.3.1 result in a broken `test_blackmore` executable (see https://github.com/bitcoin/bitcoin/pull/13543),
|
||||
this is apparently fixed in gcc-8.1.0.
|
||||
|
||||
For linux S390X cross compilation:
|
||||
|
||||
@@ -5,7 +5,7 @@ Bitcoin Core has an internal benchmarking framework, with benchmarks
|
||||
for cryptographic algorithms such as SHA1, SHA256, SHA512 and RIPEMD160. As well as the rolling bloom filter.
|
||||
|
||||
After compiling bitcoin-core, the benchmarks can be run with:
|
||||
`src/bench/bench_bitcoin`
|
||||
`src/bench/bench_blackmore`
|
||||
|
||||
The output will look similar to:
|
||||
```
|
||||
|
||||
@@ -35,7 +35,7 @@ This compiler will not overwrite the system compiler, it will be installed as `e
|
||||
|
||||
Do not use `pkg_add boost`! The boost version installed thus is compiled using the `g++` compiler not `eg++`, which will result in a conflict between `/usr/local/lib/libestdc++.so.XX.0` and `/usr/lib/libstdc++.so.XX.0`, resulting in a test crash:
|
||||
|
||||
test_bitcoin:/usr/lib/libstdc++.so.57.0: /usr/local/lib/libestdc++.so.17.0 : WARNING: symbol(_ZN11__gnu_debug17_S_debug_me ssagesE) size mismatch, relink your program
|
||||
test_blackmore:/usr/lib/libstdc++.so.57.0: /usr/local/lib/libestdc++.so.17.0 : WARNING: symbol(_ZN11__gnu_debug17_S_debug_me ssagesE) size mismatch, relink your program
|
||||
...
|
||||
Segmentation fault (core dumped)
|
||||
|
||||
|
||||
@@ -281,7 +281,7 @@ git merge commit are mentioned.
|
||||
|
||||
### Build system
|
||||
- #8293 `fa5b249` Allow building libbitcoinconsensus without any univalue (luke-jr)
|
||||
- #8492 `8b0bdd3` Allow building bench_bitcoin by itself (luke-jr)
|
||||
- #8492 `8b0bdd3` Allow building bench_blackmore by itself (luke-jr)
|
||||
- #8563 `147003c` Add configure check for -latomic (ajtowns)
|
||||
- #8626 `ea51b0f` Berkeley DB v6 compatibility fix (netsafe)
|
||||
- #8520 `75f2065` Remove check for `openssl/ec.h` (laanwj)
|
||||
|
||||
@@ -6,13 +6,13 @@ and tests weren't explicitly disabled.
|
||||
|
||||
After configuring, they can be run with `make check`.
|
||||
|
||||
To run the bitcoind tests manually, launch `src/test/test_bitcoin`.
|
||||
To run the blackmored tests manually, launch `src/test/test_blackmore`.
|
||||
|
||||
To add more bitcoind tests, add `BOOST_AUTO_TEST_CASE` functions to the existing
|
||||
.cpp files in the `test/` directory or add new .cpp files that
|
||||
implement new BOOST_AUTO_TEST_SUITE sections.
|
||||
|
||||
To run the bitcoin-qt tests manually, launch `src/qt/test/test_bitcoin-qt`
|
||||
To run the blackmore-qt tests manually, launch `src/qt/test/test_blackmore-qt`
|
||||
|
||||
To add more bitcoin-qt tests, add them to the `src/qt/test/` directory and
|
||||
To add more blackmore-qt tests, add them to the `src/qt/test/` directory and
|
||||
the `src/qt/test/test_main.cpp` file.
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
bin_PROGRAMS += bench/bench_bitcoin
|
||||
bin_PROGRAMS += bench/bench_blackmore
|
||||
BENCH_SRCDIR = bench
|
||||
BENCH_BINARY = bench/bench_bitcoin$(EXEEXT)
|
||||
BENCH_BINARY = bench/bench_blackmore$(EXEEXT)
|
||||
|
||||
|
||||
bench_bench_bitcoin_SOURCES = \
|
||||
bench_bench_blackmore_SOURCES = \
|
||||
bench/bench_bitcoin.cpp \
|
||||
bench/bench.cpp \
|
||||
bench/bench.h \
|
||||
@@ -19,9 +19,9 @@ bench_bench_bitcoin_SOURCES = \
|
||||
bench/mempool_eviction.cpp \
|
||||
bench/base58.cpp
|
||||
|
||||
bench_bench_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CLFAGS) $(EVENT_PTHREADS_CFLAGS) -I$(builddir)/bench/
|
||||
bench_bench_bitcoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
||||
bench_bench_bitcoin_LDADD = \
|
||||
bench_bench_blackmore_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CLFAGS) $(EVENT_PTHREADS_CFLAGS) -I$(builddir)/bench/
|
||||
bench_bench_blackmore_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
||||
bench_bench_blackmore_LDADD = \
|
||||
$(LIBBITCOIN_SERVER) \
|
||||
$(LIBBITCOIN_COMMON) \
|
||||
$(LIBBITCOIN_UTIL) \
|
||||
@@ -33,16 +33,16 @@ bench_bench_bitcoin_LDADD = \
|
||||
$(LIBUNIVALUE)
|
||||
|
||||
if ENABLE_ZMQ
|
||||
bench_bench_bitcoin_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
|
||||
bench_bench_blackmore_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
|
||||
endif
|
||||
|
||||
if ENABLE_WALLET
|
||||
bench_bench_bitcoin_SOURCES += bench/coin_selection.cpp
|
||||
bench_bench_bitcoin_LDADD += $(LIBBITCOIN_WALLET) $(LIBBITCOIN_CRYPTO)
|
||||
bench_bench_blackmore_SOURCES += bench/coin_selection.cpp
|
||||
bench_bench_blackmore_LDADD += $(LIBBITCOIN_WALLET) $(LIBBITCOIN_CRYPTO)
|
||||
endif
|
||||
|
||||
bench_bench_bitcoin_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
|
||||
bench_bench_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||
bench_bench_blackmore_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
|
||||
bench_bench_blackmore_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||
|
||||
CLEAN_BITCOIN_BENCH = bench/*.gcda bench/*.gcno
|
||||
|
||||
@@ -54,7 +54,7 @@ bench: $(BENCH_BINARY) FORCE
|
||||
$(BENCH_BINARY)
|
||||
|
||||
bitcoin_bench_clean : FORCE
|
||||
rm -f $(CLEAN_BITCOIN_BENCH) $(bench_bench_bitcoin_OBJECTS) $(BENCH_BINARY)
|
||||
rm -f $(CLEAN_BITCOIN_BENCH) $(bench_bench_blackmore_OBJECTS) $(BENCH_BINARY)
|
||||
|
||||
%.raw.h: %.raw
|
||||
@$(MKDIR_P) $(@D)
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
bin_PROGRAMS += qt/test/test_bitcoin-qt
|
||||
TESTS += qt/test/test_bitcoin-qt
|
||||
bin_PROGRAMS += qt/test/test_blackmore-qt
|
||||
TESTS += qt/test/test_blackmore-qt
|
||||
|
||||
TEST_QT_MOC_CPP = \
|
||||
qt/test/moc_bitcoinaddressvalidatortests.cpp \
|
||||
@@ -25,10 +25,10 @@ TEST_QT_H = \
|
||||
qt/test/paymentrequestdata.h \
|
||||
qt/test/paymentservertests.h
|
||||
|
||||
qt_test_test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
|
||||
qt_test_test_blackmore_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
|
||||
$(QT_INCLUDES) $(QT_TEST_INCLUDES) $(PROTOBUF_CFLAGS)
|
||||
|
||||
qt_test_test_bitcoin_qt_SOURCES = \
|
||||
qt_test_test_blackmore_qt_SOURCES = \
|
||||
qt/test/bitcoinaddressvalidatortests.cpp \
|
||||
qt/test/compattests.cpp \
|
||||
qt/test/guiutiltests.cpp \
|
||||
@@ -37,34 +37,34 @@ qt_test_test_bitcoin_qt_SOURCES = \
|
||||
qt/test/uritests.cpp \
|
||||
$(TEST_QT_H)
|
||||
if ENABLE_WALLET
|
||||
qt_test_test_bitcoin_qt_SOURCES += \
|
||||
qt_test_test_blackmore_qt_SOURCES += \
|
||||
qt/test/paymentservertests.cpp
|
||||
endif
|
||||
|
||||
nodist_qt_test_test_bitcoin_qt_SOURCES = $(TEST_QT_MOC_CPP)
|
||||
nodist_qt_test_test_blackmore_qt_SOURCES = $(TEST_QT_MOC_CPP)
|
||||
|
||||
qt_test_test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER)
|
||||
qt_test_test_blackmore_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER)
|
||||
if ENABLE_WALLET
|
||||
qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
|
||||
qt_test_test_blackmore_qt_LDADD += $(LIBBITCOIN_WALLET)
|
||||
endif
|
||||
if ENABLE_ZMQ
|
||||
qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
|
||||
qt_test_test_blackmore_qt_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
|
||||
endif
|
||||
qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) \
|
||||
qt_test_test_blackmore_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) \
|
||||
$(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
|
||||
$(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1) \
|
||||
$(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
|
||||
qt_test_test_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||
qt_test_test_bitcoin_qt_CXXFLAGS = $(AM_CXXFLAGS) $(QT_PIE_FLAGS)
|
||||
qt_test_test_blackmore_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||
qt_test_test_blackmore_qt_CXXFLAGS = $(AM_CXXFLAGS) $(QT_PIE_FLAGS)
|
||||
|
||||
CLEAN_BITCOIN_QT_TEST = $(TEST_QT_MOC_CPP) qt/test/*.gcda qt/test/*.gcno
|
||||
|
||||
CLEANFILES += $(CLEAN_BITCOIN_QT_TEST)
|
||||
|
||||
test_bitcoin_qt : qt/test/test_bitcoin-qt$(EXEEXT)
|
||||
test_blackmore_qt : qt/test/test_blackmore-qt$(EXEEXT)
|
||||
|
||||
test_bitcoin_qt_check : qt/test/test_bitcoin-qt$(EXEEXT) FORCE
|
||||
test_blackmore_qt_check : qt/test/test_blackmore-qt$(EXEEXT) FORCE
|
||||
$(MAKE) check-TESTS TESTS=$^
|
||||
|
||||
test_bitcoin_qt_clean: FORCE
|
||||
rm -f $(CLEAN_BITCOIN_QT_TEST) $(qt_test_test_bitcoin_qt_OBJECTS)
|
||||
test_blackmore_qt_clean: FORCE
|
||||
rm -f $(CLEAN_BITCOIN_QT_TEST) $(qt_test_test_blackmore_qt_OBJECTS)
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
TESTS += test/test_bitcoin
|
||||
bin_PROGRAMS += test/test_bitcoin
|
||||
TESTS += test/test_blackmore
|
||||
bin_PROGRAMS += test/test_blackmore
|
||||
TEST_SRCDIR = test
|
||||
TEST_BINARY=test/test_bitcoin$(EXEEXT)
|
||||
TEST_BINARY=test/test_blackmore$(EXEEXT)
|
||||
|
||||
|
||||
EXTRA_DIST += \
|
||||
@@ -106,23 +106,23 @@ BITCOIN_TESTS += \
|
||||
wallet/test/rpc_wallet_tests.cpp
|
||||
endif
|
||||
|
||||
test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
|
||||
test_test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)
|
||||
test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
|
||||
test_test_blackmore_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
|
||||
test_test_blackmore_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)
|
||||
test_test_blackmore_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
|
||||
$(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1)
|
||||
test_test_bitcoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
||||
test_test_blackmore_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
||||
if ENABLE_WALLET
|
||||
test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
|
||||
test_test_blackmore_LDADD += $(LIBBITCOIN_WALLET)
|
||||
endif
|
||||
|
||||
test_test_bitcoin_LDADD += $(LIBBITCOIN_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
|
||||
test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static
|
||||
test_test_blackmore_LDADD += $(LIBBITCOIN_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
|
||||
test_test_blackmore_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static
|
||||
|
||||
if ENABLE_ZMQ
|
||||
test_test_bitcoin_LDADD += $(ZMQ_LIBS)
|
||||
test_test_blackmore_LDADD += $(ZMQ_LIBS)
|
||||
endif
|
||||
|
||||
nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
|
||||
nodist_test_test_blackmore_SOURCES = $(GENERATED_TEST_FILES)
|
||||
|
||||
$(BITCOIN_TESTS): $(GENERATED_TEST_FILES)
|
||||
|
||||
@@ -139,7 +139,7 @@ bitcoin_test_check: $(TEST_BINARY) FORCE
|
||||
$(MAKE) check-TESTS TESTS=$^
|
||||
|
||||
bitcoin_test_clean : FORCE
|
||||
rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)
|
||||
rm -f $(CLEAN_BITCOIN_TEST) $(test_test_blackmore_OBJECTS) $(TEST_BINARY)
|
||||
|
||||
check-local:
|
||||
@echo "Running test/bitcoin-util-test.py..."
|
||||
|
||||
3
src/bench/.gitignore
vendored
3
src/bench/.gitignore
vendored
@@ -1,2 +1 @@
|
||||
bench_blackmore
|
||||
bench_bitcoin
|
||||
bench_blackmore
|
||||
@@ -17,7 +17,11 @@ static const int STAKE_MIN_CONFIRMATIONS = 500;
|
||||
|
||||
/** Flags for nSequence and nLockTime locks */
|
||||
enum {
|
||||
/* Interpret sequence numbers as relative lock-time constraints. */
|
||||
LOCKTIME_VERIFY_SEQUENCE = (1 << 0),
|
||||
|
||||
/* Use GetMedianTimePast() instead of nTime for end point timestamp. */
|
||||
LOCKTIME_MEDIAN_TIME_PAST = (1 << 1),
|
||||
};
|
||||
|
||||
#endif // BITCOIN_CONSENSUS_CONSENSUS_H
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "merkle.h"
|
||||
#include "hash.h"
|
||||
#include "utilstrencodings.h"
|
||||
#include <consensus/merkle.h>
|
||||
#include <hash.h>
|
||||
#include <utilstrencodings.h>
|
||||
|
||||
/* WARNING! If you're reading this because you're learning about crypto
|
||||
and/or designing a new system that will use merkle trees, keep in mind
|
||||
@@ -101,7 +101,7 @@ static void MerkleComputation(const std::vector<uint256>& leaves, uint256* proot
|
||||
bool matchh = matchlevel == level;
|
||||
while (count != (((uint32_t)1) << level)) {
|
||||
// If we reach this point, h is an inner value that is not the top.
|
||||
// We combine it with itself (Bitcoin's special rule for odd levels in
|
||||
// We combine it with itself (Blackcoin's special rule for odd levels in
|
||||
// the tree) to produce a higher level one.
|
||||
if (pbranch && matchh) {
|
||||
pbranch->push_back(h);
|
||||
@@ -132,13 +132,13 @@ static void MerkleComputation(const std::vector<uint256>& leaves, uint256* proot
|
||||
|
||||
uint256 ComputeMerkleRoot(const std::vector<uint256>& leaves, bool* mutated) {
|
||||
uint256 hash;
|
||||
MerkleComputation(leaves, &hash, mutated, -1, NULL);
|
||||
MerkleComputation(leaves, &hash, mutated, -1, nullptr);
|
||||
return hash;
|
||||
}
|
||||
|
||||
std::vector<uint256> ComputeMerkleBranch(const std::vector<uint256>& leaves, uint32_t position) {
|
||||
std::vector<uint256> ret;
|
||||
MerkleComputation(leaves, NULL, NULL, position, &ret);
|
||||
MerkleComputation(leaves, nullptr, nullptr, position, &ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
#include <stdint.h>
|
||||
#include <vector>
|
||||
|
||||
#include "primitives/transaction.h"
|
||||
#include "primitives/block.h"
|
||||
#include "uint256.h"
|
||||
#include <primitives/transaction.h>
|
||||
#include <primitives/block.h>
|
||||
#include <uint256.h>
|
||||
|
||||
uint256 ComputeMerkleRoot(const std::vector<uint256>& leaves, bool* mutated = NULL);
|
||||
std::vector<uint256> ComputeMerkleBranch(const std::vector<uint256>& leaves, uint32_t position);
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
#ifndef BITCOIN_CONSENSUS_PARAMS_H
|
||||
#define BITCOIN_CONSENSUS_PARAMS_H
|
||||
|
||||
#include "uint256.h"
|
||||
#include <amount.h>
|
||||
#include <uint256.h>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ static const unsigned char REJECT_CHECKPOINT = 0x43;
|
||||
class CValidationState {
|
||||
private:
|
||||
enum mode_state {
|
||||
MODE_VALID, //!< everything ok
|
||||
MODE_INVALID, //!< network rule violation (DoS value may be set)
|
||||
MODE_ERROR, //!< run-time error
|
||||
MODE_VALID, //! everything ok
|
||||
MODE_INVALID, //! network rule violation (DoS value may be set)
|
||||
MODE_ERROR, //! run-time error
|
||||
} mode;
|
||||
int nDoS;
|
||||
std::string strRejectReason;
|
||||
|
||||
@@ -27,7 +27,7 @@ void RPCNestedTests::rpcNestedTests()
|
||||
const CChainParams& chainparams = Params();
|
||||
RegisterAllCoreRPCCommands(tableRPC);
|
||||
ClearDatadirCache();
|
||||
std::string path = QDir::tempPath().toStdString() + "/" + strprintf("test_bitcoin_qt_%lu_%i", (unsigned long)GetTime(), (int)(GetRand(100000)));
|
||||
std::string path = QDir::tempPath().toStdString() + "/" + strprintf("test_blackmore_qt_%lu_%i", (unsigned long)GetTime(), (int)(GetRand(100000)));
|
||||
QDir dir(QString::fromStdString(path));
|
||||
dir.mkpath(".");
|
||||
mapArgs["-datadir"] = path;
|
||||
|
||||
@@ -5,7 +5,7 @@ sense to simply use this framework rather than require developers to
|
||||
configure some other framework (we want as few impediments to creating
|
||||
unit tests as possible).
|
||||
|
||||
The build system is setup to compile an executable called `test_bitcoin`
|
||||
The build system is setup to compile an executable called `test_blackmore`
|
||||
that runs all of the unit tests. The main source file is called
|
||||
test_bitcoin.cpp. To add a new unit test file to our test suite you need
|
||||
to add the file to `src/Makefile.test.include`. The pattern is to create
|
||||
@@ -19,14 +19,14 @@ For further reading, I found the following website to be helpful in
|
||||
explaining how the boost unit test framework works:
|
||||
[http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/](http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/).
|
||||
|
||||
test_bitcoin has some built-in command-line arguments; for
|
||||
test_blackmore has some built-in command-line arguments; for
|
||||
example, to run just the getarg_tests verbosely:
|
||||
|
||||
test_bitcoin --log_level=all --run_test=getarg_tests
|
||||
test_blackmore --log_level=all --run_test=getarg_tests
|
||||
|
||||
... or to run just the doubledash test:
|
||||
|
||||
test_bitcoin --run_test=getarg_tests/doubledash
|
||||
test_blackmore --run_test=getarg_tests/doubledash
|
||||
|
||||
Run `test_bitcoin --help` for the full list.
|
||||
Run `test_blackmore --help` for the full list.
|
||||
|
||||
|
||||
@@ -497,7 +497,7 @@ BOOST_AUTO_TEST_CASE(rolling_bloom)
|
||||
if (rb1.contains(RandomData()))
|
||||
++nHits;
|
||||
}
|
||||
// Run test_bitcoin with --log_level=message to see BOOST_TEST_MESSAGEs:
|
||||
// Run test_blackmore with --log_level=message to see BOOST_TEST_MESSAGEs:
|
||||
BOOST_TEST_MESSAGE("RollingBloomFilter got " << nHits << " false positives (~100 expected)");
|
||||
|
||||
// Insanely unlikely to get a fp count outside this range:
|
||||
|
||||
@@ -53,7 +53,7 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha
|
||||
// instead of unit tests, but for now we need these here.
|
||||
RegisterAllCoreRPCCommands(tableRPC);
|
||||
ClearDatadirCache();
|
||||
pathTemp = GetTempPath() / strprintf("test_bitcoin_%lu_%i", (unsigned long)GetTime(), (int)(GetRand(100000)));
|
||||
pathTemp = GetTempPath() / strprintf("test_blackmore_%lu_%i", (unsigned long)GetTime(), (int)(GetRand(100000)));
|
||||
boost::filesystem::create_directories(pathTemp);
|
||||
mapArgs["-datadir"] = pathTemp.string();
|
||||
mempool.setSanityCheck(1.0);
|
||||
|
||||
Reference in New Issue
Block a user