fix: testmodule: find the scenario file under each name twister reads - #12
Merged
Merged
Conversation
The scenario table read only <module>/testcase.yaml. Newer Zephyr trees name the file tests.yaml, so every test module warned that it could not read testcase.yaml, and the table was missing. Take the first of testcase.yaml, tests.yaml and sample.yaml that exists, in twister's order (twisterlib/testplan.py). Older trees keep working. Each name is an input of the document. When no file exists, the warning names the files it tried. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tobias Kaestner <tobias.kaestner@inovex.de>
This file contains hidden or 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
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.
Summary
The scenario table of
.. testmodule::read only<module>/testcase.yaml. Newer Zephyr trees name this filetests.yaml. So on such a tree, every test module logged "could not read …testcase.yaml", and the table was missing.This PR takes the first of
testcase.yaml,tests.yamlandsample.yamlthat exists. These are the names that twister reads, in twister's order (scripts/pylib/twister/twisterlib/testplan.py). Projects on an older Zephyr keep working.rst_builders.find_scenario_yaml()finds the file. When no file exists, the warning names each file it tried... testmodule::records all three names as inputs. A scenario file that is added or renamed later also re-reads the document.testcase.yamlnow name all three.Test
tests.yamlexists;sample.yamlexists;testcase.yamlwins;tests.yaml), main compared with this branch:linenochanges, because of the new tables.🤖 Generated with Claude Code