Skip to content

Commit

Permalink
fix(modem): Fix target test builds using external catch2
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cermak committed Sep 16, 2024
1 parent 1b6a3b3 commit 38dfcbd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
3 changes: 1 addition & 2 deletions components/esp_modem/test/target/main/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions components/esp_modem/test/target/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dependencies:
espressif/catch2: "*"
idf:
version: ">=4.4"
3 changes: 2 additions & 1 deletion components/esp_modem/test/target/main/pppd_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion components/esp_modem/test/target/sdkconfig.ci.pppd_chap_auth
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion components/esp_modem/test/target/sdkconfig.defaults
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 38dfcbd

Please sign in to comment.