-
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
[matter_yaml] Add a yaml test that exercise anyOf, EqualityCommands and runIf #26567
[matter_yaml] Add a yaml test that exercise anyOf, EqualityCommands and runIf #26567
Conversation
PR #26567: Size comparison from a33249d to ec3e876 Increases (18 builds for bl602, bl702, esp32, psoc6, qpg, telink)
Decreases (6 builds for cyw30739, esp32, telink)
Full report (57 builds for bl602, bl702, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
ec3e876
to
bac2a2e
Compare
PR #26567: Size comparison from a33249d to bac2a2e Increases (12 builds for bl602, bl702, psoc6, telink)
Decreases (5 builds for psoc6, telink)
Full report (57 builds for bl602, bl702, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
General question on the state of the yaml - we seem to be quickly making our way towards writing an ad-hoc fully functional language. Is this really what we want to do? Is this actually easier to write and understand than a test written in a standard language? |
bac2a2e
to
520840a
Compare
PR #26567: Size comparison from b4fb147 to 520840a Increases (8 builds for bl602, bl702, cc32xx, psoc6, telink)
Decreases (10 builds for bl702, esp32, psoc6, qpg, telink)
Full report (57 builds for bl602, bl702, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
520840a
to
4a523ca
Compare
PR #26567: Size comparison from 5f1a60b to 4a523ca Increases (12 builds for bl602, cc32xx, cyw30739, nrfconnect, psoc6, telink)
Decreases (9 builds for bl702, esp32, nrfconnect, psoc6, telink)
Full report (57 builds for bl602, bl702, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
Since this particular PR is about adding a mechanism to do a sort of 'if' that is a fair question. | Is this really what we want to do? The answer is obviously no. And, as of today, I have tried to avoid that as much as possible. | Is this actually easier to write and understand than a test written in a standard language? I am not the best one to answer this particular question. I do not have personal strong opinion about that beside the fact that the YAML tests is what is used today by the certification infrastructure and has been written/updated at fast pace by various different people with various different skills and knowledge of the SDK. So to me the question is not really "should we switch/rewrite the tests to something else" but more "what can we bring on to our current tool to enhance the automated coverage". On a more technical side, the current yaml python runner offers the opportunity to add custom "commands" written in python for very specific steps. My current thinking is that we should leverage this supports to support the long tails of unique steps and if we can found some patterns, add dedicated YAML support for the found pattern. It should let us avoid the issue of making our YAML tests format so complex that it ends up as something that can be compared to a programming language (which is not the case today imho). |
…nd runIf (project-chip#26567) * [matter_yamltests] Add anyOf constraint supports * [matter_yamltest] Add EqualityCommands pseudo cluster * [matter_yamltest] Add a runIf keyword to enable/disable a step based on a boolean variable * Add a yaml test that exercise anyOf, EqualityCommands and runIf
Problem
#26459 (comment) asked if there is a way to condition test step based on variables that have been saved using
saveAs
.This PR is an attempt at trying to add the necessary bits to make it possible to fully automate
Test_TC_S_2_2.yaml
and other tests that may expect different return values for a given step and condition the following steps depending on the effect return value.Concretely it introduce 3 things:
anyOf
constraint that allows multiple values and is fulfilled is one value in the list match the returned valueEqualityCluster
that allow to compute the result of a simple comparaison. The purpose here is to be able to compute a boolean that can be used to enable/disable some other steps.runIf
step keyword which enable/disable the step dynamically based on a boolean variable value.