Merge #15788: test: Unify testing setups for fuzz, bench, and unit tests

faf400077d scripted-diff: Bump copyright headers in test, bench (MarcoFalke)
fa821904bf scripted-diff: Rename test_bitcoin to test/setup_common (MarcoFalke)
fa8685d49e test: Use test_bitcoin setup in bench, Add test utils (MarcoFalke)
666696b673 test: Have segwit always active in (Basic)TestingSetup (MarcoFalke)

Pull request description:

  Now that the fuzz tests can use the BasicTestingSetup [1], do the same for bench.

  Also move some duplicate code to a common "test/util" module.

  [1]:  fuzz: Link BasicTestingSetup (shared with unit tests) #15504

ACKs for commit faf400:
  jonatack:
    ACK faf400077d

Tree-SHA512: 8ac5692e72cf50e460958f291643ae6b8bb04d5c1331ed50dce9eb4e9457e5a925144c532c42b360a26707e11eeece74aab27db8c76ab9a429b9dd7167e7cdc4
This commit is contained in:
MarcoFalke
2019-04-15 11:25:03 -04:00
94 changed files with 317 additions and 298 deletions

View File

@@ -8,7 +8,7 @@
#include <amount.h>
#include <primitives/transaction.h>
#include <random.h>
#include <test/test_bitcoin.h>
#include <test/setup_common.h>
#include <wallet/test/wallet_test_fixture.h>
#include <boost/test/unit_test.hpp>

View File

@@ -7,7 +7,7 @@
#include <boost/test/unit_test.hpp>
#include <fs.h>
#include <test/test_bitcoin.h>
#include <test/setup_common.h>
#include <wallet/db.h>

View File

@@ -6,7 +6,7 @@
#define BITCOIN_WALLET_TEST_INIT_TEST_FIXTURE_H
#include <interfaces/chain.h>
#include <test/test_bitcoin.h>
#include <test/setup_common.h>
struct InitWalletDirTestingSetup: public BasicTestingSetup {

View File

@@ -4,7 +4,7 @@
#include <boost/test/unit_test.hpp>
#include <test/test_bitcoin.h>
#include <test/setup_common.h>
#include <wallet/test/init_test_fixture.h>
#include <init.h>

View File

@@ -12,7 +12,7 @@
#include <univalue.h>
#include <boost/test/unit_test.hpp>
#include <test/test_bitcoin.h>
#include <test/setup_common.h>
#include <wallet/test/wallet_test_fixture.h>
BOOST_FIXTURE_TEST_SUITE(psbt_wallet_tests, WalletTestingSetup)

View File

@@ -2,7 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <test/test_bitcoin.h>
#include <test/setup_common.h>
#include <util/strencodings.h>
#include <wallet/crypter.h>

View File

@@ -5,7 +5,7 @@
#ifndef BITCOIN_WALLET_TEST_WALLET_TEST_FIXTURE_H
#define BITCOIN_WALLET_TEST_WALLET_TEST_FIXTURE_H
#include <test/test_bitcoin.h>
#include <test/setup_common.h>
#include <interfaces/chain.h>
#include <interfaces/wallet.h>

View File

@@ -13,7 +13,7 @@
#include <consensus/validation.h>
#include <interfaces/chain.h>
#include <rpc/server.h>
#include <test/test_bitcoin.h>
#include <test/setup_common.h>
#include <validation.h>
#include <wallet/coincontrol.h>
#include <wallet/test/wallet_test_fixture.h>