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
twister: testplan: toolchain_exclude filter is overridden by integration_platforms #49696
Comments
Feel free to close this if you do not think this is a bug. I still do not understand why toolchain filter needs to be mutually exclusive with platform filters (by that, I mean |
TL;DR It's a feature, not a bug. IMO it is the only way to have a reliable scope in the CI. I find it not a bug since this is the desired behavior and I deliberately made it work like this (skips on integration platforms getting changed to errors in the CI run). The background: We realized we need to be able to set the platform scope for the CI on the test level. I.e. the test (and/or the CI) maintainers should be able to decide on which platforms the test has to run in the CI. This led us to the introduction of the
This issue questions the second statement, so I will elaborate a bit more on it. There are dozens of filters applied by twister to decide if a test can run on a given platform https://github.com/zephyrproject-rtos/zephyr/blob/main/scripts/pylib/twister/twisterlib/testplan.py#L553 Not applicable tests end as being skipped. With so many filters (with some of them being very obscured) there is a high risk for a test to switch from passed to skipped (e.g. a typo in depends_on entry). Skipped tests are not monitored in any way. Only errors/failures are marked as red and highlighted in the reports. In the reported issue. If a certain scenario is deliberately skipped with "zephyr" toolchain (the one used in the CI) why would we want to deliberately ask the CI to execute it (vide definition of integration_platforms)? These are two mutually excluding options and hence the error. So in this case, if we know that this scenario cannot be executed in the CI, we can:
|
not a bug. |
Describe the bug
When both
integration_platforms
andtoolchain_exclude
are specified for a test, the twister testplan logic fails to apply thetoolchain_exclude
filter.For example (8e8b568):
The
status
of the above test forqemu_x86
is set toerror
(In test case toolchain exclude but is one of the integration platforms
) instead offiltered
-- this results in the CI attempting to run this test when it should not.To Reproduce
At 8e8b568, run the following:
test.json
contains the following:Expected behavior
status
fortests/subsys/logging/log_core_additional/logging.add.log_user
onqemu_x86
is set tofiltered
.Impact
CI attempts to execute these tests because they are not "filtered."
Environment (please complete the following information):
Additional context
Related discussion on Discord: https://discord.com/channels/720317445772017664/733037944922964069/1014173813795209216
The text was updated successfully, but these errors were encountered: