-
Notifications
You must be signed in to change notification settings - Fork 7.7k
twsiter: binary handler: pass verbose setting to west call #91131
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?
Conversation
hakehuang
commented
Jun 5, 2025
- pass verbose setting to west call.
- refactor the runner setting code.
5f4c0ac
to
4de9170
Compare
1. pass verbose setting to west call. 2. refactor the runner setting code. Signed-off-by: Hake Huang <hake.huang@nxp.com>
4de9170
to
97b48a9
Compare
|
@gchwier @golowanow @anasnashif please help to review, Thanks |
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.
Please address the verbosity level. I am not convinced the refactoring helps, but I won't block on this.
if self.options.verbose > 0: | ||
command.append(f"-{'v'*self.options.verbose}") |
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.
I'm not a fan of sharing verbosity parameter between twister ang west. Twister uses verbosity level e.g. to print summary, so I keep it always in my command. And I do not want to see a bunch of debug logs from west in the output. Adding new parameter to Twister just to pass it to west is also not good solution, as we have too much of them already. What about passing verbosity only when it is greater than 2?
if self.options.verbose > 2:
command.append(f"-{'v' * (self.options.verbose - 2)}")
# Handle standard runners from the mapping | ||
elif runner in runner_extra_args_config: | ||
command_extra_args.extend(runner_extra_args_config[runner]) | ||
|
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.
I'm not sure if such a refactoring simplifies the code or if it is more readable. I agree to extract "openocd" to one elif. If you want to keep common settings in runner_extra_args_config
, why you missed "jlink" and "linkserver"? And please remember, that there is also one location with the same code in pytest-twister-harness: https://github.com/zephyrproject-rtos/zephyr/blob/main/scripts/pylib/pytest-twister-harness/src/twister_harness/device/hardware_adapter.py#L64