Skip to content

Commit

Permalink
Update zap to tip (#10826)
Browse files Browse the repository at this point in the history
* Update ZAP to tip.

Fixes bugs in endpoint_config generation.

* Add a test for writing the Basic Information "location" attribute.

Turns out it did not work due to ZAP bugs.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Feb 8, 2022
1 parent 4fe7c02 commit 4323952
Show file tree
Hide file tree
Showing 17 changed files with 3,463 additions and 3,090 deletions.
1 change: 1 addition & 0 deletions examples/chip-tool/templates/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ function getTests()
'TestDelayCommands',
'TestLogCommands',
'TestDescriptorCluster',
'TestBasicInformation',
'TestOperationalCredentialsCluster',
];

Expand Down
44 changes: 44 additions & 0 deletions src/app/tests/suites/TestBasicInformation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright (c) 2021 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.

name: Basic Information Cluster Tests

config:
cluster: "Basic"
endpoint: 0

tests:
- label: "Read location"
command: "readAttribute"
attribute: "location"
response:
value: ""

- label: "Write location"
command: "writeAttribute"
attribute: "location"
arguments:
value: "us"

- label: "Read back location"
command: "readAttribute"
attribute: "location"
response:
value: "us"

- label: "Restore initial location value"
command: "writeAttribute"
attribute: "location"
arguments:
value: ""
1 change: 1 addition & 0 deletions src/darwin/Framework/CHIP/templates/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ function getTests()
'TestConstraints',
'TestDelayCommands',
'TestDescriptorCluster',
'TestBasicInformation',
'TestOperationalCredentialsCluster',
];

Expand Down
87 changes: 87 additions & 0 deletions src/darwin/Framework/CHIPTests/CHIPClustersTests.m

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4323952

Please sign in to comment.