mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-19 21:31:33 +02:00
test: Remove useless test_bitcoin_main.cpp
This commit is contained in:
parent
fab2daa026
commit
fa02b22245
@ -25,7 +25,7 @@
|
|||||||
<ClCompile Include="..\..\src\test\gen\*_gen.cpp" />
|
<ClCompile Include="..\..\src\test\gen\*_gen.cpp" />
|
||||||
<ClCompile Include="..\..\src\wallet\test\*_tests.cpp" />
|
<ClCompile Include="..\..\src\wallet\test\*_tests.cpp" />
|
||||||
<ClCompile Include="..\..\src\test\test_bitcoin.cpp" />
|
<ClCompile Include="..\..\src\test\test_bitcoin.cpp" />
|
||||||
<ClCompile Include="..\..\src\test\test_bitcoin_main.cpp" />
|
<ClCompile Include="..\..\src\test\main.cpp" />
|
||||||
<ClCompile Include="..\..\src\wallet\test\*_fixture.cpp" />
|
<ClCompile Include="..\..\src\wallet\test\*_fixture.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -51,7 +51,7 @@ RAW_TEST_FILES =
|
|||||||
GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h)
|
GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h)
|
||||||
|
|
||||||
BITCOIN_TEST_SUITE = \
|
BITCOIN_TEST_SUITE = \
|
||||||
test/test_bitcoin_main.cpp \
|
test/main.cpp \
|
||||||
test/test_bitcoin.h \
|
test/test_bitcoin.h \
|
||||||
test/test_bitcoin.cpp
|
test/test_bitcoin.cpp
|
||||||
|
|
||||||
|
7
src/test/main.cpp
Normal file
7
src/test/main.cpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||||
|
// Distributed under the MIT software license, see the accompanying
|
||||||
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
|
#define BOOST_TEST_MODULE Bitcoin Core Test Suite
|
||||||
|
|
||||||
|
#include <boost/test/unit_test.hpp>
|
@ -84,12 +84,12 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha
|
|||||||
if (!LoadGenesisBlock(chainparams)) {
|
if (!LoadGenesisBlock(chainparams)) {
|
||||||
throw std::runtime_error("LoadGenesisBlock failed.");
|
throw std::runtime_error("LoadGenesisBlock failed.");
|
||||||
}
|
}
|
||||||
{
|
|
||||||
CValidationState state;
|
CValidationState state;
|
||||||
if (!ActivateBestChain(state, chainparams)) {
|
if (!ActivateBestChain(state, chainparams)) {
|
||||||
throw std::runtime_error(strprintf("ActivateBestChain failed. (%s)", FormatStateMessage(state)));
|
throw std::runtime_error(strprintf("ActivateBestChain failed. (%s)", FormatStateMessage(state)));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
nScriptCheckThreads = 3;
|
nScriptCheckThreads = 3;
|
||||||
for (int i = 0; i < nScriptCheckThreads - 1; i++)
|
for (int i = 0; i < nScriptCheckThreads - 1; i++)
|
||||||
threadGroup.create_thread(&ThreadScriptCheck);
|
threadGroup.create_thread(&ThreadScriptCheck);
|
||||||
|
@ -71,10 +71,6 @@ private:
|
|||||||
/** Testing setup that configures a complete environment.
|
/** Testing setup that configures a complete environment.
|
||||||
* Included are data directory, coins database, script check threads setup.
|
* Included are data directory, coins database, script check threads setup.
|
||||||
*/
|
*/
|
||||||
class CConnman;
|
|
||||||
class CNode;
|
|
||||||
|
|
||||||
class PeerLogicValidation;
|
|
||||||
struct TestingSetup : public BasicTestingSetup {
|
struct TestingSetup : public BasicTestingSetup {
|
||||||
boost::thread_group threadGroup;
|
boost::thread_group threadGroup;
|
||||||
CScheduler scheduler;
|
CScheduler scheduler;
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
// Copyright (c) 2011-2018 The Bitcoin Core developers
|
|
||||||
// Distributed under the MIT software license, see the accompanying
|
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
||||||
|
|
||||||
#define BOOST_TEST_MODULE Bitcoin Test Suite
|
|
||||||
|
|
||||||
#include <banman.h>
|
|
||||||
#include <net.h>
|
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
#include <boost/test/unit_test.hpp>
|
|
||||||
|
|
||||||
std::unique_ptr<CConnman> g_connman;
|
|
||||||
std::unique_ptr<BanMan> g_banman;
|
|
||||||
|
|
||||||
[[noreturn]] void Shutdown(void* parg)
|
|
||||||
{
|
|
||||||
std::exit(EXIT_SUCCESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
[[noreturn]] void StartShutdown()
|
|
||||||
{
|
|
||||||
std::exit(EXIT_SUCCESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ShutdownRequested()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user