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

Tests - Log a useful message if the cluster name is not spelled appropriately #8750

Conversation

vivien-apple
Copy link
Contributor

Problem

When writing a .yaml test and there is a typo in the cluster name, then the generation process fails with a not so helpful error message:

TypeError: Cannot read property 'id' of undefined at src/app/zap-templates/common/ClustersHelper.js:563:74

This PR updates it such that the error is understandable, and the list of correct names is printed to the screen:

3.2.15. [TC-CC-7.1 to 7.4] Enhanced Color Controls :  Turn on light for color control tests
Missing cluster "Foo" in: 
	* Account Login
	* Application Basic
	* Application Launcher
	* Audio Output
	* Barrier Control
	* Basic
	* Binary Input (Basic)
	* Binding
	* Bridged Device Basic
	* Color Control
	* Content Launcher
	* Descriptor
	* Diagnostic Logs
	* Door Lock
	* Electrical Measurement
	* Ethernet Network Diagnostics
	* Fixed Label
	* Flow Measurement
	* General Commissioning
	* General Diagnostics
	* Group Key Management
	* Groups
	* Identify
	* Keypad Input
	* Level Control
	* Low Power
	* Media Input
	* Media Playback
	* Network Commissioning
	* OTA Software Update Provider
	* Occupancy Sensing
	* On/off
	* Operational Credentials
	* Pressure Measurement
	* Pump Configuration and Control
	* Relative Humidity Measurement
	* Scenes
	* Software Diagnostics
	* Switch
	* TV Channel
	* Target Navigator
	* Temperature Measurement
	* Test Cluster
	* Thermostat
	* Thread Network Diagnostics
	* Wake on LAN
	* WiFi Network Diagnostics
	* Window Covering

Change overview

  • Output a useful message when generating code from .yaml tests

Testing

  • It was tested locally by adding a mistake to the .yaml file. It does not affect the build output.

@vivien-apple vivien-apple force-pushed the Tests_LogClusterNamesIfSpelledWrong branch from 6e5e471 to 3baa6a5 Compare August 4, 2021 08:57
@vivien-apple vivien-apple force-pushed the Tests_LogClusterNamesIfSpelledWrong branch from 3baa6a5 to 927d2c1 Compare August 5, 2021 00:54
@github-actions
Copy link

github-actions bot commented Aug 5, 2021

Size increase report for "esp32-example-build" from 0883b82

File Section File VM
chip-temperature-measurement-app.elf .flash.text 60 60
chip-bridge-app.elf .flash.text 68 68
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

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

sections,vmsize,filesize

Comparing ./master_artifact/chip-persistent-storage.elf and ./pull_artifact/chip-persistent-storage.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-temperature-measurement-app.elf and ./pull_artifact/chip-temperature-measurement-app.elf:

sections,vmsize,filesize
.flash.text,60,60
[Unmapped],0,-60

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

sections,vmsize,filesize

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

sections,vmsize,filesize

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

sections,vmsize,filesize

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

sections,vmsize,filesize

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

sections,vmsize,filesize
.flash.text,68,68
[Unmapped],0,-68


@andy31415 andy31415 merged commit 42136d6 into project-chip:master Aug 5, 2021
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
…priately (project-chip#8750)

* Tests - Log a useful message if the cluster name is not spelled appropriately in Yaml tests

* 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