Open patricksurry opened 7 months ago
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.
Adds a unittest in
test_boards.py
imports each of the 70+ boards/**/main.py in turn usingtests/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 thedactyl
keyboards try to map an unknown AVR pinB7
. 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.