mirror of
https://github.com/oxen-io/oxen-core.git
synced 2023-12-14 02:22:56 +01:00
Merge commit '4754819' into LokiMergeUpstream
This commit is contained in:
commit
bd39bc0567
|
@ -884,6 +884,7 @@ set(OLD_LIB_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
|||
if(STATIC)
|
||||
if(MINGW)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
|
||||
set(Boost_NO_BOOST_CMAKE ON)
|
||||
endif()
|
||||
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
|
|
|
@ -70,6 +70,9 @@ using namespace epee;
|
|||
#include "net/http_client.h" // epee::net_utils::...
|
||||
|
||||
#ifdef WIN32
|
||||
#ifndef STRSAFE_NO_DEPRECATE
|
||||
#define STRSAFE_NO_DEPRECATE
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <strsafe.h>
|
||||
|
|
|
@ -412,10 +412,11 @@ namespace trezor {
|
|||
CHECK_AND_ASSERT_THROW_MES(msg, "Empty message");
|
||||
MDEBUG("on_button_request, code: " << msg->code());
|
||||
|
||||
TREZOR_CALLBACK(on_button_request, msg->code());
|
||||
|
||||
messages::common::ButtonAck ack;
|
||||
write_raw(&ack);
|
||||
|
||||
TREZOR_CALLBACK(on_button_request, msg->code());
|
||||
resp = read_raw();
|
||||
}
|
||||
|
||||
|
|
|
@ -50,6 +50,12 @@ target_link_libraries(functional_tests
|
|||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${EXTRA_LIBRARIES})
|
||||
|
||||
add_test(
|
||||
NAME functional_tests_rpc
|
||||
COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/functional_tests_rpc.py" "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" all)
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} "-c" "import requests; print('OK')" OUTPUT_VARIABLE REQUESTS_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if (REQUESTS_OUTPUT STREQUAL "OK")
|
||||
add_test(
|
||||
NAME functional_tests_rpc
|
||||
COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/functional_tests_rpc.py" "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" all)
|
||||
else()
|
||||
message(WARNING "functional_tests_rpc skipped, needs the 'requests' python module")
|
||||
set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE} functional_tests_rpc)
|
||||
endif()
|
||||
|
|
|
@ -546,7 +546,7 @@ namespace
|
|||
connected(false)
|
||||
{
|
||||
acceptor.open(boost::asio::ip::tcp::v4());
|
||||
acceptor.bind(stream_type::endpoint{boost::asio::ip::tcp::v4(), 0});
|
||||
acceptor.bind(stream_type::endpoint{boost::asio::ip::address_v4::loopback(), 0});
|
||||
acceptor.listen();
|
||||
acceptor.async_accept(server, [this] (boost::system::error_code error) {
|
||||
this->connected = true;
|
||||
|
@ -621,7 +621,8 @@ TEST(socks_client, connect_command)
|
|||
ASSERT_TRUE(test_client->set_connect_command("example.com", 8080));
|
||||
EXPECT_FALSE(test_client->buffer().empty());
|
||||
ASSERT_TRUE(net::socks::client::connect_and_send(std::move(test_client), io.acceptor.local_endpoint()));
|
||||
while (!io.connected);
|
||||
while (!io.connected)
|
||||
ASSERT_FALSE(called);
|
||||
|
||||
const std::uint8_t expected_bytes[] = {
|
||||
4, 1, 0x1f, 0x90, 0x00, 0x00, 0x00, 0x01, 0x00,
|
||||
|
@ -657,7 +658,8 @@ TEST(socks_client, connect_command_failed)
|
|||
);
|
||||
EXPECT_FALSE(test_client->buffer().empty());
|
||||
ASSERT_TRUE(net::socks::client::connect_and_send(std::move(test_client), io.acceptor.local_endpoint()));
|
||||
while (!io.connected);
|
||||
while (!io.connected)
|
||||
ASSERT_FALSE(called);
|
||||
|
||||
const std::uint8_t expected_bytes[] = {
|
||||
4, 1, 0x0b, 0xb8, 0x00, 0x00, 0x13, 0x88, 0x00
|
||||
|
@ -713,7 +715,8 @@ TEST(socks_client, resolve_command)
|
|||
ASSERT_TRUE(test_client->set_resolve_command("example.com"));
|
||||
EXPECT_FALSE(test_client->buffer().empty());
|
||||
ASSERT_TRUE(net::socks::client::connect_and_send(test_client, io.acceptor.local_endpoint()));
|
||||
while (!io.connected);
|
||||
while (!io.connected)
|
||||
ASSERT_EQ(0u, test_client->called_);
|
||||
|
||||
const std::uint8_t expected_bytes[] = {
|
||||
4, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
|
||||
|
@ -753,7 +756,8 @@ TEST(socks_connector, host)
|
|||
boost::unique_future<boost::asio::ip::tcp::socket> sock =
|
||||
net::socks::connector{io.acceptor.local_endpoint()}("example.com", "8080", timeout);
|
||||
|
||||
while (!io.connected);
|
||||
while (!io.connected)
|
||||
ASSERT_FALSE(sock.is_ready());
|
||||
const std::uint8_t expected_bytes[] = {
|
||||
4, 1, 0x1f, 0x90, 0x00, 0x00, 0x00, 0x01, 0x00,
|
||||
'e', 'x', 'a', 'm', 'p', 'l', 'e', '.', 'c', 'o', 'm', 0x00
|
||||
|
@ -779,7 +783,8 @@ TEST(socks_connector, ipv4)
|
|||
boost::unique_future<boost::asio::ip::tcp::socket> sock =
|
||||
net::socks::connector{io.acceptor.local_endpoint()}("250.88.125.99", "8080", timeout);
|
||||
|
||||
while (!io.connected);
|
||||
while (!io.connected)
|
||||
ASSERT_FALSE(sock.is_ready());
|
||||
const std::uint8_t expected_bytes[] = {
|
||||
4, 1, 0x1f, 0x90, 0xfa, 0x58, 0x7d, 0x63, 0x00
|
||||
};
|
||||
|
@ -804,7 +809,8 @@ TEST(socks_connector, error)
|
|||
boost::unique_future<boost::asio::ip::tcp::socket> sock =
|
||||
net::socks::connector{io.acceptor.local_endpoint()}("250.88.125.99", "8080", timeout);
|
||||
|
||||
while (!io.connected);
|
||||
while (!io.connected)
|
||||
ASSERT_FALSE(sock.is_ready());
|
||||
const std::uint8_t expected_bytes[] = {
|
||||
4, 1, 0x1f, 0x90, 0xfa, 0x58, 0x7d, 0x63, 0x00
|
||||
};
|
||||
|
|
4878
translations/loki.ts
4878
translations/loki.ts
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue