Skip to content

Commit 19e7665

Browse files
authored
Merge branch 'master' into id_range_check_functions
2 parents 461921b + 47ab39e commit 19e7665

File tree

105 files changed

+5320
-541
lines changed

Some content is hidden

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

105 files changed

+5320
-541
lines changed

.github/workflows/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ jobs:
333333
scripts/run_in_build_env.sh 'virtualenv pyenv'
334334
source pyenv/bin/activate
335335
pip3 install -r src/setup_payload/python/requirements.txt
336-
python3 src/setup_payload/tests/run_python_setup_payload_gen_test.py out/chip-tool
336+
python3 src/setup_payload/tests/run_python_setup_payload_test.py out/chip-tool
337337
338338
build_linux_python_lighting_device:
339339
name: Build on Linux (python lighting-app)

.github/workflows/darwin.yaml

+4-9
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ jobs:
9797
bootstrap-logs-framework-${{ matrix.options.flavor }}
9898
- name: Build example All Clusters Server
9999
run: |
100-
scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug chip_config_network_layer_ble=false
100+
scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug/all-clusters-app chip_config_network_layer_ble=false
101101
- name: Build example OTA Provider
102102
run: |
103-
scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug chip_config_network_layer_ble=false
103+
scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug/ota-provider-app chip_config_network_layer_ble=false
104104
- name: Build example OTA Requestor
105105
run: |
106106
scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug/ota-requestor-app chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0
@@ -113,13 +113,8 @@ jobs:
113113
run: |
114114
mkdir -p /tmp/darwin/framework-tests
115115
echo "This is a simple log" > /tmp/darwin/framework-tests/end_user_support_log.txt
116-
../../../out/debug/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/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) &
118-
../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 101 --passcode 1001 --KVS /tmp/chip-all-clusters-app-kvs101 --secured-device-port 5531 &
119-
../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 102 --passcode 1002 --KVS /tmp/chip-all-clusters-app-kvs102 --secured-device-port 5532 &
120-
../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 103 --passcode 1003 --KVS /tmp/chip-all-clusters-app-kvs103 --secured-device-port 5533 &
121-
../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 104 --passcode 1004 --KVS /tmp/chip-all-clusters-app-kvs104 --secured-device-port 5534 &
122-
../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 105 --passcode 1005 --KVS /tmp/chip-all-clusters-app-kvs105 --secured-device-port 5535 &
116+
../../../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) &
123118
124119
export TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1
125120

.github/workflows/examples-tizen.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
if: github.actor != 'restyled-io[bot]'
3737

3838
container:
39-
image: ghcr.io/project-chip/chip-build-tizen:50
39+
image: ghcr.io/project-chip/chip-build-tizen:53
4040
options: --user root
4141
volumes:
4242
- "/tmp/bloat_reports:/tmp/bloat_reports"

.github/workflows/lint.yml

-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ jobs:
9898
--known-failure controller/ExamplePersistentStorage.cpp \
9999
--known-failure controller/ExamplePersistentStorage.h \
100100
--known-failure app/AttributeAccessToken.h \
101-
--known-failure app/CommandHandler.h \
102101
--known-failure app/CommandHandlerInterface.h \
103102
--known-failure app/CommandResponseSender.h \
104103
--known-failure app/CommandSenderLegacyCallback.h \

.github/workflows/minimal-build.yaml

+23-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ concurrency:
2626
cancel-in-progress: true
2727

2828
jobs:
29-
minimal:
29+
minimal-all-clusters:
3030
name: Linux / configure build of all-clusters-app
3131

3232
if: github.actor != 'restyled-io[bot]'
@@ -47,3 +47,25 @@ jobs:
4747
- name: Configure and build All Clusters App
4848
run: |
4949
CC=gcc CXX=g++ scripts/configure --project=examples/all-clusters-app/linux && ./ninja-build
50+
51+
minimal-network-manager:
52+
name: Linux / configure build of network-manager-app
53+
54+
if: github.actor != 'restyled-io[bot]'
55+
runs-on: ubuntu-latest
56+
57+
container:
58+
image: ghcr.io/project-chip/chip-build-minimal:50
59+
60+
steps:
61+
- name: Checkout
62+
uses: actions/checkout@v4
63+
64+
- name: Checkout submodules # but don't bootstrap!
65+
uses: ./.github/actions/checkout-submodules
66+
with:
67+
platform: linux
68+
69+
- name: Configure and build Network Manager App
70+
run: |
71+
CC=gcc CXX=g++ scripts/configure --project=examples/network-manager-app/linux && ./ninja-build

.github/workflows/tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ jobs:
189189
src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \
190190
src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml \
191191
src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml \
192+
src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml \
192193
src/app/zap-templates/zcl/data-model/chip/window-covering.xml \
193194
src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml \
194195
src/app/zap-templates/zcl/data-model/chip/matter-devices.xml \

build/chip/linux/BUILD.gn

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2020 Project CHIP Authors
1+
# Copyright (c) 2020-2024 Project CHIP Authors
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -21,4 +21,5 @@ pkg_config("glib") {
2121
"glib-2.0",
2222
"gio-unix-2.0",
2323
]
24+
optional = true # Only certain conditionally-compiled modules depend on glib
2425
}

build/config/linux/pkg-config.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
3-
# Copyright (c) 2020 Project CHIP Authors
3+
# Copyright (c) 2020-2024 Project CHIP Authors
44
#
55
# Redistribution and use in source and binary forms, with or without
66
# modification, are permitted provided that the following conditions are
@@ -127,6 +127,7 @@ def RewritePath(path, strip_prefix, sysroot):
127127
def main():
128128
parser = OptionParser()
129129
parser.add_option('-d', '--debug', action='store_true')
130+
parser.add_option('-o', '--optional', action='store_true')
130131
parser.add_option('-p', action='store', dest='pkg_config', type='string',
131132
default='pkg-config')
132133
parser.add_option('-v', action='append', dest='strip_out', type='string')
@@ -209,6 +210,10 @@ def main():
209210
try:
210211
flag_string = subprocess.check_output(cmd).decode('utf-8')
211212
except Exception:
213+
if options.optional:
214+
sys.stderr.write('Ignoring failure to run pkg-config for optional library.\n')
215+
print(json.dumps([False])) # Output a GN array indicating missing optional packages
216+
return 0
212217
sys.stderr.write('Could not run pkg-config.\n')
213218
return 1
214219

@@ -248,10 +253,10 @@ def main():
248253
else:
249254
cflags.append(flag)
250255

251-
# Output a GN array, the first one is the cflags, the second are the libs. The
256+
# Output a GN array, indicating success and our output lists.
252257
# JSON formatter prints GN compatible lists when everything is a list of
253258
# strings.
254-
print(json.dumps([includes, cflags, libs, lib_dirs]))
259+
print(json.dumps([True, includes, cflags, libs, lib_dirs]))
255260
return 0
256261

257262

build/config/linux/pkg_config.gni

+33-23
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
2-
# Copyright (c) 2020 Project CHIP Authors
2+
# Copyright (c) 2020-2024 Project CHIP Authors
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -43,9 +43,14 @@
4343
#
4444
# You can also use "extra args" to filter out results (see pkg-config.py):
4545
# extra_args = [ "-v, "foo" ]
46+
#
4647
# To ignore libs and ldflags (only cflags/defines will be set, which is useful
4748
# when doing manual dynamic linking), set:
4849
# ignore_libs = true
50+
#
51+
# To allow the build to proceed if (any of) the requested packages are absent, set:
52+
# optional = true
53+
# In this case the resulting config object will be empty.
4954

5055
import("//build_overrides/build.gni")
5156
import("${build_root}/config/sysroot.gni")
@@ -109,37 +114,42 @@ template("pkg_config") {
109114
} else {
110115
args = pkg_config_args + invoker.packages
111116
}
117+
if (defined(invoker.optional) && invoker.optional) {
118+
args += [ "-o" ]
119+
}
112120
if (defined(invoker.extra_args)) {
113121
args += invoker.extra_args
114122
}
115123

124+
# pkgresult = [present, includes, cflags, libs, lib_dirs]
116125
pkgresult = exec_script(pkg_config_script, args, "value")
117-
cflags = pkgresult[1]
126+
if (pkgresult[0]) {
127+
cflags = pkgresult[2]
118128

119-
foreach(include, pkgresult[0]) {
120-
cflags += [ "-I$include" ]
121-
}
129+
foreach(include, pkgresult[1]) {
130+
cflags += [ "-I$include" ]
131+
}
122132

123-
if (!defined(invoker.ignore_libs) || !invoker.ignore_libs) {
124-
libs = pkgresult[2]
125-
lib_dirs = pkgresult[3]
126-
}
133+
if (!defined(invoker.ignore_libs) || !invoker.ignore_libs) {
134+
libs = pkgresult[3]
135+
lib_dirs = pkgresult[4]
136+
}
127137

128-
# Link libraries statically for OSS-Fuzz fuzzer build
129-
if (oss_fuzz) {
130-
libs = []
131-
ldflags = [ "-Wl,-Bstatic" ]
132-
foreach(lib, pkgresult[2]) {
133-
ldflags += [ "-l$lib" ]
138+
# Link libraries statically for OSS-Fuzz fuzzer build
139+
if (oss_fuzz) {
140+
libs = []
141+
ldflags = [ "-Wl,-Bstatic" ]
142+
foreach(lib, pkgresult[3]) {
143+
ldflags += [ "-l$lib" ]
144+
}
145+
ldflags += [ "-Wl,-Bdynamic" ]
146+
lib_dirs = pkgresult[4]
134147
}
135-
ldflags += [ "-Wl,-Bdynamic" ]
136-
lib_dirs = pkgresult[3]
137-
}
138148

139-
forward_variables_from(invoker,
140-
[
141-
"defines",
142-
"visibility",
143-
])
149+
forward_variables_from(invoker, [ "defines" ])
150+
}
144151
}
152+
153+
# Always forward visibility
154+
forward_variables_from(invoker, [ "visibility" ])
145155
}

docs/testing/yaml.md

+29
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,17 @@ function can be use. See
279279
[TestEqualities](https://github.com/project-chip/connectedhomeip/blob/master/src/app/tests/suites/TestEqualities.yaml)
280280
for an example of how to use this pseudo-cluster.
281281

282+
#### Setting step timeouts
283+
284+
The timeout argument can be used for each individual test step to set the time
285+
the runner will wait for a test step to complete before reporting a failure.
286+
287+
Note that this timeout is different than the subscription report timeout and the
288+
subscription report timeout is not currently adjustable in YAML.
289+
290+
There several other options for configuring test steps as shown in the
291+
[YAML schema](./yaml_schema.md) document.
292+
282293
## Running YAML tests
283294

284295
YAML scripts are parsed and run using a python-based runner program that parses
@@ -304,6 +315,24 @@ There are several options for running tests locally. Because the YAML runner
304315
uses python, it is necessary to compile and install the chip python package
305316
before using any YAML runner script.
306317

318+
First activate the matter environment using either
319+
320+
```
321+
. ./scripts/bootstrap.sh
322+
```
323+
324+
or
325+
326+
```
327+
. ./scripts/activate.sh
328+
```
329+
330+
bootstrap.sh should be used for for the first setup, activate.sh may be used for
331+
subsequent setups as it is faster.
332+
333+
Next build the python wheels and create a venv (called `py` here, but any name
334+
may be used)
335+
307336
```
308337
./scripts/build_python.sh -i py
309338
source py/bin/activate

docs/zap_clusters.md

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ Generally regenerate using one of:
112112
| 1069 | 0x42D | Pm10ConcentrationMeasurement |
113113
| 1070 | 0x42E | TotalVolatileOrganicCompoundsConcentrationMeasurement |
114114
| 1071 | 0x42F | RadonConcentrationMeasurement |
115+
| 1105 | 0x451 | WiFiNetworkManagement |
115116
| 1283 | 0x503 | WakeOnLan |
116117
| 1284 | 0x504 | Channel |
117118
| 1285 | 0x505 | TargetNavigator |

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -3334,7 +3334,7 @@ cluster DishwasherAlarm = 93 {
33343334
}
33353335

33363336
/** Attributes and commands for selecting a mode from a list of supported options. */
3337-
provisional cluster MicrowaveOvenMode = 94 {
3337+
cluster MicrowaveOvenMode = 94 {
33383338
revision 1;
33393339

33403340
enum ModeTag : enum16 {

examples/android/CHIPTool/app/build.gradle

-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ android {
4343
targetCompatibility JavaVersion.VERSION_1_8
4444
}
4545

46-
packagingOptions {
47-
exclude 'META-INF/main.kotlin_module'
48-
}
4946

5047
buildFeatures {
5148
viewBinding = true

examples/bridge-app/linux/main.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -899,13 +899,11 @@ void ApplicationInit()
899899
// Setup Mock Devices
900900
Light1.SetReachable(true);
901901
Light2.SetReachable(true);
902-
903902
Light1.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
904903
Light2.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
905904

906905
TempSensor1.SetReachable(true);
907-
TempSensor1.SetReachable(true);
908-
906+
TempSensor2.SetReachable(true);
909907
TempSensor1.SetChangeCallback(&HandleDeviceTempSensorStatusChanged);
910908
TempSensor2.SetChangeCallback(&HandleDeviceTempSensorStatusChanged);
911909

@@ -914,7 +912,6 @@ void ApplicationInit()
914912
ActionLight2.SetReachable(true);
915913
ActionLight3.SetReachable(true);
916914
ActionLight4.SetReachable(true);
917-
918915
ActionLight1.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
919916
ActionLight2.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
920917
ActionLight3.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
@@ -929,7 +926,6 @@ void ApplicationInit()
929926
ComposedTempSensor2.SetReachable(true);
930927
ComposedPowerSource.SetReachable(true);
931928
ComposedPowerSource.SetBatChargeLevel(58);
932-
933929
ComposedTempSensor1.SetChangeCallback(&HandleDeviceTempSensorStatusChanged);
934930
ComposedTempSensor2.SetChangeCallback(&HandleDeviceTempSensorStatusChanged);
935931
ComposedPowerSource.SetChangeCallback(&HandleDevicePowerSourceStatusChanged);

examples/lighting-app/silabs/src/AppTask.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include "LEDWidget.h"
2525

2626
#include <app/clusters/on-off-server/on-off-server.h>
27-
#include <app/clusters/scenes-server/scenes-server.h>
2827
#include <app/server/OnboardingCodesUtil.h>
2928
#include <app/server/Server.h>
3029
#include <app/util/attribute-storage.h>

examples/lock-app/silabs/openthread.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ openthread_external_platform =
2828
sl_enable_test_event_trigger = true
2929

3030
# ICD Default configurations
31-
chip_enable_icd_server = false
31+
chip_enable_icd_server = true
3232
chip_subscription_timeout_resumption = false
3333
sl_use_subscription_syncing = true
3434

examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ cluster GroupKeyManagement = 63 {
10121012
}
10131013

10141014
/** Attributes and commands for selecting a mode from a list of supported options. */
1015-
provisional cluster MicrowaveOvenMode = 94 {
1015+
cluster MicrowaveOvenMode = 94 {
10161016
revision 1;
10171017

10181018
enum ModeTag : enum16 {
@@ -1046,7 +1046,7 @@ provisional cluster MicrowaveOvenMode = 94 {
10461046
}
10471047

10481048
/** Attributes and commands for configuring the microwave oven control, and reporting cooking stats. */
1049-
provisional cluster MicrowaveOvenControl = 95 {
1049+
cluster MicrowaveOvenControl = 95 {
10501050
revision 1; // NOTE: Default/not specifically set
10511051

10521052
bitmap Feature : bitmap32 {

0 commit comments

Comments
 (0)