aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/core_proxy/CMakeLists.txt2
-rw-r--r--tests/core_proxy/core_proxy.cpp3
-rw-r--r--tests/core_proxy/core_proxy.h3
-rw-r--r--tests/core_tests/CMakeLists.txt2
-rw-r--r--tests/core_tests/chaingen_main.cpp2
-rw-r--r--tests/functional_tests/main.cpp2
-rw-r--r--tests/net_load_tests/CMakeLists.txt6
-rw-r--r--tests/net_load_tests/clt.cpp6
-rw-r--r--tests/net_load_tests/srv.cpp4
-rw-r--r--tests/performance_tests/main.cpp2
-rw-r--r--tests/unit_tests/CMakeLists.txt1
-rw-r--r--tests/unit_tests/main.cpp2
12 files changed, 34 insertions, 1 deletions
diff --git a/tests/core_proxy/CMakeLists.txt b/tests/core_proxy/CMakeLists.txt
index e94d8d803..7d40d72b6 100644
--- a/tests/core_proxy/CMakeLists.txt
+++ b/tests/core_proxy/CMakeLists.txt
@@ -38,6 +38,8 @@ add_executable(core_proxy
target_link_libraries(core_proxy
LINK_PRIVATE
cryptonote_core
+ cryptonote_protocol
+ p2p
${UPNP_LIBRARIES}
${Boost_CHRONO_LIBRARY}
${Boost_FILESYSTEM_LIBRARY}
diff --git a/tests/core_proxy/core_proxy.cpp b/tests/core_proxy/core_proxy.cpp
index da77391c3..b942ed5c5 100644
--- a/tests/core_proxy/core_proxy.cpp
+++ b/tests/core_proxy/core_proxy.cpp
@@ -62,6 +62,8 @@ using namespace crypto;
BOOST_CLASS_VERSION(nodetool::node_server<cryptonote::t_cryptonote_protocol_handler<tests::proxy_core> >, 1);
+unsigned int epee::g_test_dbg_lock_sleep = 0;
+
int main(int argc, char* argv[])
{
@@ -147,6 +149,7 @@ int main(int argc, char* argv[])
LOG_PRINT("Node stopped.", LOG_LEVEL_0);
+ epee::net_utils::data_logger::get_instance().kill_instance();
return 0;
CATCH_ENTRY_L0("main", 1);
diff --git a/tests/core_proxy/core_proxy.h b/tests/core_proxy/core_proxy.h
index 568dfb2ac..b40c5b216 100644
--- a/tests/core_proxy/core_proxy.h
+++ b/tests/core_proxy/core_proxy.h
@@ -81,5 +81,8 @@ namespace tests
bool on_idle(){return true;}
bool find_blockchain_supplement(const std::list<crypto::hash>& qblock_ids, cryptonote::NOTIFY_RESPONSE_CHAIN_ENTRY::request& resp){return true;}
bool handle_get_objects(cryptonote::NOTIFY_REQUEST_GET_OBJECTS::request& arg, cryptonote::NOTIFY_RESPONSE_GET_OBJECTS::request& rsp, cryptonote::cryptonote_connection_context& context){return true;}
+ cryptonote::blockchain_storage &get_blockchain_storage() { throw std::runtime_error("Called invalid member function: please never call get_blockchain_storage on the TESTING class proxy_core."); }
+ bool get_test_drop_download() {return true;}
+ bool get_test_drop_download_height() {return true;}
};
}
diff --git a/tests/core_tests/CMakeLists.txt b/tests/core_tests/CMakeLists.txt
index ac536b29e..2b9e0cf81 100644
--- a/tests/core_tests/CMakeLists.txt
+++ b/tests/core_tests/CMakeLists.txt
@@ -60,6 +60,8 @@ add_executable(coretests
target_link_libraries(coretests
LINK_PRIVATE
cryptonote_core
+ p2p
+ ${Boost_CHRONO_LIBRARY}
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
diff --git a/tests/core_tests/chaingen_main.cpp b/tests/core_tests/chaingen_main.cpp
index 0ec4d4581..a9ef8b00b 100644
--- a/tests/core_tests/chaingen_main.cpp
+++ b/tests/core_tests/chaingen_main.cpp
@@ -44,6 +44,8 @@ namespace
const command_line::arg_descriptor<bool> arg_test_transactions = {"test_transactions", ""};
}
+unsigned int epee::g_test_dbg_lock_sleep = 0;
+
int main(int argc, char* argv[])
{
TRY_ENTRY();
diff --git a/tests/functional_tests/main.cpp b/tests/functional_tests/main.cpp
index fda64303f..a653e7b1b 100644
--- a/tests/functional_tests/main.cpp
+++ b/tests/functional_tests/main.cpp
@@ -55,6 +55,8 @@ namespace
const command_line::arg_descriptor<size_t> arg_test_repeat_count = {"test_repeat_count", "", 1};
}
+unsigned int epee::g_test_dbg_lock_sleep = 0;
+
int main(int argc, char* argv[])
{
TRY_ENTRY();
diff --git a/tests/net_load_tests/CMakeLists.txt b/tests/net_load_tests/CMakeLists.txt
index 89626811f..acd7c9ac9 100644
--- a/tests/net_load_tests/CMakeLists.txt
+++ b/tests/net_load_tests/CMakeLists.txt
@@ -37,6 +37,9 @@ add_executable(net_load_tests_clt
${clt_headers})
target_link_libraries(net_load_tests_clt
LINK_PRIVATE
+ otshell_utils
+ p2p
+ cryptonote_core
${GTEST_MAIN_LIBRARIES}
${Boost_CHRONO_LIBRARY}
${Boost_DATE_TIME_LIBRARY}
@@ -56,6 +59,9 @@ add_executable(net_load_tests_srv
${srv_headers})
target_link_libraries(net_load_tests_srv
LINK_PRIVATE
+ otshell_utils
+ p2p
+ cryptonote_core
${GTEST_MAIN_LIBRARIES}
${Boost_CHRONO_LIBRARY}
${Boost_DATE_TIME_LIBRARY}
diff --git a/tests/net_load_tests/clt.cpp b/tests/net_load_tests/clt.cpp
index 85cad917a..6307f18eb 100644
--- a/tests/net_load_tests/clt.cpp
+++ b/tests/net_load_tests/clt.cpp
@@ -44,7 +44,10 @@
#include "net_load_tests.h"
+#include "../../contrib/otshell_utils/utils.hpp"
+
using namespace net_load_tests;
+using namespace nOT::nUtils;
namespace
{
@@ -620,6 +623,8 @@ TEST_F(net_load_test_clt, permament_open_and_close_and_connections_closed_by_ser
ASSERT_EQ(RESERVED_CONN_CNT, m_tcp_server.get_config_object().get_connections_count());
}
+unsigned int epee::g_test_dbg_lock_sleep = 0;
+
int main(int argc, char** argv)
{
epee::debug::get_set_enable_assert(true, false);
@@ -628,5 +633,6 @@ int main(int argc, char** argv)
epee::log_space::log_singletone::add_logger(LOGGER_CONSOLE, NULL, NULL);
::testing::InitGoogleTest(&argc, argv);
+ epee::net_utils::data_logger::get_instance().kill_instance();
return RUN_ALL_TESTS();
}
diff --git a/tests/net_load_tests/srv.cpp b/tests/net_load_tests/srv.cpp
index edb106ea7..582c9efdf 100644
--- a/tests/net_load_tests/srv.cpp
+++ b/tests/net_load_tests/srv.cpp
@@ -213,6 +213,8 @@ namespace
};
}
+unsigned int epee::g_test_dbg_lock_sleep = 0;
+
int main(int argc, char** argv)
{
//set up logging options
@@ -232,6 +234,6 @@ int main(int argc, char** argv)
if (!tcp_server.run_server(thread_count, true))
return 2;
-
+ epee::net_utils::data_logger::get_instance().kill_instance();
return 0;
}
diff --git a/tests/performance_tests/main.cpp b/tests/performance_tests/main.cpp
index 724b36386..588cf6529 100644
--- a/tests/performance_tests/main.cpp
+++ b/tests/performance_tests/main.cpp
@@ -42,6 +42,8 @@
#include "generate_key_image_helper.h"
#include "is_out_to_acc.h"
+unsigned int epee::g_test_dbg_lock_sleep = 0;
+
int main(int argc, char** argv)
{
set_process_affinity(1);
diff --git a/tests/unit_tests/CMakeLists.txt b/tests/unit_tests/CMakeLists.txt
index c480a312d..41e306835 100644
--- a/tests/unit_tests/CMakeLists.txt
+++ b/tests/unit_tests/CMakeLists.txt
@@ -58,6 +58,7 @@ target_link_libraries(unit_tests
cryptonote_core
rpc
wallet
+ p2p
${GTEST_MAIN_LIBRARIES}
${Boost_CHRONO_LIBRARY}
${Boost_REGEX_LIBRARY}
diff --git a/tests/unit_tests/main.cpp b/tests/unit_tests/main.cpp
index e187bf52d..471895b84 100644
--- a/tests/unit_tests/main.cpp
+++ b/tests/unit_tests/main.cpp
@@ -32,6 +32,8 @@
#include "include_base_utils.h"
+unsigned int epee::g_test_dbg_lock_sleep = 0;
+
int main(int argc, char** argv)
{
epee::debug::get_set_enable_assert(true, false);