Skip to content

Exclude ch34x_driver.cpp from coverage - #3

Merged
Boernsman merged 1 commit into
mainfrom
coverage-exclude-ch34x
Sep 16, 2026
Merged

Boernsman merged 1 commit into
mainfrom
coverage-exclude-ch34x

Conversation

@Boernsman

Copy link
Copy Markdown
Contributor

src/drivers/ch34x/ch34x_driver.cpp is the CH340 counterpart of
ftdi_driver.cpp: it is the code that actually talks to a device over libusb,
so the unit tests cannot reach it without hardware. ftdi_driver.cpp was already
excluded for that reason; this adds the CH340 one on the same grounds.

Merging the ch340 driver dropped the reported figure from 85.0% to 75.1%, against
a --fail-under-line 75 gate — it passed with 0.1 points to spare, and the next
chip family would have tripped it. The number was measuring how much untestable
transport code the tree contains rather than how well the testable code is
covered.

The scope comment is reworded to say the rule rather than list the files, since
every new chip family adds one more driver to it.

@Boernsman
Boernsman merged commit 4d2f446 into main Sep 16, 2026
5 checks passed
@Boernsman
Boernsman deleted the coverage-exclude-ch34x branch September 16, 2026 07:46
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