Skip to content

Commit 85629a5

Browse files
authored
Merge branch 'master' into increase_timeout_per_endpoint_runner
2 parents 82a6c00 + 7085588 commit 85629a5

File tree

399 files changed

+52446
-2407
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

399 files changed

+52446
-2407
lines changed

.github/.wordlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ DS
454454
duplicative
455455
DUT
456456
DUTS
457+
DUT's
457458
DV
458459
DVK
459460
dynload
@@ -562,6 +563,7 @@ forkpty
562563
FOTA
563564
FreeRTOS
564565
FreeRTOSConfig
566+
FS
565567
fsl
566568
fstab
567569
fsync
@@ -854,6 +856,7 @@ MbedNewTarget
854856
mbedos
855857
mbedTarget
856858
mbedTLS
859+
MCORE
857860
mcu
858861
MCUboot
859862
mcumgr

.github/workflows/build.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
with:
7676
languages: "cpp"
7777
- name: Setup Build
78-
run: scripts/build/gn_gen.sh --args="chip_config_memory_debug_checks=true chip_config_memory_debug_dmalloc=false"
78+
run: scripts/build/gn_gen.sh --args="chip_config_memory_debug_checks=true chip_config_memory_debug_dmalloc=false chip_data_model_check_die_on_failure=true"
7979
- name: Run Build
8080
run: scripts/run_in_build_env.sh "ninja -C ./out"
8181
- name: Run Tests
@@ -179,7 +179,7 @@ jobs:
179179
scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE"
180180
- name: Setup Build, Run Build and Run Tests
181181
run: |
182-
BUILD_TYPE=gcc_release scripts/build/gn_gen.sh --args="is_debug=false"
182+
BUILD_TYPE=gcc_release scripts/build/gn_gen.sh --args="is_debug=false chip_data_model_check_die_on_failure=true"
183183
scripts/run_in_build_env.sh "ninja -C ./out/gcc_release"
184184
BUILD_TYPE=gcc_release scripts/tests/gn_tests.sh
185185
- name: Clean output
@@ -197,7 +197,7 @@ jobs:
197197
esac
198198
199199
rm -rf ./out/sanitizers
200-
BUILD_TYPE=sanitizers scripts/build/gn_gen.sh --args="$GN_ARGS" --export-compile-commands
200+
BUILD_TYPE=sanitizers scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" --export-compile-commands
201201
BUILD_TYPE=sanitizers scripts/tests/gn_tests.sh
202202
done
203203
- name: Ensure codegen is done for sanitize
@@ -308,7 +308,7 @@ jobs:
308308

309309
- name: Setup Build, Run Build and Run Tests
310310
run: |
311-
scripts/build/gn_gen.sh --args="enable_rtti=true chip_config_memory_debug_checks=false chip_config_memory_debug_dmalloc=false chip_generate_link_map_file=false"
311+
scripts/build/gn_gen.sh --args="enable_rtti=true chip_config_memory_debug_checks=false chip_config_memory_debug_dmalloc=false chip_generate_link_map_file=false chip_data_model_check_die_on_failure=true"
312312
scripts/run_in_build_env.sh "ninja -C ./out"
313313
scripts/tests/gn_tests.sh
314314
- name: Setup test python environment
@@ -415,7 +415,7 @@ jobs:
415415
# clang.
416416
"default") GN_ARGS='target_os="all" is_asan=true enable_host_clang_build=false';;
417417
esac
418-
BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS" --export-compile-commands
418+
BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" --export-compile-commands
419419
scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE"
420420
BUILD_TYPE=$BUILD_TYPE scripts/tests/gn_tests.sh
421421
done

.github/workflows/darwin.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ jobs:
114114
mkdir -p /tmp/darwin/framework-tests
115115
echo "This is a simple log" > /tmp/darwin/framework-tests/end_user_support_log.txt
116116
../../../out/debug/all-clusters-app/chip-all-clusters-app --interface-id -1 --end_user_support_log /tmp/darwin/framework-tests/end_user_support_log.txt > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) &
117-
../../../out/debug/all-clusters-app/chip-all-clusters-app --interface-id -1 --dac_provider ../../../credentials/development/commissioner_dut/struct_cd_origin_pid_vid_correct/test_case_vector.json --product-id 32768 --discriminator 3839 --secured-device-port 5539 --KVS /tmp/chip-all-clusters-app-kvs2 > >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid-err.log >&2) &
118117
119118
export TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1
120119

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ jobs:
149149
if [ "$idl_file" = './examples/placeholder/linux/apps/app2/config.matter' ]; then continue; fi
150150
if [ "$idl_file" = './examples/thermostat/thermostat-common/thermostat.matter' ]; then continue; fi
151151
if [ "$idl_file" = './examples/window-app/common/window-app.matter' ]; then continue; fi
152+
# Example is intentionally not spe compliant for use in cert testing
153+
if [ "$idl_file" = './examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter' ]; then continue; fi
152154
153155
# Test files are intentionally small and not spec-compilant, just parse-compliant
154156
if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/cluster_struct_attribute.matter" ]; then continue; fi

.github/workflows/unit_integration_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
*) ;;
7474
esac
7575
76-
scripts/build/gn_gen.sh --args="$GN_ARGS"
76+
scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true"
7777
- name: Run Build
7878
run: scripts/run_in_build_env.sh "ninja -C out/$BUILD_TYPE"
7979
- name: Run Tests
Lines changed: 130 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -1,140 +1,142 @@
11
#
2-
# Copyright (c) 2022-2023 Project CHIP Authors
2+
# Copyright (c) 2022-2023 Project CHIP Authors
33
#
4-
# Licensed under the Apache License, Version 2.0 (the "License");
5-
# you may not use this file except in compliance with the License.
6-
# You may obtain a copy of the License at
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
77
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
8+
# http://www.apache.org/licenses/LICENSE-2.0
99
#
10-
# Unless required by applicable law or agreed to in writing, software
11-
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
14-
# limitations under the License.
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
1515
#
1616

1717
#
18-
# @file
19-
# CMake sub-project defining 'chip' target which represents CHIP library
20-
# Since CHIP doesn't provide native CMake support, ExternalProject
21-
# module is used to build the required artifacts with GN meta-build
22-
# system. It is assumed that find_package(Zephyr) has been called before
23-
# including this file.
18+
# @file
19+
# CMake sub-project defining 'chip' target which represents CHIP library
20+
# Since CHIP doesn't provide native CMake support, ExternalProject
21+
# module is used to build the required artifacts with GN meta-build
22+
# system. It is assumed that find_package(Zephyr) has been called before
23+
# including this file.
2424
#
2525

26-
if (CONFIG_CHIP)
27-
28-
include(ExternalProject)
29-
include(../zephyr-util.cmake)
30-
31-
#
32-
# ==============================================================================
33-
# Prepare CHIP configuration based on the project Kconfig configuration
34-
# ==============================================================================
35-
# Set paths
36-
if (NOT CHIP_ROOT)
37-
get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH)
38-
endif()
39-
get_filename_component(GN_ROOT_TARGET ${CHIP_ROOT}/config/zephyr/chip-gn REALPATH)
40-
get_filename_component(COMMON_CMAKE_SOURCE_DIR ${CHIP_ROOT}/config/common/cmake REALPATH)
41-
42-
43-
# Get common Cmake sources
44-
include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn_args.cmake)
45-
include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn.cmake)
46-
47-
if (CONFIG_POSIX_API)
48-
matter_add_flags(-D_DEFAULT_SOURCE)
49-
matter_add_flags(-isystem${ZEPHYR_BASE}/include/zephyr/posix)
50-
endif()
51-
52-
if(CONFIG_MBEDTLS)
53-
zephyr_include_directories($<TARGET_PROPERTY:mbedTLS,INTERFACE_INCLUDE_DIRECTORIES>)
54-
zephyr_compile_definitions($<TARGET_PROPERTY:mbedTLS,INTERFACE_COMPILE_DEFINITIONS>)
55-
endif()
56-
57-
zephyr_get_compile_flags(ZEPHYR_CFLAGS_C C)
58-
matter_add_cflags("${ZEPHYR_CFLAGS_C}")
59-
zephyr_get_compile_flags(ZEPHYR_CFLAGS_CC CXX)
60-
matter_add_cxxflags("${ZEPHYR_CFLAGS_CC}")
61-
zephyr_get_gnu_cpp_standard(ZEPHYR_GNU_CPP_STD)
62-
matter_add_cxxflags("${ZEPHYR_GNU_CPP_STD}")
63-
64-
# Set up custom OpenThread configuration
65-
66-
if (CONFIG_CHIP_OPENTHREAD_CONFIG)
67-
get_filename_component(CHIP_OPENTHREAD_CONFIG
68-
${CONFIG_CHIP_OPENTHREAD_CONFIG}
69-
REALPATH
70-
BASE_DIR ${CMAKE_SOURCE_DIR}
26+
if(CONFIG_CHIP)
27+
include(ExternalProject)
28+
include(../zephyr-util.cmake)
29+
30+
#
31+
# ==============================================================================
32+
# Prepare CHIP configuration based on the project Kconfig configuration
33+
# ==============================================================================
34+
# Set paths
35+
if(NOT CHIP_ROOT)
36+
get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH)
37+
endif()
38+
39+
get_filename_component(GN_ROOT_TARGET ${CHIP_ROOT}/config/zephyr/chip-gn REALPATH)
40+
get_filename_component(COMMON_CMAKE_SOURCE_DIR ${CHIP_ROOT}/config/common/cmake REALPATH)
41+
42+
# Get common Cmake sources
43+
include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn_args.cmake)
44+
include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn.cmake)
45+
46+
if(CONFIG_POSIX_API)
47+
matter_add_flags(-D_DEFAULT_SOURCE)
48+
matter_add_flags(-isystem${ZEPHYR_BASE}/include/zephyr/posix)
49+
endif()
50+
51+
if(CONFIG_MBEDTLS)
52+
zephyr_include_directories($<TARGET_PROPERTY:mbedTLS,INTERFACE_INCLUDE_DIRECTORIES>)
53+
zephyr_compile_definitions($<TARGET_PROPERTY:mbedTLS,INTERFACE_COMPILE_DEFINITIONS>)
54+
endif()
55+
56+
zephyr_get_compile_flags(ZEPHYR_CFLAGS_C C)
57+
matter_add_cflags("${ZEPHYR_CFLAGS_C}")
58+
zephyr_get_compile_flags(ZEPHYR_CFLAGS_CC CXX)
59+
matter_add_cxxflags("${ZEPHYR_CFLAGS_CC}")
60+
zephyr_get_gnu_cpp_standard(ZEPHYR_GNU_CPP_STD)
61+
matter_add_cxxflags("${ZEPHYR_GNU_CPP_STD}")
62+
63+
# Set up custom OpenThread configuration
64+
if(CONFIG_CHIP_OPENTHREAD_CONFIG)
65+
get_filename_component(CHIP_OPENTHREAD_CONFIG
66+
${CONFIG_CHIP_OPENTHREAD_CONFIG}
67+
REALPATH
68+
BASE_DIR ${CMAKE_SOURCE_DIR}
69+
)
70+
zephyr_set_openthread_config(${CHIP_OPENTHREAD_CONFIG})
71+
endif()
72+
73+
# ==============================================================================
74+
# Generate configuration for CHIP GN build system
75+
# ==============================================================================
76+
matter_common_gn_args(
77+
DEBUG CONFIG_DEBUG
78+
LIB_SHELL CONFIG_CHIP_LIB_SHELL
79+
LIB_TESTS CONFIG_CHIP_BUILD_TESTS
80+
PROJECT_CONFIG ${CONFIG_CHIP_PROJECT_CONFIG}
7181
)
72-
zephyr_set_openthread_config(${CHIP_OPENTHREAD_CONFIG})
73-
endif()
74-
75-
# ==============================================================================
76-
# Generate configuration for CHIP GN build system
77-
# ==============================================================================
78-
matter_common_gn_args(
79-
DEBUG CONFIG_DEBUG
80-
LIB_SHELL CONFIG_CHIP_LIB_SHELL
81-
LIB_TESTS CONFIG_CHIP_BUILD_TESTS
82-
PROJECT_CONFIG ${CONFIG_CHIP_PROJECT_CONFIG}
83-
)
84-
85-
matter_add_gn_arg_string("zephyr_ar" ${CMAKE_AR})
86-
matter_add_gn_arg_string("zephyr_cc" ${CMAKE_C_COMPILER})
87-
matter_add_gn_arg_string("zephyr_cxx" ${CMAKE_CXX_COMPILER})
88-
matter_add_gn_arg_bool ("chip_logging" CONFIG_LOG)
89-
matter_add_gn_arg_bool ("chip_error_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 1)
90-
matter_add_gn_arg_bool ("chip_progress_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 3)
91-
matter_add_gn_arg_bool ("chip_detail_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 4)
92-
matter_add_gn_arg_bool ("chip_automation_logging" FALSE)
93-
matter_add_gn_arg_bool ("chip_enable_openthread" CONFIG_NET_L2_OPENTHREAD)
94-
matter_add_gn_arg_bool ("chip_openthread_ftd" CONFIG_OPENTHREAD_FTD)
95-
matter_add_gn_arg_bool ("chip_inet_config_enable_ipv4" CONFIG_CHIP_IPV4)
96-
matter_add_gn_arg_bool ("chip_enable_wifi" CONFIG_WIFI)
97-
matter_add_gn_arg_bool ("chip_config_network_layer_ble" CONFIG_BT)
98-
matter_add_gn_arg_bool ("chip_mdns_minimal" CONFIG_WIFI)
99-
matter_add_gn_arg_bool ("chip_mdns_minimal" CONFIG_NET_L2_ETHERNET)
100-
matter_add_gn_arg_bool ("chip_mdns_platform" CONFIG_NET_L2_OPENTHREAD)
101-
matter_add_gn_arg_bool ("chip_inet_config_enable_tcp_endpoint" CONFIG_CHIP_BUILD_TESTS)
102-
matter_add_gn_arg_bool ("chip_inet_config_enable_udp_endpoint" CONFIG_NET_UDP)
103-
matter_add_gn_arg_bool ("chip_inet_config_enable_tcp_endpoint" CONFIG_NET_TCP)
104-
matter_add_gn_arg_bool ("chip_malloc_sys_heap" CONFIG_CHIP_MALLOC_SYS_HEAP)
105-
106-
107-
if (CONFIG_CHIP_ENABLE_DNSSD_SRP)
108-
matter_add_gn_arg_string("chip_mdns" "platform")
109-
endif()
110-
111-
if(CONFIG_WIFI)
112-
matter_add_gn_arg_string("chip_mdns" "minimal")
113-
elseif (CONFIG_NET_L2_ETHERNET)
114-
matter_add_gn_arg_string("chip_mdns" "minimal")
115-
elseif (CONFIG_NET_L2_OPENTHREAD)
116-
matter_add_gn_arg_string("chip_mdns" "platform")
117-
else()
118-
matter_add_gn_arg_string("chip_mdns" "none")
119-
endif()
120-
121-
if (CONFIG_CHIP_PW_RPC)
122-
set(PIGWEED_DIR "//third_party/pigweed/repo")
123-
matter_add_gn_arg_string("pw_assert_BACKEND" ${PIGWEED_DIR}/pw_assert_log:check_backend)
124-
matter_add_gn_arg_string("pw_log_BACKEND" ${PIGWEED_DIR}/pw_log_basic)
125-
matter_add_gn_arg("pw_build_LINK_DEPS" [\"${PIGWEED_DIR}/pw_assert:impl\",\ \"${PIGWEED_DIR}/pw_log:impl\"])
126-
endif()
127-
128-
matter_generate_args_tmp_file()
129-
130-
# ==============================================================================
131-
# Build chip library
132-
# ==============================================================================
133-
matter_build(chip
134-
LIB_SHELL ${CONFIG_CHIP_LIB_SHELL}
135-
LIB_TESTS ${CONFIG_CHIP_BUILD_TESTS}
136-
GN_DEPENDENCIES kernel
137-
)
138-
set_property(GLOBAL APPEND PROPERTY ZEPHYR_INTERFACE_LIBS chip)
13982

83+
matter_add_gn_arg_string("zephyr_ar" ${CMAKE_AR})
84+
matter_add_gn_arg_string("zephyr_cc" ${CMAKE_C_COMPILER})
85+
matter_add_gn_arg_string("zephyr_cxx" ${CMAKE_CXX_COMPILER})
86+
matter_add_gn_arg_bool("chip_logging" CONFIG_LOG)
87+
matter_add_gn_arg_bool("chip_error_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 1)
88+
matter_add_gn_arg_bool("chip_progress_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 3)
89+
matter_add_gn_arg_bool("chip_detail_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 4)
90+
matter_add_gn_arg_bool("chip_automation_logging" FALSE)
91+
matter_add_gn_arg_bool("chip_enable_openthread" CONFIG_NET_L2_OPENTHREAD)
92+
matter_add_gn_arg_bool("chip_openthread_ftd" CONFIG_OPENTHREAD_FTD)
93+
matter_add_gn_arg_bool("chip_inet_config_enable_ipv4" CONFIG_CHIP_IPV4)
94+
matter_add_gn_arg_bool("chip_enable_wifi" CONFIG_WIFI)
95+
matter_add_gn_arg_bool("chip_config_network_layer_ble" CONFIG_BT)
96+
matter_add_gn_arg_bool("chip_mdns_minimal" CONFIG_WIFI)
97+
matter_add_gn_arg_bool("chip_mdns_minimal" CONFIG_NET_L2_ETHERNET)
98+
matter_add_gn_arg_bool("chip_mdns_platform" CONFIG_NET_L2_OPENTHREAD)
99+
matter_add_gn_arg_bool("chip_inet_config_enable_tcp_endpoint" CONFIG_CHIP_BUILD_TESTS)
100+
matter_add_gn_arg_bool("chip_malloc_sys_heap" CONFIG_CHIP_MALLOC_SYS_HEAP)
101+
matter_add_gn_arg_bool("chip_inet_config_enable_tcp_endpoint" FALSE)
102+
matter_add_gn_arg_bool("chip_enable_read_client" CONFIG_CHIP_ENABLE_READ_CLIENT)
103+
104+
if(BOARD STREQUAL "native_posix")
105+
matter_add_gn_arg_string("target_cpu" "x86")
106+
elseif(BOARD STREQUAL "native_posix_64")
107+
matter_add_gn_arg_string("target_cpu" "x64")
108+
endif()
109+
110+
if(CONFIG_CHIP_ENABLE_DNSSD_SRP)
111+
matter_add_gn_arg_string("chip_mdns" "platform")
112+
endif()
113+
114+
if(CONFIG_WIFI)
115+
matter_add_gn_arg_string("chip_mdns" "minimal")
116+
elseif(CONFIG_NET_L2_ETHERNET)
117+
matter_add_gn_arg_string("chip_mdns" "minimal")
118+
elseif(CONFIG_NET_L2_OPENTHREAD)
119+
matter_add_gn_arg_string("chip_mdns" "platform")
120+
else()
121+
matter_add_gn_arg_string("chip_mdns" "none")
122+
endif()
123+
124+
if(CONFIG_CHIP_PW_RPC)
125+
set(PIGWEED_DIR "//third_party/pigweed/repo")
126+
matter_add_gn_arg_string("pw_assert_BACKEND" ${PIGWEED_DIR}/pw_assert_log:check_backend)
127+
matter_add_gn_arg_string("pw_log_BACKEND" ${PIGWEED_DIR}/pw_log_basic)
128+
matter_add_gn_arg("pw_build_LINK_DEPS" [\"${PIGWEED_DIR}/pw_assert:impl\",\ \"${PIGWEED_DIR}/pw_log:impl\"])
129+
endif()
130+
131+
matter_generate_args_tmp_file()
132+
133+
# ==============================================================================
134+
# Build chip library
135+
# ==============================================================================
136+
matter_build(chip
137+
LIB_SHELL ${CONFIG_CHIP_LIB_SHELL}
138+
LIB_TESTS ${CONFIG_CHIP_BUILD_TESTS}
139+
GN_DEPENDENCIES kernel
140+
)
141+
set_property(GLOBAL APPEND PROPERTY ZEPHYR_INTERFACE_LIBS chip)
140142
endif() # CONFIG_CHIP

config/zephyr/chip-module/Kconfig.mbedtls

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,11 @@ config MBEDTLS_ECDH_C
6161
config MBEDTLS_ECDSA_C
6262
default y
6363

64-
endif #CHIP
64+
config MBEDTLS_X509_CSR_WRITE_C
65+
default y
66+
67+
config MBEDTLS_PK_WRITE_C
68+
default y
69+
70+
endif #CHIP
71+

0 commit comments

Comments
 (0)