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

[Tests] Increase QMK test coverage take 2 #15269

Merged
merged 10 commits into from
Nov 23, 2021
Merged

Conversation

KarlK90
Copy link
Member

@KarlK90 KarlK90 commented Nov 22, 2021

This is a follow up to #13789 which was a bit rushed 😉

Description

This PR enhances the current unit-testing integration testing facilities and adds additional tests:

  • All tests use an isolated per-test keymap instead of a global shared keymap in keymap.c the usage goes like this:
/* Define keys like this: layer, column, row, keycode */
auto       key_a      = KeymapKey(0, 0, 0, KC_A);
auto       key_lshift = KeymapKey(0, 1, 1, KC_LSFT);

/* Add keys to keymap for this test */
set_keymap({key_a, key_lshift});

key_a.press();
key_a.release();
key_lshift.press();
key_lshift.release();
  • Tests that fail provide a lot more context on the events that happened during the execution.
  • Tests were added:
    • basic key-presses
    • mod-taps and layer taps with different tap-hold configurations
    • one-shot mods and layers

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@github-actions github-actions bot added the core label Nov 22, 2021
@tzarc tzarc requested review from tzarc and a team November 22, 2021 23:36
@github-actions github-actions bot added cli qmk cli command documentation keyboard keymap python via Adds via keymap and/or updates keyboard for via support labels Nov 22, 2021
@github-actions github-actions bot removed keyboard python keymap via Adds via keymap and/or updates keyboard for via support cli qmk cli command documentation labels Nov 22, 2021
@KarlK90
Copy link
Member Author

KarlK90 commented Nov 23, 2021

Not sure why the formatters had a hickup...

@tzarc tzarc requested a review from a team November 23, 2021 02:08
@tzarc tzarc merged commit a24bdcc into qmk:develop Nov 23, 2021
cadusk pushed a commit to cadusk/qmk_firmware that referenced this pull request Dec 2, 2021
* qmk/develop: (80 commits)
  Remove use of __flash due to LTO issues (qmk#15268)
  Revert "handwired/split89 Layout Macro Refactor (qmk#15210)" (qmk#15284)
  New Keyboard: TGR Jane CE (qmk#14713)
  Portal 66 Layout Macro Refactor (qmk#15255)
  Pluckey: Fix QMK Configurator Implementation (qmk#15254)
  [Tests] Increase QMK test coverage take 2 (qmk#15269)
  Ignore exit codes for formatters (qmk#15276)
  [Keyboard] Disable features on SplitKB boards to fit under size (qmk#15262)
  Ignore exit codes for formatters (qmk#15275)
  Ignore deleted files when formatting codebase (qmk#15274)
  qmk format-python - filter for Python files (qmk#15271)
  Revert "[Tests] Increase QMK test coverage (qmk#13789)"
  [Tests] Increase QMK test coverage (qmk#13789)
  [Docs] Squeezing space out of AVR (qmk#15243)
  Add uint to char functions (qmk#15244)
  [Keyboard] Disable console on Keebio foldkb and iris rev3 (qmk#15260)
  layer_combo → sd_combo (qmk#15266)
  [Keymap] Disable console on Sofle default keymap (qmk#15261)
  [Keyboard] Enable LTO on viktus/sp_mini via keymap (qmk#15263)
  Macros in JSON keymaps (qmk#14374)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants