Moving nano::system out of the node library and in to the test_core library since it is a testing class. Also renaming file from testing.c/hpp to system.c/hpp to better represent what the file contains.

This commit is contained in:
clemahieu 2021-06-13 15:29:03 +02:00
commit f6cdf1eacd
No known key found for this signature in database
GPG key ID: 43708520C8DFB938
39 changed files with 46 additions and 39 deletions

View file

@ -610,6 +610,7 @@ if(NANO_GUI OR RAIBLOCKS_GUI)
node
secure
nano_lib
test_common
libminiupnpc-static
Qt5::Gui
Qt5::Widgets)

View file

@ -1,6 +1,6 @@
#include <nano/lib/jsonconfig.hpp>
#include <nano/node/election.hpp>
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -7,10 +7,10 @@
#include <nano/node/common.hpp>
#include <nano/node/lmdb/lmdb.hpp>
#include <nano/node/rocksdb/rocksdb.hpp>
#include <nano/node/testing.hpp>
#include <nano/secure/ledger.hpp>
#include <nano/secure/utility.hpp>
#include <nano/secure/versioning.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,6 +1,6 @@
#include <nano/node/bootstrap/bootstrap_frontier.hpp>
#include <nano/node/bootstrap/bootstrap_lazy.hpp>
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,5 +1,5 @@
#include <nano/node/election.hpp>
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,6 +1,6 @@
#include <nano/lib/jsonconfig.hpp>
#include <nano/node/confirmation_solicitor.hpp>
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,5 +1,5 @@
#include <nano/node/election.hpp>
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -3,7 +3,7 @@
#include <nano/lib/epoch.hpp>
#include <nano/lib/numbers.hpp>
#include <nano/lib/work.hpp>
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,5 +1,5 @@
#include <nano/core_test/fakes/work_peer.hpp>
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,5 +1,5 @@
#include <nano/node/election.hpp>
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,5 +1,5 @@
#include <nano/node/election_scheduler.hpp>
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,5 +1,5 @@
#include <nano/node/active_transactions.hpp>
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,4 +1,4 @@
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -2,8 +2,8 @@
#include <nano/lib/tomlconfig.hpp>
#include <nano/node/ipc/ipc_access_config.hpp>
#include <nano/node/ipc/ipc_server.hpp>
#include <nano/node/testing.hpp>
#include <nano/rpc/rpc.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -2,7 +2,7 @@
#include <nano/lib/threading.hpp>
#include <nano/node/election.hpp>
#include <nano/node/rocksdb/rocksdb.hpp>
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,4 +1,4 @@
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,6 +1,6 @@
#include <nano/node/testing.hpp>
#include <nano/node/transport/udp.hpp>
#include <nano/test_common/network.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,8 +1,8 @@
#include <nano/lib/jsonconfig.hpp>
#include <nano/node/election.hpp>
#include <nano/node/testing.hpp>
#include <nano/node/transport/udp.hpp>
#include <nano/test_common/network.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,4 +1,4 @@
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,6 +1,6 @@
#include <nano/lib/jsonconfig.hpp>
#include <nano/node/request_aggregator.hpp>
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,6 +1,6 @@
#include <nano/lib/threading.hpp>
#include <nano/node/socket.hpp>
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,6 +1,6 @@
#include <nano/node/telemetry.hpp>
#include <nano/node/testing.hpp>
#include <nano/test_common/telemetry.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,6 +1,6 @@
#include <nano/lib/jsonconfig.hpp>
#include <nano/node/testing.hpp>
#include <nano/node/vote_processor.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,6 +1,6 @@
#include <nano/node/common.hpp>
#include <nano/node/testing.hpp>
#include <nano/node/voting.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,7 +1,7 @@
#include <nano/crypto_lib/random_pool.hpp>
#include <nano/lib/threading.hpp>
#include <nano/node/lmdb/wallet_value.hpp>
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,5 +1,5 @@
#include <nano/node/testing.hpp>
#include <nano/secure/versioning.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,7 +1,7 @@
#include <nano/core_test/fakes/websocket_client.hpp>
#include <nano/node/testing.hpp>
#include <nano/node/websocket.hpp>
#include <nano/test_common/telemetry.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -128,8 +128,6 @@ add_library(
state_block_signature_verification.cpp
telemetry.hpp
telemetry.cpp
testing.hpp
testing.cpp
transport/tcp.hpp
transport/tcp.cpp
transport/transport.hpp

View file

@ -6,10 +6,10 @@
#include <nano/node/node.hpp>
#include <nano/node/rocksdb/rocksdb.hpp>
#include <nano/node/telemetry.hpp>
#include <nano/node/testing.hpp>
#include <nano/node/websocket.hpp>
#include <nano/rpc/rpc.hpp>
#include <nano/secure/buffer.hpp>
#include <nano/test_common/system.hpp>
#include <boost/filesystem.hpp>
#include <boost/property_tree/json_parser.hpp>
@ -1781,7 +1781,7 @@ nano::node_wrapper::node_wrapper (boost::filesystem::path const & path_a, boost:
}
auto & node_config = daemon_config.node;
node_config.peering_port = nano::get_available_port ();
//node_config.peering_port = nano::get_available_port ();
node_config.logging.max_size = std::numeric_limits<std::uintmax_t>::max ();
node_config.logging.init (path_a);

View file

@ -24,6 +24,7 @@ class rep_crawler;
class ledger;
class network_params;
class node_flags;
class stat;
class transaction;
namespace transport

View file

@ -2,8 +2,8 @@
#include <nano/lib/config.hpp>
#include <nano/lib/threading.hpp>
#include <nano/node/common.hpp>
#include <nano/node/testing.hpp>
#include <nano/qt/qt.hpp>
#include <nano/test_common/system.hpp>
#include <boost/format.hpp>

View file

@ -1,5 +1,5 @@
#include <nano/node/testing.hpp>
#include <nano/qt/qt.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -5,10 +5,10 @@
#include <nano/node/ipc/ipc_server.hpp>
#include <nano/node/json_handler.hpp>
#include <nano/node/node_rpc_config.hpp>
#include <nano/node/testing.hpp>
#include <nano/rpc/rpc.hpp>
#include <nano/rpc/rpc_request_processor.hpp>
#include <nano/test_common/telemetry.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,9 +1,9 @@
#include <nano/crypto_lib/random_pool.hpp>
#include <nano/lib/threading.hpp>
#include <nano/node/election.hpp>
#include <nano/node/testing.hpp>
#include <nano/node/transport/udp.hpp>
#include <nano/test_common/network.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,5 +1,12 @@
add_library(test_common network.hpp network.cpp telemetry.hpp telemetry.cpp
testutil.hpp testutil.cpp)
add_library(test_common
network.hpp
network.cpp
system.hpp
system.cpp
telemetry.hpp
telemetry.cpp
testutil.hpp
testutil.cpp)
target_link_libraries(test_common node gtest Boost::log_setup Boost::log
Boost::boost)

View file

@ -1,6 +1,6 @@
#include <nano/node/node.hpp>
#include <nano/node/testing.hpp>
#include <nano/test_common/network.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>

View file

@ -1,7 +1,7 @@
#include <nano/crypto_lib/random_pool.hpp>
#include <nano/node/common.hpp>
#include <nano/node/testing.hpp>
#include <nano/node/transport/udp.hpp>
#include <nano/test_common/system.hpp>
#include <boost/property_tree/json_parser.hpp>

View file

@ -1,5 +1,5 @@
#include <nano/crypto_lib/random_pool.hpp>
#include <nano/node/testing.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
#include <gtest/gtest.h>