diff options
author | Zach White <skullydazed@gmail.com> | 2021-01-31 12:46:00 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-31 12:46:00 -0800 |
commit | ef6329af7c7be77b537fbfc5a5cc7105acc679f7 (patch) | |
tree | 911f2baa834648e09baff1e7cc21cafae47a8ce8 /lib/python/qmk/tests/test_cli_commands.py | |
parent | 6cada2a35f57629f821852ba629e33e9abee3e74 (diff) | |
download | qmk_firmware-ef6329af7c7be77b537fbfc5a5cc7105acc679f7.tar.gz qmk_firmware-ef6329af7c7be77b537fbfc5a5cc7105acc679f7.zip |
Create a system to map between info.json and config.h/rules.mk (#11548)
* generate rules.mk from a json mapping
* generate rules.mk from a json mapping
* support for config.h from json maps
* improve the mapping system
* document the mapping system
* move data/maps to data/mappings
* fix flake8 errors
* fixup LED_MATRIX_DRIVER
* remove product and description from the vision_division keymap level
* reduce the complexity of generate-rules-mk
* add tests for the generate commands
* fix qmk doctor when submodules are not clean
Diffstat (limited to 'lib/python/qmk/tests/test_cli_commands.py')
-rw-r--r-- | lib/python/qmk/tests/test_cli_commands.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index f889833d0..3efeddb85 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py | |||
@@ -230,3 +230,32 @@ def test_generate_rgb_breathe_table(): | |||
230 | check_returncode(result) | 230 | check_returncode(result) |
231 | assert 'Breathing center: 1.2' in result.stdout | 231 | assert 'Breathing center: 1.2' in result.stdout |
232 | assert 'Breathing max: 127' in result.stdout | 232 | assert 'Breathing max: 127' in result.stdout |
233 | |||
234 | |||
235 | def test_generate_config_h(): | ||
236 | result = check_subcommand('generate-config-h', '-kb', 'handwired/pytest/basic') | ||
237 | check_returncode(result) | ||
238 | assert '# define DEVICE_VER 0x0001' in result.stdout | ||
239 | assert '# define DESCRIPTION handwired/pytest/basic' in result.stdout | ||
240 | assert '# define DIODE_DIRECTION COL2ROW' in result.stdout | ||
241 | assert '# define MANUFACTURER none' in result.stdout | ||
242 | assert '# define PRODUCT handwired/pytest/basic' in result.stdout | ||
243 | assert '# define PRODUCT_ID 0x6465' in result.stdout | ||
244 | assert '# define VENDOR_ID 0xFEED' in result.stdout | ||
245 | assert '# define MATRIX_COLS 1' in result.stdout | ||
246 | assert '# define MATRIX_COL_PINS { F4 }' in result.stdout | ||
247 | assert '# define MATRIX_ROWS 1' in result.stdout | ||
248 | assert '# define MATRIX_ROW_PINS { F5 }' in result.stdout | ||
249 | |||
250 | |||
251 | def test_generate_rules_mk(): | ||
252 | result = check_subcommand('generate-rules-mk', '-kb', 'handwired/pytest/basic') | ||
253 | check_returncode(result) | ||
254 | assert 'BOOTLOADER ?= atmel-dfu' in result.stdout | ||
255 | assert 'MCU ?= atmega32u4' in result.stdout | ||
256 | |||
257 | |||
258 | def test_generate_layouts(): | ||
259 | result = check_subcommand('generate-layouts', '-kb', 'handwired/pytest/basic') | ||
260 | check_returncode(result) | ||
261 | assert '#define LAYOUT_custom(k0A) {' in result.stdout | ||