Skip to content

feat: add --port-by-serial option to filter ports by serial number #360

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

horw
Copy link
Member

@horw horw commented Jun 26, 2025

Description

This feature introduces a new CLI option --port-by-serial that allows users to filter ports based on a comma-separated list of serial numbers.

  • Updates esptool dependency to version 4.9.0.
  • Adds --port-by-serial argument to the CLI under the esp_group.
  • Populates the filters['serials'] field and passes it to esptool.get_port_list(**filters).

Related

Closes #316

Testing


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@horw horw requested a review from hfudev June 26, 2025 07:49
Copy link
Member

@hfudev hfudev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. one naming question

@@ -203,6 +203,9 @@ def pytest_addoption(parser):
'--port-mac',
help='MAC address of the board. (Default: None)',
)
esp_group.addoption(
'--port-by-serial', help='Comma-separated list of serial numbers to filter ports by. (Default: None)'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick, better like the others use noun instead. for example, --port-serial-number?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add USB serial number filtering (RDT-991)
2 participants