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

board hygiene for local mocking #921

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

patricksurry
Copy link
Contributor

@patricksurry patricksurry commented Dec 9, 2023

Adds a unittest in test_boards.py imports each of the 70+ boards/**/main.py in turn using tests/mock_board.py. This turned up a bunch of simple hygiene issues that I fixed (capitalization etc), including some doc stuff. The only one I don't know how to deal with is that several of the dactyl keyboards try to map an unknown AVR pin B7. I ignore that for now but happy to hear if anyone knows the correct fix.

The test itself is a little slow (about 5s on my old macbook) so I guess could be optional. Let me know what you think.

(background) this is so I can test an integration with https://github.com/caksoylar/keymap-drawer to draw an SVG diagram of any of the KMK layouts. Many of the boards I initially tried were broken even in a mocked setup.

@xs5871
Copy link
Collaborator

xs5871 commented Dec 11, 2023

Sounds reasonable in general, but we should make the unit tests for contributions and the firmware core independent. Suggestion: two new make targets unit-tests-boards and unit-tests-kmk (I'm open to better names), make unit-tests pull in both as a catch-all, adjust github actions to only trigger if respective sources change, and reflect all that in the docs.

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.

2 participants