summaryrefslogtreecommitdiff
path: root/lib/python/qmk/tests/test_cli_commands.py
diff options
context:
space:
mode:
authorDan McClain <dan@danmcclain.net>2019-10-07 14:32:30 -0400
committernoroadsleft <18669334+noroadsleft@users.noreply.github.com>2019-10-07 11:32:30 -0700
commitf04e58dad6f56cdbd5d369c9e00405dcdb47c8ea (patch)
tree3731766a019c84f9a080cade3f4eee4460473341 /lib/python/qmk/tests/test_cli_commands.py
parentd9b056486bf62f4751999d926fb3f8aad6d0c821 (diff)
downloadqmk_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/test_cli_commands.py')
-rw-r--r--lib/python/qmk/tests/test_cli_commands.py8
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 2fc6e0f723..c9d632517b 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():
result = check_subcommand('pyformat')
assert result.returncode == 0
assert 'Successfully formatted the python code' in result.stderr
+
+
+def test_list_keyboards():
+ result = check_subcommand('list_keyboards')
+ assert result.returncode == 0
+ # check to see if a known keyboard is returned
+ # this will fail if handwired/onekey/pytest is removed
+ assert 'handwired/onekey/pytest' in result.stdout