Skip to content

Commit

Permalink
Merge branch 'master' into idm-4.2-troubleshoot
Browse files Browse the repository at this point in the history
  • Loading branch information
raul-marquez-csa authored Jul 4, 2024
2 parents 657771c + 5e37260 commit edb9c5f
Show file tree
Hide file tree
Showing 185 changed files with 3,564 additions and 1,022 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/examples-linux-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ jobs:
--target linux-arm64-light-rpc-ipv6only-clang \
--target linux-arm64-thermostat-no-ble-clang \
--target linux-arm64-lit-icd-no-ble-clang \
--target linux-arm64-fabric-admin-clang-rpc \
--target linux-arm64-fabric-bridge-no-ble-clang-rpc \
build \
"
- name: Bloat report - chip-tool
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/examples-linux-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,21 +202,21 @@ jobs:
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-x64-fabric-admin \
--target linux-x64-fabric-admin-rpc \
build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
linux debug fabric-admin \
out/linux-x64-fabric-admin/fabric-admin \
out/linux-x64-fabric-admin-rpc/fabric-admin \
/tmp/bloat_reports/
- name: Build example Fabric Bridge App
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-x64-fabric-bridge \
--target linux-x64-fabric-bridge-no-ble-rpc \
build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
linux debug fabric-bridge-app \
out/linux-x64-fabric-bridge/fabric-bridge-app \
out/linux-x64-fabric-bridge-no-ble-rpc/fabric-bridge-app \
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
Expand Down
8 changes: 8 additions & 0 deletions .pullapprove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ groups:
teams: [reviewers-nordic]
reviews:
request: 10
shared-reviewers-nxp:
type: optional
conditions:
- files.include('*')
reviewers:
teams: [reviewers-nxp]
reviews:
request: 10
shared-reviewers-samsung:
type: optional
conditions:
Expand Down
66 changes: 65 additions & 1 deletion docs/testing/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ Python tests located in src/python_testing

## Writing Python tests

- Defining arguments in the test script
- In order to streamline the configuration and execution of tests, it is
essential to define arguments at the top of the test script. This
section should include various parameters and their respective values,
which will guide the test runner on how to execute the tests.
- All test classes inherit from MatterBaseTest in
[matter_testing_support.py](https://github.com/project-chip/connectedhomeip/blob/master/src/python_testing/matter_testing_support.py)
- support for commissioning using the python controller
Expand All @@ -36,11 +41,17 @@ Python tests located in src/python_testing
- Use Mobly assertions for failing tests
- self.step() along with a steps\_ function to mark test plan steps for cert
tests
-

### A simple test

```
# test-runner-runs: run1
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
# test-runner-run/run1/factoryreset: True
# test-runner-run/run1/quiet: True
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto
class TC_MYTEST_1_1(MatterBaseTest):
@async_test_body
Expand Down Expand Up @@ -74,6 +85,59 @@ The default_matter_test_main() function is used to run the test on the command
line. These two lines should appear verbatim at the bottom of every python test
file.

## Defining the test arguments

Below is the format:

```
# test-runner-runs: <run_identifier>
# test-runner-run/<run_identifier>/app: ${TYPE_OF_APP}
# test-runner-run/<run_identifier>/factoryreset: <True|False>
# test-runner-run/<run_identifier>/quiet: <True|False>
# test-runner-run/<run_identifier>/app-args: <app_arguments>
# test-runner-run/<run_identifier>/script-args: <script_arguments>
```

### Description of Parameters

- test-runner-runs: Specifies the identifier for the run. This can be any
unique identifier.

- Example: run1

- test-runner-run/<run_identifier>/app: Indicates the application to be used
in the test. Different app types as needed could be referenced from section
[name: Generate an argument environment file ] of the file
[.github/workflows/tests.yaml](https://github.com/project-chip/connectedhomeip/blob/master/.github/workflows/tests.yaml)

- Example: \${TYPE_OF_APP}

- test-runner-run/<run_identifier>/factoryreset: Determines whether a factory
reset should be performed before the test.

- Example: True

- test-runner-run/<run_identifier>/quiet: Sets the verbosity level of the test
run. When set to True, the test run will be quieter.

- Example: True

- test-runner-run/<run_identifier>/app-args: Specifies the arguments to be
passed to the application during the test.

- Example: --discriminator 1234 --KVS kvs1 --trace-to
json:\${TRACE_APP}.json

- test-runner-run/<run_identifier>/script-args: Specifies the arguments to be
passed to the test script.
- Example: --storage-path admin_storage.json --commissioning-method
on-network --discriminator 1234 --passcode 20202021 --trace-to
json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto

This structured format ensures that all necessary configurations are clearly
defined and easily understood, allowing for consistent and reliable test
execution.

## Cluster Codegen

- [Objects.py](https://github.com/project-chip/connectedhomeip/blob/master/src/controller/python/chip/clusters/Objects.py)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ cluster BasicInformation = 40 {
readonly attribute optional char_string<32> serialNumber = 15;
attribute access(write: manage) optional boolean localConfigDisabled = 16;
readonly attribute optional boolean reachable = 17;
readonly attribute optional char_string<32> uniqueID = 18;
readonly attribute char_string<32> uniqueID = 18;
readonly attribute CapabilityMinimaStruct capabilityMinima = 19;
readonly attribute optional ProductAppearanceStruct productAppearance = 20;
readonly attribute int32u specificationVersion = 21;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ cluster BasicInformation = 40 {
readonly attribute optional char_string<32> serialNumber = 15;
attribute access(write: manage) optional boolean localConfigDisabled = 16;
readonly attribute optional boolean reachable = 17;
readonly attribute optional char_string<32> uniqueID = 18;
readonly attribute char_string<32> uniqueID = 18;
readonly attribute CapabilityMinimaStruct capabilityMinima = 19;
readonly attribute optional ProductAppearanceStruct productAppearance = 20;
readonly attribute int32u specificationVersion = 21;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ cluster BasicInformation = 40 {
readonly attribute optional char_string<32> serialNumber = 15;
attribute access(write: manage) optional boolean localConfigDisabled = 16;
readonly attribute optional boolean reachable = 17;
readonly attribute optional char_string<32> uniqueID = 18;
readonly attribute char_string<32> uniqueID = 18;
readonly attribute CapabilityMinimaStruct capabilityMinima = 19;
readonly attribute optional ProductAppearanceStruct productAppearance = 20;
readonly attribute int32u specificationVersion = 21;
Expand Down Expand Up @@ -5890,6 +5890,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 3;
}

bitmap Feature : bitmap32 {
kOther = 0x1;
kPassiveInfrared = 0x2;
kUltrasonic = 0x4;
kPhysicalContact = 0x8;
kActiveInfrared = 0x10;
kRadar = 0x20;
kRFSensing = 0x40;
kVision = 0x80;
}

bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}
Expand All @@ -5900,9 +5911,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}

struct HoldTimeLimitsStruct {
int16u holdTimeMin = 0;
int16u holdTimeMax = 1;
int16u holdTimeDefault = 2;
}

readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
attribute access(write: manage) optional int16u holdTime = 3;
readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ cluster BasicInformation = 40 {
readonly attribute optional char_string<32> serialNumber = 15;
attribute access(write: manage) optional boolean localConfigDisabled = 16;
readonly attribute optional boolean reachable = 17;
readonly attribute optional char_string<32> uniqueID = 18;
readonly attribute char_string<32> uniqueID = 18;
readonly attribute CapabilityMinimaStruct capabilityMinima = 19;
readonly attribute optional ProductAppearanceStruct productAppearance = 20;
readonly attribute int32u specificationVersion = 21;
Expand Down Expand Up @@ -4438,6 +4438,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 3;
}

bitmap Feature : bitmap32 {
kOther = 0x1;
kPassiveInfrared = 0x2;
kUltrasonic = 0x4;
kPhysicalContact = 0x8;
kActiveInfrared = 0x10;
kRadar = 0x20;
kRFSensing = 0x40;
kVision = 0x80;
}

bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}
Expand All @@ -4448,9 +4459,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}

struct HoldTimeLimitsStruct {
int16u holdTimeMin = 0;
int16u holdTimeMax = 1;
int16u holdTimeDefault = 2;
}

readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
attribute access(write: manage) optional int16u holdTime = 3;
readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
Expand Down Expand Up @@ -5964,6 +5983,7 @@ endpoint 0 {
callback attribute hardwareVersionString;
callback attribute softwareVersion;
callback attribute softwareVersionString;
callback attribute uniqueID;
callback attribute capabilityMinima;
callback attribute specificationVersion;
callback attribute maxPathsPerInvoke;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
"package": [
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/zcl/zcl.json",
"type": "zcl-properties",
"path": "../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"category": "matter",
"version": 1,
"description": "Matter SDK ZCL data"
"version": "chip-v1"
},
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"path": "../../../src/app/zap-templates/zcl/zcl.json",
"type": "zcl-properties",
"category": "matter",
"version": "chip-v1"
"version": 1,
"description": "Matter SDK ZCL data"
}
],
"endpointTypes": [
Expand Down Expand Up @@ -900,6 +900,22 @@
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "UniqueID",
"code": 18,
"mfgCode": null,
"side": "server",
"type": "char_string",
"included": 1,
"storageOption": "External",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "CapabilityMinima",
"code": 19,
Expand Down Expand Up @@ -9049,6 +9065,14 @@
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "StringEchoResponse",
"code": 13,
"mfgCode": null,
"source": "server",
"isIncoming": 0,
"isEnabled": 1
},
{
"name": "TestEnumsRequest",
"code": 14,
Expand Down Expand Up @@ -9122,32 +9146,24 @@
"isEnabled": 1
},
{
"name": "TestDifferentVendorMeiRequest",
"code": 4294049962,
"name": "StringEchoRequest",
"code": 24,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "TestDifferentVendorMeiResponse",
"code": 4294049979,
"mfgCode": null,
"source": "server",
"isIncoming": 0,
"isEnabled": 1
},
{
"name": "StringEchoRequest",
"code": 24,
"name": "TestDifferentVendorMeiRequest",
"code": 4294049962,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "StringEchoResponse",
"code": 13,
"name": "TestDifferentVendorMeiResponse",
"code": 4294049979,
"mfgCode": null,
"source": "server",
"isIncoming": 0,
Expand Down
2 changes: 1 addition & 1 deletion examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ cluster BasicInformation = 40 {
readonly attribute optional char_string<32> serialNumber = 15;
attribute access(write: manage) optional boolean localConfigDisabled = 16;
readonly attribute optional boolean reachable = 17;
readonly attribute optional char_string<32> uniqueID = 18;
readonly attribute char_string<32> uniqueID = 18;
readonly attribute CapabilityMinimaStruct capabilityMinima = 19;
readonly attribute optional ProductAppearanceStruct productAppearance = 20;
readonly attribute int32u specificationVersion = 21;
Expand Down
Loading

0 comments on commit edb9c5f

Please sign in to comment.