Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Basic cluster tests for attributes constraints #7792

Merged
merged 8 commits into from
Jun 23, 2021

Conversation

vivien-apple
Copy link
Contributor

Problem

There is no specific tests for the Basic cluster.

Change overview

  • Move the Basic cluster definition out of the Silabs's definition and update it a little
  • Add Test_10_1_1 for the Basic cluster
  • Update the templates to support optional keyword, such that an attribute is tested only if it is supported on the accessory side
  • Update the templates to support constraints keyword
  • Add minLength/maxLength constraints support (format and type still needs to be done)
  • Update gen/ folders

Testing

  • Tests were generated for the Darwin CI and the test suites using chip-tool

@woody-apple
Copy link
Contributor

Copy link
Contributor

@bzbarsky-apple bzbarsky-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but @tcarmelveilleux's comment about the max length there should be addressed, either here or in a followup.

@vivien-apple vivien-apple force-pushed the Test_10_1_1 branch 2 times, most recently from cae20a8 to c664ccf Compare June 22, 2021 09:25
@woody-apple
Copy link
Contributor

@vivien-apple conflicts :(

Copy link
Contributor

@andy31415 andy31415 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs conflict resolution.

Cannot easily review this due to large amoung of generated code.

@github-actions
Copy link

Size increase report for "esp32-example-build" from 42c2ccd

File Section File VM
chip-all-clusters-app.elf .flash.text -24 -24
chip-all-clusters-app.elf .flash.rodata -224 -224
chip-all-clusters-app.elf .dram0.bss 0 -472
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
[Unmapped],0,224
.debug_ranges,0,24
.debug_abbrev,0,23
.debug_str,0,2
.debug_loc,0,-4
.flash.text,-24,-24
.debug_line,0,-46
.debug_info,0,-67
.flash.rodata,-224,-224
.dram0.bss,-472,0


@github-actions
Copy link

Size increase report for "gn_qpg6100-example-build" from 42c2ccd

File Section File VM
chip-qpg6100-lighting-example.out .heap 0 32
chip-qpg6100-lighting-example.out .bss 0 -32
chip-qpg6100-lighting-example.out .text -32 -32
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-qpg6100-lighting-example.out and ./pull_artifact/chip-qpg6100-lighting-example.out:

sections,vmsize,filesize
.heap,32,0
[Unmapped],0,32
.debug_ranges,0,24
.debug_abbrev,0,23
.debug_str,0,-8
.debug_line,0,-20
.bss,-32,0
.text,-32,-32
.debug_info,0,-71

Comparing ./master_artifact/chip-qpg6100-lighting-example.out.map and ./pull_artifact/chip-qpg6100-lighting-example.out.map:

BLOAT EXECUTION FAILED WITH CODE 1:
bloaty: unknown file type for file './pull_artifact/chip-qpg6100-lighting-example.out.map'


@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from 42c2ccd

File Section File VM
chip-lock.elf [LOAD #3 [RW]] 0 -4
chip-lock.elf device_handles -12 -12
chip-lock.elf rodata -16 -16
chip-lock.elf text -20 -20
chip-lock.elf bss 0 -28
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_ranges,0,24
.debug_abbrev,0,23
.debug_loc,0,5
.debug_str,0,-1
[LOAD #3 [RW]],-4,0
device_handles,-12,-12
rodata,-16,-16
.debug_line,0,-20
text,-20,-20
bss,-28,0
.debug_info,0,-71

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize


@woody-apple woody-apple merged commit bfd1b0e into project-chip:master Jun 23, 2021
@bzbarsky-apple
Copy link
Contributor

Cannot easily review this due to large amoung of generated code.

@andy31415 fwiw, reviewing the individual changesets worked pretty well for me for this one....

nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
* Extract Basic Information from general.xml to have it into its own file and reformat it to make it easier to read when comparing to the spec

* Use the updated Basic Information Cluster into the all-clusters-app and src/controller/data_model

* Do not overwrite the interaction model version defined from zap when the basic clusters startups

* Update templates to support _optional_ property on test as well as _constraints_

* Update the all-clusters-app.zap file with a fake manufacturing date for the basic cluster

* Add Test_10_1_1.yaml file

* Use optional for TestCluster unsupported attribute

* Update gen/ folders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants