-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[YAML][CI] Update the test runner to implement type checking #21404
Merged
woody-apple
merged 1 commit into
sve
from
cherry-pick-f93e6cb403ff655b142391e96fb6a1ab3d484413
Jul 29, 2022
Merged
[YAML][CI] Update the test runner to implement type checking #21404
woody-apple
merged 1 commit into
sve
from
cherry-pick-f93e6cb403ff655b142391e96fb6a1ab3d484413
Jul 29, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* [YAML][CI] Update the test runner to implement type checking * Update src/app/tests/suites/ with boolean instead of bool types * Update src/app/tests/suites/ with int*u instead of uint* types * Update src/app/tests/suites/ with int*s instead of int* types * Update src/app/tests/suites/ with bitmap* instead of map* types * Update src/app/tests/suites/ with char_string instead of string types * Update src/app/tests/suites/ with octet_string instead of octstr types * Update src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml to use uint8 for CurrentFabricIndex instead of fabric_idx * NODE_ID to node_id * ENUM8 -> enum8 * Update Test_TC_DGWIFI_2_1.yaml to check for enum8 for SecurityType instead of enum * Use int8s in Test_TC_TSTAT_2_2 instead of temp-s8 which is a type defined in the Thermostat spec but that does not match with anything specific in the SDK * Convert OutPutInfo to list since OutputInfo is the inner type * Check for enum8 instead of RoutingRole in Test_TC_DGTHREAD_2_1 * Use ApplicationBasicApplication instead of struct in Test_TC_APBSC_9_1 * vendor-id to vendor_id * Update src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml to use vendor_id type for the vendorID attribute per spec * Update Test_TC_BINFO_2_1 to check for type vendor_id instead of int16u for the vendorID attribute * Update Test_TC_CHANNEL_5_3 to check for type ChannelInfo instead of list when reading the current channel attribute * Update generated code
PR #21404: Size comparison from 079a65d to b6483f5 Increases (2 builds for cc13x2_26x2, telink)
Decreases (3 builds for cc13x2_26x2, linux, telink)
Full report (32 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
woody-apple
deleted the
cherry-pick-f93e6cb403ff655b142391e96fb6a1ab3d484413
branch
July 29, 2022 18:59
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
This PR add basic type checking to YAML tests.
In summary this PR just checks that the type that is used as a constraint match with the type that is declared in the XML.
The actual value checking itself is done when
chip::app::DataModel::Decode(*data, value)
is called by the test framework, which fails if the payload can not be decoded/converted to the types eclared in the XML.As a followup to this PR it would be nice to actually use the type name from the spec instead of the current type name from
chip-types.xml
. For example the spec saysbool
wherechip-types.xml
saysboolean
, or the spec saysmap32
wherechip-types.xml
saysbitmap32
, etc...Change overview
src/app/tests/suites
tests constraints to make sure thetype
is correctsrc/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml
to useuint8
forCurrentFabricIndex
instead offabric_idx
since this is what is in the spec (I'm not sure the spec is right here...)src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml
to usevendor_id
type for thevendorID
attribute per specTesting
A lot of generated tests are now failing instead of issuing a warning if the type is incorrect