Skip to content

Commit 270fd18

Browse files
Merge branch 'master' into commodity_tariff_replace_std_collections
2 parents 4a5789c + a8ce5a9 commit 270fd18

File tree

36 files changed

+1005
-91
lines changed

36 files changed

+1005
-91
lines changed

docs/testing/yaml.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,12 +271,33 @@ the test harness. Note that full-test gating is not currently implemented in the
271271
local runner or in the CI.
272272

273273
Some test steps need to be gated on values from earlier in the test. In these
274-
cases, PICS cannot be used. Instead, the runIf: tag can be used. This tag
274+
cases, PICS cannot be used. Instead, the `runIf` tag can be used. This tag
275275
requires a boolean value. To convert values to booleans, the TestEqualities
276276
function can be use. See
277277
[TestEqualities](https://github.com/project-chip/connectedhomeip/blob/master/src/app/tests/suites/TestEqualities.yaml)
278278
for an example of how to use this pseudo-cluster.
279279

280+
In addition to the `PICS` and `runIf` tags, there are the `minRevision` and
281+
`maxRevision` tags which use the step's `cluster`'s `ClusterRevision` attribute
282+
to determine if a step should be skipped because it only applies to older or
283+
newer versions. A step will be skipped if the cluster's `ClusterRevision`
284+
attribute is < `minRevision` (if present), or > `maxRevision` (if present).
285+
286+
Here is an example of only checking for the value of a given attribute if
287+
`ClusterRevision` >= 3 using `minRevision`.
288+
289+
```yaml
290+
- label: "Verify the minimum-to-support Max Paths Per Invoke value"
291+
command: "readAttribute"
292+
attribute: "MaxPathsPerInvoke"
293+
minRevision:
294+
3 # Attribute was added in revision 3, so this step applies
295+
# to revision >= 3.
296+
response:
297+
constraints:
298+
minValue: 1
299+
```
300+
280301
#### Setting step timeouts
281302

282303
The timeout argument can be used for each individual test step to set the time

docs/testing/yaml_schema.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,5 @@ YAML schema
7676
|&emsp; dataVersion |list,int|Y|
7777
|&emsp; busyWaitMs |int||
7878
|&emsp; wait |str||
79+
|&emsp; minRevision |int|Y|
80+
|&emsp; maxRevision |int|Y|

examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/GenericChipDeviceListener.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ open class GenericChipDeviceListener : ChipDeviceController.CompletionListener {
3737
// No op
3838
}
3939

40+
override fun onCommissioningStageStart(nodeId: Long, stage: String) {
41+
// No op
42+
}
43+
4044
override fun onNotifyChipConnectionClosed() {
4145
// No op
4246
}

examples/chef/tests/dimmablelight_test.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ async def _read_current_level(self):
4747
return await self.read_single_attribute_check_success(
4848
endpoint=self._DIMMABLELIGHT_ENDPOINT, cluster=Clusters.Objects.LevelControl, attribute=Clusters.Objects.LevelControl.Attributes.CurrentLevel)
4949

50+
async def _read_identify_time(self):
51+
return await self.read_single_attribute_check_success(
52+
endpoint=self._DIMMABLELIGHT_ENDPOINT, cluster=Clusters.Objects.Identify, attribute=Clusters.Objects.Identify.Attributes.IdentifyTime)
53+
5054
def _read_on_off_pwrpc(self, device):
5155
result = device.rpcs.chip.rpc.Attributes.Read(
5256
endpoint=self._DIMMABLELIGHT_ENDPOINT,
@@ -98,8 +102,9 @@ def steps_TC_DIMMABLELIGHT(self):
98102
return [TestStep(1, "[TC_DIMMABLELIGHT] Commissioning already done.", is_commissioning=True),
99103
TestStep(2, "[TC_DIMMABLELIGHT] Test level control."),
100104
TestStep(3, "[TC_DIMMABLELIGHT] Test toggle."),
101-
TestStep(4, "[TC_DIMMABLELIGHT] Set up PwRPC connection."),
102-
TestStep(5, "[TC_DIMMABLELIGHT] Test PwRPC on/off and level control.")]
105+
TestStep(4, "[TC_DIMMABLELIGHT] Test identify."),
106+
TestStep(5, "[TC_DIMMABLELIGHT] Set up PwRPC connection."),
107+
TestStep(6, "[TC_DIMMABLELIGHT] Test PwRPC on/off and level control.")]
103108

104109
@async_test_body
105110
async def test_TC_DIMMABLELIGHT(self):
@@ -137,6 +142,19 @@ async def test_TC_DIMMABLELIGHT(self):
137142
asserts.assert_equal(await self._read_on_off(), not before)
138143

139144
self.step(4)
145+
asserts.assert_equal(await self._read_identify_time(), 0)
146+
await self.send_single_cmd(
147+
cmd=Clusters.Objects.Identify.Commands.Identify(
148+
identifyTime=5),
149+
dev_ctrl=self.default_controller,
150+
node_id=self.dut_node_id,
151+
endpoint=self._DIMMABLELIGHT_ENDPOINT,
152+
)
153+
identify_time = await self._read_identify_time()
154+
asserts.assert_greater(identify_time, 0)
155+
asserts.assert_less_equal(identify_time, 5)
156+
157+
self.step(5)
140158
device_connection = create_device_serial_or_socket_connection(
141159
device="",
142160
baudrate=self._PW_RPC_BAUD_RATE,
@@ -149,7 +167,7 @@ async def test_TC_DIMMABLELIGHT(self):
149167
device_tracing=False,
150168
)
151169

152-
self.step(5)
170+
self.step(6)
153171
with device_connection as device:
154172
# Test onOff
155173
self._write_on_off_pwrpc(device, True)

examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairingCommand.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,16 @@ abstract class PairingCommand(
161161
}
162162

163163
override fun onCommissioningStatusUpdate(nodeId: Long, stage: String?, errorCode: Long) {
164-
logger.log(Level.INFO, "onCommissioningStatusUpdate")
164+
val stageName = stage ?: "unknown"
165+
logger.log(
166+
Level.INFO,
167+
"Commissioning status update: stage $stageName, nodeId=$nodeId, errorCode=$errorCode"
168+
)
169+
}
170+
171+
override fun onCommissioningStageStart(nodeId: Long, stage: String?) {
172+
val stageName = stage ?: "unknown"
173+
logger.log(Level.INFO, "Commissioning stage $stageName started for nodeId=$nodeId")
165174
}
166175

167176
override fun onNotifyChipConnectionClosed() {

examples/kotlin-matter-controller/java/src/com/matter/controller/commands/pairing/PairingCommand.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,16 @@ abstract class PairingCommand(
159159
}
160160

161161
override fun onCommissioningStatusUpdate(nodeId: Long, stage: String?, errorCode: UInt) {
162-
logger.log(Level.INFO, "onCommissioningStatusUpdate")
162+
val stageName = stage ?: "unknown"
163+
logger.log(
164+
Level.INFO,
165+
"Commissioning status update: stage $stageName, nodeId=$nodeId, errorCode=$errorCode"
166+
)
167+
}
168+
169+
override fun onCommissioningStageStart(nodeId: Long, stage: String?) {
170+
val stageName = stage ?: "unknown"
171+
logger.log(Level.INFO, "Commissioning stage $stageName started for nodeId=$nodeId")
163172
}
164173

165174
override fun onNotifyChipConnectionClosed() {

examples/thermostat/nxp/rt/rw61x/BUILD.gn

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ rt_sdk("sdk") {
8989
# Indicate the default path to OpenThreadConfig.h
9090
include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ]
9191

92+
# Indicate the default path to WiFiUserConfig.h
93+
include_dirs += [ "${example_platform_dir}/app/project_include/WiFi" ]
94+
9295
# For matter with BR feature, increase FreeRTOS heap size and enable TBR cluster
9396
# Additionally in the context of OTBR support the freeRTOS heap should be big enough to allow to handle a large number of mDNS packets
9497
if (chip_enable_wifi && chip_enable_openthread) {
@@ -98,6 +101,10 @@ rt_sdk("sdk") {
98101
]
99102
}
100103

104+
if (chip_enable_wifi) {
105+
defines += [ "WIFI_USER_CONFIG_FILE=<WiFiUserConfig.h>" ]
106+
}
107+
101108
defines += [
102109
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}",
103110
]

0 commit comments

Comments
 (0)