Skip to content

Commit bcebbc6

Browse files
authored
Enable CONFIG_BUILD_FOR_HOST_UNIT_TEST to fix CHIP test build (#32959)
1 parent 8b3d008 commit bcebbc6

File tree

6 files changed

+6
-86
lines changed

6 files changed

+6
-86
lines changed

examples/all-clusters-app/esp32/main/Kconfig.projbuild

-4
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ menu "Demo"
5959
depends on IDF_TARGET_ESP32H2
6060
endchoice
6161

62-
config CHIP_PROJECT_CONFIG
63-
string "CHIP Project Configuration file"
64-
default "main/include/CHIPProjectConfig.h"
65-
6662
choice
6763
prompt "Rendezvous Mode"
6864
default RENDEZVOUS_MODE_BLE if BT_ENABLED

examples/all-clusters-app/esp32/main/include/CHIPProjectConfig.h

-38
This file was deleted.

examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild

-4
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ menu "Demo"
4848
depends on IDF_TARGET_ESP32C2
4949
endchoice
5050

51-
config CHIP_PROJECT_CONFIG
52-
string "CHIP Project Configuration file"
53-
default "main/include/CHIPProjectConfig.h"
54-
5551
choice
5652
prompt "Rendezvous Mode"
5753
default RENDEZVOUS_MODE_BLE if BT_ENABLED

examples/all-clusters-minimal-app/esp32/main/include/CHIPProjectConfig.h

-38
This file was deleted.

src/platform/ESP32/CHIPPlatformConfig.h

+6
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,9 @@
101101
#ifdef CONFIG_CHIP_ENABLE_BDX_LOG_TRANSFER
102102
#define CHIP_CONFIG_ENABLE_BDX_LOG_TRANSFER 1
103103
#endif // CONFIG_CHIP_ENABLE_BDX_LOG_TRANSFER
104+
105+
#ifdef CONFIG_BUILD_CHIP_TESTS
106+
// CHIP tests use APIs that are declared when CONFIG_BUILD_FOR_HOST_UNIT_TEST is enabled
107+
// Enable CONFIG_BUILD_FOR_HOST_UNIT_TEST when building CHIP test binaries
108+
#define CONFIG_BUILD_FOR_HOST_UNIT_TEST 1
109+
#endif

src/test_driver/esp32/main/include/CHIPProjectConfig.h

-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,4 @@
3030
// Enable support functions for parsing command-line arguments
3131
#define CHIP_CONFIG_ENABLE_ARG_PARSER 1
3232

33-
#define CONFIG_BUILD_FOR_HOST_UNIT_TEST 1
34-
3533
#endif // CHIP_PROJECT_CONFIG_H

0 commit comments

Comments
 (0)