Skip to content

Conversation

@carlescufi
Copy link
Member

  • The first commit should be non-controversial, it just moves the argparse call to the abstract ZephyrBinaryRunner class
  • The second commit is there to avoid duplicating logic in individual runners, reusing the infrastructure in core.py. The usage of the global _DRY_RUN should remain unaffected, but subclasses can now set self.dry_run and then use the base classe methods (_log_cmd(), call(), check_call() and check_output()) directly without having to implement the logic themselves

@carlescufi carlescufi requested a review from mbolivar October 28, 2025 18:41
@zephyrbot zephyrbot added the area: West West utility label Oct 28, 2025
@carlescufi
Copy link
Member Author

@mbolivar would appreciate a review as per the discussion in #98018 (comment)

Move the argparse.add_argument() call to the abstract base class and
augment the RunnerCaps class with a dry_run parameter.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
In order to avoid duplication of logic in runners, allow subclasses
of ZephyrBinaryRunner to set self.dry_run so that they can then reuse
the logic in core.py to log instead of execute.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
@carlescufi carlescufi changed the title scripst: runners: generalize dry run scripts: runners: generalize dry run Oct 28, 2025
@carlescufi carlescufi added this to the v4.4.0 milestone Oct 28, 2025
@sonarqubecloud
Copy link

Please retry analysis of this Pull-Request directly on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: West West utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants