Skip to content

Commit

Permalink
Merge branch 'master' into DFR_LeakWhenUsingComplexArgument
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 authored Oct 24, 2024
2 parents 7e75b69 + 71170fe commit 0a67d53
Show file tree
Hide file tree
Showing 325 changed files with 1,520 additions and 120,489 deletions.
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@
path = third_party/infineon/psoc6/psoc6_sdk/libs/lwip-network-interface-integration
url = https://github.com/Infineon/lwip-network-interface-integration.git
platforms = infineon
[submodule "third_party/lwip/repo"]
path = third_party/lwip/repo
url = https://github.com/lwip-tcpip/lwip.git
[submodule "third_party/abseil-cpp/src"]
path = third_party/abseil-cpp/src
url = https://github.com/abseil/abseil-cpp.git
Expand All @@ -340,7 +343,7 @@
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://github.com/google/googletest
platforms = linux,darwin
platforms = linux,android,darwin,tizen
[submodule "third_party/re2/src"]
path = third_party/re2/src
url = https://github.com/google/re2.git
Expand Down
6 changes: 6 additions & 0 deletions .gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import("//build_overrides/build.gni")
import("//build_overrides/googletest.gni")
import("//build_overrides/pigweed.gni")

# The location of the build configuration file.
Expand All @@ -33,6 +34,11 @@ default_args = {
# GN target to use for the default Python build venv.
pw_build_PYTHON_BUILD_VENV = "//:matter_build_venv"

# Use the GoogleTest backend for unit tests running on host.
pw_unit_test_BACKEND = "$dir_pw_unit_test:googletest"
pw_unit_test_MAIN = "$dir_pigweed/third_party/googletest:gmock_main"
dir_pw_third_party_googletest = "$dir_googletest"

# Required for pw_unit_test
pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio"
pw_assert_BACKEND = "$dir_pw_assert_log"
Expand Down
3 changes: 2 additions & 1 deletion build/toolchain/pw_fuzzer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import("//build_overrides/build.gni")
import("//build_overrides/googletest.gni")
import("//build_overrides/pigweed.gni")

import("$dir_pigweed/targets/host/target_toolchains.gni")
Expand Down Expand Up @@ -61,7 +62,7 @@ gcc_toolchain("chip_pw_fuzztest") {

dir_pw_third_party_abseil_cpp = "//third_party/abseil-cpp/src"
dir_pw_third_party_fuzztest = "//third_party/fuzztest"
dir_pw_third_party_googletest = "//third_party/googletest"
dir_pw_third_party_googletest = "$dir_googletest"

# TODO: Seems that re2 support within FuzzTest was deprecated, keeping it defined is triggering warning
# Remove if re2 is indeed not needed
Expand Down
18 changes: 18 additions & 0 deletions build_overrides/googletest.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

declare_args() {
# Location of the GoogleTest repository.
dir_googletest = "//third_party/googletest"
}
2 changes: 1 addition & 1 deletion config/esp32/components/chip/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
- if: "target != esp32h2"

espressif/esp_secure_cert_mgr:
version: "^2.3.0"
version: "^2.5.0"
rules:
- if: "idf_version >=4.3"

Expand Down
18 changes: 18 additions & 0 deletions examples/build_overrides/googletest.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

declare_args() {
# Location of the GoogleTest repository.
dir_googletest = "//third_party/connectedhomeip/third_party/googletest"
}
2 changes: 1 addition & 1 deletion examples/platform/silabs/SiWx917/SiWx917/sl_wlan_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static const sl_wifi_device_configuration_t config = {
.boot_option = LOAD_NWP_FW,
.mac_address = NULL,
.band = SL_SI91X_WIFI_BAND_2_4GHZ,
.region_code = US,
.region_code = REGION_CODE,
.boot_config = { .oper_mode = SL_SI91X_CLIENT_MODE,
.coex_mode = SL_SI91X_WLAN_BLE_MODE,
.feature_bit_map =
Expand Down
2 changes: 1 addition & 1 deletion integrations/docker/images/base/chip-build/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
85 : [Silabs] Update Silabs docker Simplicity SDK v2024.6.2
86 : [Tizen] Pass runner's path as QEMU argument
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,13 @@ RUN set -x \
&& echo -n \
"#!/bin/bash\n" \
"grep -q 'rootshell' /proc/cmdline && exit\n" \
"if [[ -x /mnt/chip/runner.sh ]]; then\n" \
"runner=\$(grep -o 'runner=[^ ]*' /proc/cmdline | sed 's/runner=//')\n" \
"if [[ -z \"\$runner\" ]]; then\n" \
" runner='/mnt/chip/runner.sh' \n" \
"fi\n" \
"if [[ -x \"\$runner\" ]]; then\n" \
" echo '### RUNNER START ###'\n" \
" /mnt/chip/runner.sh\n" \
" \"\$runner\"\n" \
" echo '### RUNNER STOP:' \$?\n" \
"else\n" \
" read -r -t 5 -p 'Press ENTER to access root shell...' && exit || echo ' timeout.'\n" \
Expand Down
1 change: 1 addition & 0 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ def BuildEfr32Target():
TargetPart('brd2703a', board=Efr32Board.BRD2703A),
TargetPart('brd4338a', board=Efr32Board.BRD4338A, enable_wifi=True, enable_917_soc=True),
TargetPart('brd2605a', board=Efr32Board.BRD2605A, enable_wifi=True, enable_917_soc=True),
TargetPart('brd4343a', board=Efr32Board.BRD4343A, enable_wifi=True, enable_917_soc=True),
])

# apps
Expand Down
3 changes: 3 additions & 0 deletions scripts/build/builders/efr32.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class Efr32Board(Enum):
BRD4338A = 11
BRD2703A = 12
BRD2605A = 13
BRD4343A = 14

def GnArgName(self):
if self == Efr32Board.BRD2704B:
Expand Down Expand Up @@ -140,6 +141,8 @@ def GnArgName(self):
return 'BRD2703A'
elif self == Efr32Board.BRD2605A:
return 'BRD2605A'
elif self == Efr32Board.BRD4343A:
return 'BRD4343A'
else:
raise Exception('Unknown board #: %r' % self)

Expand Down
2 changes: 1 addition & 1 deletion scripts/build/testdata/all_targets_linux_x64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ bouffalolab-{bl602dk,bl704ldk,bl706dk,bl602-night-light,bl706-night-light,bl602-
cc32xx-{lock,air-purifier}
ti-cc13x4_26x4-{lighting,lock,pump,pump-controller}[-mtd][-ftd]
cyw30739-{cyw30739b2_p5_evk_01,cyw30739b2_p5_evk_02,cyw30739b2_p5_evk_03,cyw930739m2evb_01,cyw930739m2evb_02}-{light,light-switch,lock,thermostat}
efr32-{brd2704b,brd4316a,brd4317a,brd4318a,brd4319a,brd4186a,brd4187a,brd2601b,brd4187c,brd4186c,brd2703a,brd4338a,brd2605a}-{window-covering,switch,unit-test,light,lock,thermostat,pump,air-quality-sensor-app}[-rpc][-with-ota-requestor][-icd][-low-power][-shell][-no-logging][-openthread-mtd][-heap-monitoring][-no-openthread-cli][-show-qr-code][-wifi][-rs9116][-wf200][-siwx917][-ipv4][-additional-data-advertising][-use-ot-lib][-use-ot-coap-lib][-no-version][-skip-rps-generation]
efr32-{brd2704b,brd4316a,brd4317a,brd4318a,brd4319a,brd4186a,brd4187a,brd2601b,brd4187c,brd4186c,brd2703a,brd4338a,brd2605a,brd4343a}-{window-covering,switch,unit-test,light,lock,thermostat,pump,air-quality-sensor-app}[-rpc][-with-ota-requestor][-icd][-low-power][-shell][-no-logging][-openthread-mtd][-heap-monitoring][-no-openthread-cli][-show-qr-code][-wifi][-rs9116][-wf200][-siwx917][-ipv4][-additional-data-advertising][-use-ot-lib][-use-ot-coap-lib][-no-version][-skip-rps-generation]
esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,energy-management,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only][-tracing][-data-model-disabled][-data-model-enabled]
genio-lighting-app
linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-pw-fuzztest][-coverage][-dmalloc][-clang]
Expand Down
12 changes: 9 additions & 3 deletions scripts/build_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ SUPPORTED_TESTS=(unit yaml all)
CODE="core"
TESTS="unit"
skip_gn=false
TEST_TARGET=check

help() {

Expand All @@ -70,6 +71,7 @@ help() {
'unit': Run unit test to drive the coverage check. --default
'yaml': Run yaml test to drive the coverage check.
'all': Run unit & yaml test to drive the coverage check.
--target Specific test target to run (e.g. TestEmberAttributeBuffer.run)
"
}

Expand All @@ -89,6 +91,9 @@ for i in "$@"; do
TESTS="${i#*=}"
shift
;;
--target=*)
TEST_TARGET="${i#*=}"
;;
-o=* | --output_root=*)
OUTPUT_ROOT="${i#*=}"
COVERAGE_ROOT="$OUTPUT_ROOT/coverage"
Expand Down Expand Up @@ -121,20 +126,21 @@ if [ "$skip_gn" == false ]; then
# Generates ninja files
EXTRA_GN_ARGS=""
if [[ "$TESTS" == "yaml" || "$TESTS" == "all" ]]; then
EXTRA_GN_ARGS="$EXTRA_GN_ARGS chip_build_all_clusters_app=true"
EXTRA_GN_ARGS="$EXTRA_GN_ARGS chip_build_all_clusters_app=true"
else
EXTRA_GN_ARGS="$EXTRA_GN_ARGS chip_build_tools=false"
fi
gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args="use_coverage=true$EXTRA_GN_ARGS"
ninja -C "$OUTPUT_ROOT"

# Run unit tests
if [[ "$TESTS" == "unit" || "$TESTS" == "all" ]]; then
ninja -C "$OUTPUT_ROOT" check
ninja -C "$OUTPUT_ROOT" "$TEST_TARGET"
fi

# Run yaml tests
if [[ "$TESTS" == "yaml" || "$TESTS" == "all" ]]; then
ninja -C "$OUTPUT_ROOT"

scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
--chip-tool ""$OUTPUT_ROOT/chip-tool \
Expand Down
2 changes: 1 addition & 1 deletion scripts/examples/gn_silabs_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ else
fi

# 917 exception. TODO find a more generic way
if [ "$SILABS_BOARD" == "BRD4338A" ] || [ "$SILABS_BOARD" == "BRD2605A" ]; then
if [ "$SILABS_BOARD" == "BRD4338A" ] || [ "$SILABS_BOARD" == "BRD2605A" ] || [ "$SILABS_BOARD" == "BRD4343A" ]; then
echo "Compiling for 917 WiFi SOC"
USE_WIFI=true
fi
Expand Down
2 changes: 2 additions & 0 deletions src/app/codegen-data-model-provider/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import("//build_overrides/chip.gni")
# CodegenDataModelProvider.h
# CodegenDataModelProvider_Read.cpp
# CodegenDataModelProvider_Write.cpp
# EmberAttributeDataBuffer.cpp
# EmberAttributeDataBuffer.h
# EmberMetadata.cpp
# EmberMetadata.h
# Instance.cpp
Expand Down
Loading

0 comments on commit 0a67d53

Please sign in to comment.