Skip to content
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

mpflash: Fix macOS specific ports scanning issues #634

Merged
merged 2 commits into from
Dec 17, 2024
Merged

Conversation

Josverl
Copy link
Owner

@Josverl Josverl commented Dec 16, 2024

Modify the filtered_comports function in src/mpflash/mpflash/common.py to exclude non-microcontroller ports based on descriptions and hardware ID patterns.

  • Exclude ports with descriptions containing "debug-console" on MacOS / Darwin.
  • Add trace logging with more Bluetooth hardware details during filtering of the ports.

Add tests for the changed functionality in src/mpflash/tests/test_filtered_comports.py.

  • Add tests for MacOS ports filtering.
  • Verify that non-microcontroller ports are correctly excluded.

Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.67%. Comparing base (a2a55d1) to head (4a57ddb).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #634   +/-   ##
=======================================
  Coverage   78.67%   78.67%           
=======================================
  Files          68       68           
  Lines        5683     5683           
  Branches      899      899           
=======================================
  Hits         4471     4471           
  Misses        905      905           
  Partials      307      307           
Flag Coverage Δ
stubber 78.39% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Josverl Josverl changed the title Fix macOS specific ports scanning issues mpflash: Fix macOS specific ports scanning issues Dec 16, 2024
@Josverl Josverl force-pushed the mpflash-fix-macports branch 4 times, most recently from 85e598b to 060a451 Compare December 17, 2024 10:39
Modify the `filtered_comports` function in `src/mpflash/mpflash/common.py` to exclude non-microcontroller ports based on descriptions and hardware ID patterns.

* Exclude ports with descriptions containing "debug-console" on MacOS / Darwin.
* Add logic to exclude bluetooth ports on MacOS / Darwin.
* Add tests for MacOS ports filtering.

Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
@Josverl Josverl force-pushed the mpflash-fix-macports branch from 060a451 to 2cf90b9 Compare December 17, 2024 13:22
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
@Josverl Josverl merged commit 10ef266 into main Dec 17, 2024
39 of 40 checks passed
@Josverl Josverl deleted the mpflash-fix-macports branch December 17, 2024 22:26
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.

1 participant