Skip to content

Commit 38dfcbd

Browse files
committed
fix(modem): Fix target test builds using external catch2
1 parent 1b6a3b3 commit 38dfcbd

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

components/esp_modem/test/target/main/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
idf_component_register(SRCS "pppd_test.cpp"
22
"NetworkDCE.cpp"
3-
INCLUDE_DIRS "$ENV{IDF_PATH}/tools/catch"
4-
REQUIRES esp_modem)
3+
REQUIRES esp_modem catch2)
54

65
set_target_properties(${COMPONENT_LIB} PROPERTIES
76
CXX_STANDARD 17
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dependencies:
2+
espressif/catch2: "*"
3+
idf:
4+
version: ">=4.4"

components/esp_modem/test/target/main/pppd_test.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
#include "freertos/event_groups.h"
1919

2020
#define CATCH_CONFIG_MAIN
21-
#include "catch.hpp"
21+
#include "catch2/catch_test_macros.hpp"
22+
#include "catch2/catch_session.hpp"
2223

2324
static const char *TAG = "pppd_test";
2425
static EventGroupHandle_t event_group = NULL;
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
CONFIG_COMPILER_CXX_EXCEPTIONS=y
2-
CONFIG_ESP_MAIN_TASK_STACK_SIZE=4096
2+
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
33
CONFIG_LWIP_PPP_SUPPORT=y
4+
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
45
CONFIG_TEST_APP_AUTH=y
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
CONFIG_COMPILER_CXX_EXCEPTIONS=y
2-
CONFIG_ESP_MAIN_TASK_STACK_SIZE=4096
2+
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
33
CONFIG_LWIP_PPP_SUPPORT=y
4+
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y

0 commit comments

Comments
 (0)