forked from espressif/esp-idf
ci(tcp_transport): upgrade to Catch2 as a component
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
idf_component_register(SRCS "test_socks_transport.cpp" "catch_main.cpp"
|
idf_component_register(SRCS "test_socks_transport.cpp"
|
||||||
REQUIRES tcp_transport mocked_transport
|
REQUIRES tcp_transport mocked_transport
|
||||||
INCLUDE_DIRS "$ENV{IDF_PATH}/tools"
|
INCLUDE_DIRS "$ENV{IDF_PATH}/tools"
|
||||||
WHOLE_ARCHIVE)
|
WHOLE_ARCHIVE)
|
||||||
@@ -9,4 +9,7 @@ idf_component_get_property(tcp_transport_component tcp_transport COMPONENT_LIB)
|
|||||||
target_link_libraries(${tcp_transport_component} PUBLIC ${lwip_component} ${esp_timer_component})
|
target_link_libraries(${tcp_transport_component} PUBLIC ${lwip_component} ${esp_timer_component})
|
||||||
target_compile_options(${COMPONENT_LIB} PUBLIC -fsanitize=address -fconcepts)
|
target_compile_options(${COMPONENT_LIB} PUBLIC -fsanitize=address -fconcepts)
|
||||||
target_link_options(${COMPONENT_LIB} PUBLIC -fsanitize=address)
|
target_link_options(${COMPONENT_LIB} PUBLIC -fsanitize=address)
|
||||||
set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 20)
|
|
||||||
|
# Currently 'main' for IDF_TARGET=linux is defined in freertos component.
|
||||||
|
# Since we are using a freertos mock here, need to let Catch2 provide 'main'.
|
||||||
|
target_link_libraries(${COMPONENT_LIB} PRIVATE Catch2WithMain)
|
||||||
|
@@ -1,7 +0,0 @@
|
|||||||
/*
|
|
||||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
#define CATCH_CONFIG_MAIN
|
|
||||||
#include "catch/catch.hpp"
|
|
@@ -1,4 +1,3 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
espressif/fmt: "^9.1.0"
|
espressif/fmt: "^9.1.0"
|
||||||
idf:
|
espressif/catch2: "^3.4.0"
|
||||||
version: ">=4.1.0"
|
|
||||||
|
@@ -16,7 +16,8 @@
|
|||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include "fmt/core.h"
|
#include "fmt/core.h"
|
||||||
#include "fmt/ranges.h"
|
#include "fmt/ranges.h"
|
||||||
#include "catch/catch.hpp"
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
#include <catch2/matchers/catch_matchers_all.hpp>
|
||||||
#include "esp_transport.h"
|
#include "esp_transport.h"
|
||||||
#include "esp_transport_socks_proxy.h"
|
#include "esp_transport_socks_proxy.h"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user