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

Initial qmk test-c functionality #23038

Merged
merged 1 commit into from
Mar 5, 2024
Merged

Initial qmk test-c functionality #23038

merged 1 commit into from
Mar 5, 2024

Conversation

zvecr
Copy link
Member

@zvecr zvecr commented Feb 8, 2024

Description

Adds CLI subcommand that extends the available functionality of normal test execution.

Adds:

  • basic test filtering

Examples

# list available tests
qmk test-c --list

# run all tests
qmk test-c

# clean and run a single test
qmk test-c --clean --test basic

# run all tests that start with "unicode"
qmk test-c --test unicode*

# run all tests with unicode somewhere in the name
qmk test-c --test *unicode*

# parallel compilation
qmk test-c -j=2 --test basic

# environment args
qmk test-c --test basic -e DEBUG=1

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 core python cli qmk cli command labels Feb 8, 2024
@zvecr zvecr changed the title Initial 'qmk test-c' functionality Initial qmk test-c functionality Feb 8, 2024
@github-actions github-actions bot added the CI label Feb 8, 2024
@DavidSannier
Copy link
Contributor

DavidSannier commented Feb 8, 2024

Hello Joel,
With this new "test-c" command, is there still a way to build the tests with DEBUG=1 (and/or other variables) as stated in docs/unit_testing.md ?
Is there also a way to clean only one test like it was with make test:basic:clean ?
Regards

@zvecr
Copy link
Member Author

zvecr commented Feb 8, 2024

With this new "test-c" command, is there still a way to build the tests with DEBUG=1

PR description updated. Usual CLI docs will follow once functionality is locked down.

Is there also a way to clean only one test like it was with make test:basic:clean ?

Still working through the various scenarios. This isnt one we currently support via qmk compile / qmk flash, and my initial aim is to somewhat follow what they do. Will have a think as its not directly obvious how we would support that. Nothing would stop the use of the "old" way.

Edit: I think this can wait for a future iteration, as we can still fallback to make invocation.

@github-actions github-actions bot removed the core label Feb 12, 2024
@zvecr zvecr marked this pull request as ready for review February 12, 2024 01:21
@tzarc tzarc requested a review from a team March 5, 2024 11:47
@zvecr zvecr merged commit a2c23e9 into develop Mar 5, 2024
7 checks passed
@zvecr zvecr deleted the cli_test_c branch March 5, 2024 16:59
dunk2k pushed a commit to dunk2k/qmk_firmware that referenced this pull request Mar 11, 2024
mechlovin pushed a commit to mechlovin/qmk_firmware that referenced this pull request Apr 4, 2024
mechlovin pushed a commit to mechlovin/qmk_firmware that referenced this pull request Apr 4, 2024
mechlovin pushed a commit to mechlovin/qmk_firmware that referenced this pull request Apr 15, 2024
whoisjordangarcia pushed a commit to whoisjordangarcia/qmk_firmware that referenced this pull request Jun 8, 2024
nuess0r pushed a commit to nuess0r/qmk_firmware that referenced this pull request Sep 8, 2024
Ardakilic pushed a commit to Ardakilic/qmk_firmware that referenced this pull request Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants