summaryrefslogtreecommitdiff
path: root/lib/python/qmk/tests
diff options
context:
space:
mode:
authorjorgemanzo <jmanzo203689@gmail.com>2019-10-04 23:38:34 -0700
committerFlorian Didron <fdidron@users.noreply.github.com>2020-01-09 08:57:11 +0900
commitd459da0c9587a1e86d86d4773e5acd7dbbc9da9a (patch)
tree38eb9a3aafcb13e8b5f03018e5a0a2a293ab70ca /lib/python/qmk/tests
parent22891f9c83b2d2c329adb5c9181cf1002f2687ca (diff)
Add CLI command for flashing a keyboard
A new CLI subcommand was added, flash, which behaves very similar to the already present compile CLI comamnd, but with the added ability to target a bootloader. The command is used like so: qmk flash [-h] [-b] [-kb KEYBOARD] [-km KEYMAP] [-bl BOOTLOADER] [filename]. A -kb <keyboard> and -km <keymap> is expected, or a configurator export JSON filename. A bootloader can be specified using -bl <target>, and if left unspecified, the target is assumed to be :flash. -bl can be used to list the available bootloaders. If -km <keymap> is provided, but no -kb <keyboard>, then a message is printed suggesting the user to run qmk list_keyboards.
Diffstat (limited to 'lib/python/qmk/tests')
-rw-r--r--lib/python/qmk/tests/test_cli_commands.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py
index 85d4d91af1..dcab8bdae4 100644
--- a/lib/python/qmk/tests/test_cli_commands.py
+++ b/lib/python/qmk/tests/test_cli_commands.py
@@ -13,6 +13,9 @@ def test_cformat():
def test_compile():
assert check_subcommand('compile', '-kb', 'handwired/onekey/pytest', '-km', 'default').returncode == 0
+def test_flash():
+ assert check_subcommand('flash', '-b').returncode == 1
+ assert check_subcommand('flash').returncode == 1
def test_config():
result = check_subcommand('config')