1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-08-08 09:42:06 +03:00

remove targets built from headers only (part II)

Summary:
Some versions of compilers, linkers and cmake doesn't support. Required to
support OSX build

Reviewed By: afrind

Differential Revision: D15204709

fbshipit-source-id: a9cbb5a59a0df0fa82838eb38a78a22e619db4ec
This commit is contained in:
Udip Pant
2019-05-03 14:20:47 -07:00
committed by Facebook Github Bot
parent cac8669705
commit 4dd8efffcb
10 changed files with 14 additions and 110 deletions

View File

@@ -129,13 +129,10 @@ class MockConnectionCallback : public QuicSocket::ConnectionCallback {
class MockDeliveryCallback : public QuicSocket::DeliveryCallback { class MockDeliveryCallback : public QuicSocket::DeliveryCallback {
public: public:
~MockDeliveryCallback() override = default; ~MockDeliveryCallback() override = default;
GMOCK_METHOD3_( MOCK_METHOD3(
,
,
,
onDeliveryAck, onDeliveryAck,
void(StreamId, uint64_t, std::chrono::microseconds)); void(StreamId, uint64_t, std::chrono::microseconds));
GMOCK_METHOD2_(, , , onCanceled, void(StreamId, size_t)); MOCK_METHOD2(onCanceled, void(StreamId, uint64_t));
}; };
class MockDataExpiredCallback : public QuicSocket::DataExpiredCallback { class MockDataExpiredCallback : public QuicSocket::DataExpiredCallback {

View File

@@ -161,7 +161,7 @@ class TransportClosingDeliveryCallback : public QuicSocket::DeliveryCallback {
} }
} }
void onCanceled(StreamId, size_t) override { void onCanceled(StreamId, uint64_t) override {
transport_->close(folly::none); transport_->close(folly::none);
} }
@@ -280,7 +280,7 @@ void verifyCorrectness(
const folly::IOBuf& expected, const folly::IOBuf& expected,
bool finExpected = false, bool finExpected = false,
bool writeAll = true) { bool writeAll = true) {
size_t endOffset = 0; uint64_t endOffset = 0;
size_t totalLen = 0; size_t totalLen = 0;
bool finSet = false; bool finSet = false;
std::vector<uint64_t> offsets; std::vector<uint64_t> offsets;

View File

@@ -15,7 +15,6 @@ quic_add_test(TARGET QuicClientTransportTest
${LIBGMOCK_LIBRARIES} ${LIBGMOCK_LIBRARIES}
mvfst_client mvfst_client
mvfst_codec_types mvfst_codec_types
mvfst_echohandler
mvfst_handshake mvfst_handshake
mvfst_server mvfst_server
mvfst_test_utils mvfst_test_utils

View File

@@ -7,28 +7,6 @@ if(NOT BUILD_TESTS)
return() return()
endif() endif()
add_library(mvfst_mock_codec STATIC
Mocks.h
)
target_include_directories(
mvfst_mock_codec PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
add_dependencies(
mvfst_mock_codec
mvfst_codec_pktbuilder
mvfst_test_utils
)
target_link_libraries(
mvfst_mock_codec PUBLIC
Folly::folly
mvfst_codec_pktbuilder
mvfst_test_utils
)
quic_add_test(TARGET QuicHeaderCodecTest quic_add_test(TARGET QuicHeaderCodecTest
SOURCES SOURCES
QuicHeaderCodecTest.cpp QuicHeaderCodecTest.cpp
@@ -60,7 +38,6 @@ quic_add_test(TARGET QuicWriteCodecTest
mvfst_codec_decode mvfst_codec_decode
mvfst_codec_types mvfst_codec_types
mvfst_exception mvfst_exception
mvfst_mock_codec
mvfst_test_utils mvfst_test_utils
${LIBGTEST_LIBRARY} ${LIBGTEST_LIBRARY}
) )
@@ -128,7 +105,6 @@ quic_add_test(TARGET QuicPacketBuilderTest
mvfst_codec_pktrebuilder mvfst_codec_pktrebuilder
mvfst_codec_types mvfst_codec_types
mvfst_handshake mvfst_handshake
mvfst_mock_codec
mvfst_server mvfst_server
mvfst_state_functions mvfst_state_functions
mvfst_state_machine mvfst_state_machine

View File

@@ -7,26 +7,6 @@ if(NOT BUILD_TESTS)
return() return()
endif() endif()
add_library(mvfst_cubic_test_utils STATIC
TestingCubic.h
)
target_include_directories(
mvfst_cubic_test_utils PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
add_dependencies(
mvfst_cubic_test_utils
mvfst_cc_algo
)
target_link_libraries(
mvfst_cubic_test_utils PUBLIC
Folly::folly
mvfst_cc_algo
)
quic_add_test(TARGET CongestionControllerTests quic_add_test(TARGET CongestionControllerTests
SOURCES SOURCES
CongestionControlFunctionsTest.cpp CongestionControlFunctionsTest.cpp
@@ -40,7 +20,6 @@ quic_add_test(TARGET CongestionControllerTests
DEPENDS DEPENDS
Folly::folly Folly::folly
mvfst_cc_algo mvfst_cc_algo
mvfst_cubic_test_utils
mvfst_test_utils mvfst_test_utils
${LIBGTEST_LIBRARY} ${LIBGTEST_LIBRARY}
) )

View File

@@ -7,22 +7,6 @@ if(NOT BUILD_TESTS)
return() return()
endif() endif()
add_library(quic_mock_handshake STATIC
Mocks.h
)
target_include_directories(
quic_mock_handshake PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
target_link_libraries(
quic_mock_handshake PUBLIC
Folly::folly
${LIBGMOCK_LIBRARIES}
${LIBGTEST_LIBRARY}
)
quic_add_test(TARGET TransportParametersTest quic_add_test(TARGET TransportParametersTest
SOURCES SOURCES
TransportParametersTest.cpp TransportParametersTest.cpp
@@ -40,7 +24,6 @@ quic_add_test(TARGET HandshakeLayerTest
Folly::folly Folly::folly
mvfst_codec_types mvfst_codec_types
mvfst_handshake mvfst_handshake
quic_mock_handshake
mvfst_test_utils mvfst_test_utils
${LIBGTEST_LIBRARY} ${LIBGTEST_LIBRARY}
) )

View File

@@ -7,42 +7,6 @@ if(NOT BUILD_TESTS)
return() return()
endif() endif()
add_library(
mvfst_echohandler STATIC
echo/EchoClient.h
echo/EchoHandler.h
echo/EchoServer.h
)
target_include_directories(
mvfst_echohandler PUBLIC
$<BUILD_INTERFACE:${QUIC_FBCODE_ROOT}>
${QUIC_EXTRA_INCLUDE_DIRECTORIES}
$<INSTALL_INTERFACE:include/>
)
target_compile_options(
mvfst_echohandler
PRIVATE
${_QUIC_COMMON_COMPILE_OPTIONS}
)
target_link_libraries(
mvfst_echohandler PUBLIC
Folly::folly
fizz::fizz
mvfst_transport
mvfst_client
mvfst_test_utils
mvfst_server
${LIBGTEST_LIBRARY}
)
install(
TARGETS mvfst_echohandler
DESTINATION lib
)
file( file(
GLOB_RECURSE QUIC_API_HEADERS_TOINSTALL GLOB_RECURSE QUIC_API_HEADERS_TOINSTALL
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
@@ -55,9 +19,15 @@ foreach(header ${QUIC_API_HEADERS_TOINSTALL})
endforeach() endforeach()
add_executable(echo echo/main.cpp) add_executable(echo echo/main.cpp)
target_compile_options(
echo
PRIVATE
${_QUIC_COMMON_COMPILE_OPTIONS}
)
target_link_libraries( target_link_libraries(
echo PUBLIC echo PUBLIC
mvfst_echohandler
mvfst_test_utils mvfst_test_utils
${GFLAGS_LIBRARIES} ${GFLAGS_LIBRARIES}
${LIBGMOCK_LIBRARIES} ${LIBGMOCK_LIBRARIES}

View File

@@ -81,7 +81,7 @@ class EchoClient : public quic::QuicSocket::ConnectionCallback,
void onStreamWriteReady( void onStreamWriteReady(
quic::StreamId id, quic::StreamId id,
size_t maxToSend) noexcept override { uint64_t maxToSend) noexcept override {
LOG(INFO) << "EchoClient socket is write ready with maxToSend=" LOG(INFO) << "EchoClient socket is write ready with maxToSend="
<< maxToSend; << maxToSend;
sendMessage(id, pendingOutput_[id]); sendMessage(id, pendingOutput_[id]);

View File

@@ -160,7 +160,7 @@ class EchoHandler : public quic::QuicSocket::ConnectionCallback,
void onStreamWriteReady( void onStreamWriteReady(
quic::StreamId id, quic::StreamId id,
size_t maxToSend) noexcept override { uint64_t maxToSend) noexcept override {
LOG(INFO) << "socket is write ready with maxToSend=" << maxToSend; LOG(INFO) << "socket is write ready with maxToSend=" << maxToSend;
echo(id, input_[id]); echo(id, input_[id]);
} }

View File

@@ -15,7 +15,7 @@ quic_add_test(TARGET QuicServerTest
Folly::folly Folly::folly
mvfst_codec mvfst_codec
mvfst_codec_types mvfst_codec_types
mvfst_echohandler mvfst_mock_socket
mvfst_server mvfst_server
mvfst_test_utils mvfst_test_utils
mvfst_transport mvfst_transport