Skip to content

Commit 3335271

Browse files
Add project config to ESP all-clusters-app to enable the unit test defines
1 parent 4232035 commit 3335271

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ 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+
6266
choice
6367
prompt "Rendezvous Mode"
6468
default RENDEZVOUS_MODE_BLE if BT_ENABLED
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
*
3+
* Copyright (c) 2023 Project CHIP Authors
4+
* All rights reserved.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
/**
20+
* @file
21+
* Example project configuration file for CHIP.
22+
*
23+
* This is a place to put application or project-specific overrides
24+
* to the default configuration values for general CHIP features.
25+
*
26+
*/
27+
28+
#pragma once
29+
30+
/**
31+
* @def CONFIG_BUILD_FOR_HOST_UNIT_TEST
32+
*
33+
* @brief Defines whether we're currently building for unit testing, which enables a set of features
34+
* that are only utilized in those tests. This flag should not be enabled on devices. If you have a test
35+
* that uses this flag, either appropriately conditionalize the entire test on this flag, or to exclude
36+
* the compliation of that test source file entirely.
37+
*/
38+
#define CONFIG_BUILD_FOR_HOST_UNIT_TEST CONFIG_BUILD_CHIP_TESTS

0 commit comments

Comments
 (0)