diff options
| author | Dan McClain <dan@danmcclain.net> | 2019-10-07 14:32:30 -0400 |
|---|---|---|
| committer | noroadsleft <18669334+noroadsleft@users.noreply.github.com> | 2019-10-07 11:32:30 -0700 |
| commit | f04e58dad6f56cdbd5d369c9e00405dcdb47c8ea (patch) | |
| tree | 3731766a019c84f9a080cade3f4eee4460473341 /lib/python/qmk/tests | |
| parent | d9b056486bf62f4751999d926fb3f8aad6d0c821 (diff) | |
| download | qmk_firmware-f04e58dad6f56cdbd5d369c9e00405dcdb47c8ea.tar.gz qmk_firmware-f04e58dad6f56cdbd5d369c9e00405dcdb47c8ea.zip | |
[CLI] Add `qmk list_keyboards` (#6927)
`list_keyboards` replicates the `make list-keyboards` by globbing for all paths
that include `rules.mk` and then removing the paths that include `keymaps`.
This basis of this cli command could be reused in the future as a util, but is
not done so here since this would be the only place that would use it currently
Resolves #6911
Diffstat (limited to 'lib/python/qmk/tests')
| -rw-r--r-- | lib/python/qmk/tests/test_cli_commands.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index 2fc6e0f72..c9d632517 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py | |||
| @@ -37,3 +37,11 @@ def test_pyformat(): | |||
| 37 | result = check_subcommand('pyformat') | 37 | result = check_subcommand('pyformat') |
| 38 | assert result.returncode == 0 | 38 | assert result.returncode == 0 |
| 39 | assert 'Successfully formatted the python code' in result.stderr | 39 | assert 'Successfully formatted the python code' in result.stderr |
| 40 | |||
| 41 | |||
| 42 | def test_list_keyboards(): | ||
| 43 | result = check_subcommand('list_keyboards') | ||
| 44 | assert result.returncode == 0 | ||
| 45 | # check to see if a known keyboard is returned | ||
| 46 | # this will fail if handwired/onekey/pytest is removed | ||
| 47 | assert 'handwired/onekey/pytest' in result.stdout | ||
