-
Notifications
You must be signed in to change notification settings - Fork 7.8k
twister: Add configuration reader to pytest-twister-harness #94301
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
base: main
Are you sure you want to change the base?
twister: Add configuration reader to pytest-twister-harness #94301
Conversation
0dddba5
to
e5301ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding it! looks great, only minor comments
scripts/pylib/pytest-twister-harness/src/twister_harness/fixtures.py
Outdated
Show resolved
Hide resolved
scripts/pylib/pytest-twister-harness/src/twister_harness/helpers/config_reader.py
Outdated
Show resolved
Hide resolved
e5301ed
to
73df250
Compare
can we add more support to reader from and environ variable such as
|
This is example of test implementation, so you can provide the path as you want.
or just take the path from env variable |
Added a class that helps to read Kconfigs from a configuration file. Signed-off-by: Lukasz Fundakowski <[email protected]>
73df250
to
7086eaf
Compare
|
Added a class
twister_harness.helpers.config_reader.ConfigReader
that helps to read Kconfigs from a configuration file.Added pytest fixture
config_reader
that provides aConfigReader
instance for reading configuration files.This fixture allows tests to easily create a
ConfigReader
object by passingthe path to a configuration file. The
ConfigReader
reads the file andprovides a method to access the configuration data.
Example: