From 38dfcbdb62ef004c0b5f369dae13ab67f73513ce Mon Sep 17 00:00:00 2001 From: David Cermak Date: Mon, 16 Sep 2024 16:07:02 +0200 Subject: [PATCH] fix(modem): Fix target test builds using external catch2 --- components/esp_modem/test/target/main/CMakeLists.txt | 3 +-- components/esp_modem/test/target/main/idf_component.yml | 4 ++++ components/esp_modem/test/target/main/pppd_test.cpp | 3 ++- components/esp_modem/test/target/sdkconfig.ci.pppd_chap_auth | 3 ++- components/esp_modem/test/target/sdkconfig.defaults | 3 ++- 5 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 components/esp_modem/test/target/main/idf_component.yml diff --git a/components/esp_modem/test/target/main/CMakeLists.txt b/components/esp_modem/test/target/main/CMakeLists.txt index 37807fcf435..c7b4db46142 100644 --- a/components/esp_modem/test/target/main/CMakeLists.txt +++ b/components/esp_modem/test/target/main/CMakeLists.txt @@ -1,7 +1,6 @@ idf_component_register(SRCS "pppd_test.cpp" "NetworkDCE.cpp" - INCLUDE_DIRS "$ENV{IDF_PATH}/tools/catch" - REQUIRES esp_modem) + REQUIRES esp_modem catch2) set_target_properties(${COMPONENT_LIB} PROPERTIES CXX_STANDARD 17 diff --git a/components/esp_modem/test/target/main/idf_component.yml b/components/esp_modem/test/target/main/idf_component.yml new file mode 100644 index 00000000000..eed6d8a02d5 --- /dev/null +++ b/components/esp_modem/test/target/main/idf_component.yml @@ -0,0 +1,4 @@ +dependencies: + espressif/catch2: "*" + idf: + version: ">=4.4" diff --git a/components/esp_modem/test/target/main/pppd_test.cpp b/components/esp_modem/test/target/main/pppd_test.cpp index 4d486097737..f1e09cf4b2d 100644 --- a/components/esp_modem/test/target/main/pppd_test.cpp +++ b/components/esp_modem/test/target/main/pppd_test.cpp @@ -18,7 +18,8 @@ #include "freertos/event_groups.h" #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_test_macros.hpp" +#include "catch2/catch_session.hpp" static const char *TAG = "pppd_test"; static EventGroupHandle_t event_group = NULL; diff --git a/components/esp_modem/test/target/sdkconfig.ci.pppd_chap_auth b/components/esp_modem/test/target/sdkconfig.ci.pppd_chap_auth index 23b587e9ce5..7777069b199 100644 --- a/components/esp_modem/test/target/sdkconfig.ci.pppd_chap_auth +++ b/components/esp_modem/test/target/sdkconfig.ci.pppd_chap_auth @@ -1,4 +1,5 @@ CONFIG_COMPILER_CXX_EXCEPTIONS=y -CONFIG_ESP_MAIN_TASK_STACK_SIZE=4096 +CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192 CONFIG_LWIP_PPP_SUPPORT=y +CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y CONFIG_TEST_APP_AUTH=y diff --git a/components/esp_modem/test/target/sdkconfig.defaults b/components/esp_modem/test/target/sdkconfig.defaults index 28ae669b937..8bdcab28ad0 100644 --- a/components/esp_modem/test/target/sdkconfig.defaults +++ b/components/esp_modem/test/target/sdkconfig.defaults @@ -1,3 +1,4 @@ CONFIG_COMPILER_CXX_EXCEPTIONS=y -CONFIG_ESP_MAIN_TASK_STACK_SIZE=4096 +CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192 CONFIG_LWIP_PPP_SUPPORT=y +CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y