From 64dadfb336b350be72779132283a67bd0f21f377 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Fri, 6 May 2022 06:23:40 +0000 Subject: [PATCH] refactor(tests): Move remaining tests to posix 64. * Update docs and fix up a few lingering tests to consistently use native_posix_64 target. --- .../{native_posix.keymap => native_posix_64.keymap} | 0 .../{native_posix.keymap => native_posix_64.keymap} | 0 .../{native_posix.keymap => native_posix_64.keymap} | 0 .../{native_posix.keymap => native_posix_64.keymap} | 0 .../{native_posix.keymap => native_posix_64.keymap} | 0 .../{native_posix.keymap => native_posix_64.keymap} | 0 .../{native_posix.keymap => native_posix_64.keymap} | 0 .../{native_posix.keymap => native_posix_64.keymap} | 0 docs/docs/development/posix-board.md | 8 ++++---- docs/docs/development/tests.md | 4 ++-- 10 files changed, 6 insertions(+), 6 deletions(-) rename app/tests/hold-tap/balanced/8-global-quick-tap/1-basic/{native_posix.keymap => native_posix_64.keymap} (100%) rename app/tests/hold-tap/balanced/8-global-quick-tap/2-double-hold/{native_posix.keymap => native_posix_64.keymap} (100%) rename app/tests/hold-tap/hold-preferred/8-global-quick-tap/1-basic/{native_posix.keymap => native_posix_64.keymap} (100%) rename app/tests/hold-tap/hold-preferred/8-global-quick-tap/2-double-hold/{native_posix.keymap => native_posix_64.keymap} (100%) rename app/tests/hold-tap/tap-preferred/8-global-quick-tap/1-basic/{native_posix.keymap => native_posix_64.keymap} (100%) rename app/tests/hold-tap/tap-preferred/8-global-quick-tap/2-double-hold/{native_posix.keymap => native_posix_64.keymap} (100%) rename app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/1-basic/{native_posix.keymap => native_posix_64.keymap} (100%) rename app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/2-double-hold/{native_posix.keymap => native_posix_64.keymap} (100%) diff --git a/app/tests/hold-tap/balanced/8-global-quick-tap/1-basic/native_posix.keymap b/app/tests/hold-tap/balanced/8-global-quick-tap/1-basic/native_posix_64.keymap similarity index 100% rename from app/tests/hold-tap/balanced/8-global-quick-tap/1-basic/native_posix.keymap rename to app/tests/hold-tap/balanced/8-global-quick-tap/1-basic/native_posix_64.keymap diff --git a/app/tests/hold-tap/balanced/8-global-quick-tap/2-double-hold/native_posix.keymap b/app/tests/hold-tap/balanced/8-global-quick-tap/2-double-hold/native_posix_64.keymap similarity index 100% rename from app/tests/hold-tap/balanced/8-global-quick-tap/2-double-hold/native_posix.keymap rename to app/tests/hold-tap/balanced/8-global-quick-tap/2-double-hold/native_posix_64.keymap diff --git a/app/tests/hold-tap/hold-preferred/8-global-quick-tap/1-basic/native_posix.keymap b/app/tests/hold-tap/hold-preferred/8-global-quick-tap/1-basic/native_posix_64.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/8-global-quick-tap/1-basic/native_posix.keymap rename to app/tests/hold-tap/hold-preferred/8-global-quick-tap/1-basic/native_posix_64.keymap diff --git a/app/tests/hold-tap/hold-preferred/8-global-quick-tap/2-double-hold/native_posix.keymap b/app/tests/hold-tap/hold-preferred/8-global-quick-tap/2-double-hold/native_posix_64.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/8-global-quick-tap/2-double-hold/native_posix.keymap rename to app/tests/hold-tap/hold-preferred/8-global-quick-tap/2-double-hold/native_posix_64.keymap diff --git a/app/tests/hold-tap/tap-preferred/8-global-quick-tap/1-basic/native_posix.keymap b/app/tests/hold-tap/tap-preferred/8-global-quick-tap/1-basic/native_posix_64.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/8-global-quick-tap/1-basic/native_posix.keymap rename to app/tests/hold-tap/tap-preferred/8-global-quick-tap/1-basic/native_posix_64.keymap diff --git a/app/tests/hold-tap/tap-preferred/8-global-quick-tap/2-double-hold/native_posix.keymap b/app/tests/hold-tap/tap-preferred/8-global-quick-tap/2-double-hold/native_posix_64.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/8-global-quick-tap/2-double-hold/native_posix.keymap rename to app/tests/hold-tap/tap-preferred/8-global-quick-tap/2-double-hold/native_posix_64.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/1-basic/native_posix.keymap b/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/1-basic/native_posix_64.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/1-basic/native_posix.keymap rename to app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/1-basic/native_posix_64.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/2-double-hold/native_posix.keymap b/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/2-double-hold/native_posix_64.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/2-double-hold/native_posix.keymap rename to app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/2-double-hold/native_posix_64.keymap diff --git a/docs/docs/development/posix-board.md b/docs/docs/development/posix-board.md index 71460a87..d0ad571a 100644 --- a/docs/docs/development/posix-board.md +++ b/docs/docs/development/posix-board.md @@ -21,18 +21,18 @@ apt install -y gcc-multilib ## Building To do this, you can build ZMK targeting the -`native_posix` board. +`native_posix_64` board. ``` -west build --pristine --board native_posix +west build --pristine --board native_posix_64 -- -DZMK_CONFIG=tests/none/normal/ ``` Once built, you can run the firmware locally: ``` -./build/zephyr/zephyr.exe +./build/zephyr/zmk.exe ``` ## Virtual Key Events -The virtual key presses are hardcoded in `boards/native_posix.overlay` file, should you want to change the sequence to test various actions like Mod-Tap, etc. +The virtual key presses are hardcoded in `boards/native_posix_64.overlay` file, should you want to change the sequence to test various actions like Mod-Tap, etc. diff --git a/docs/docs/development/tests.md b/docs/docs/development/tests.md index e84acf8d..37b52bdd 100644 --- a/docs/docs/development/tests.md +++ b/docs/docs/development/tests.md @@ -4,7 +4,7 @@ sidebar_label: Tests --- - Running tests requires [native posix support](posix-board.md). -- Any folder under `/app/tests` containing `native_posix.keymap` will be selected when running `west test`. +- Any folder under `/app/tests` containing `native_posix_64.keymap` will be selected when running `west test`. - Run tests from within the `/zmk/app` directory. - Run a single test with `west test `, like `west test tests/toggle-layer/normal`. @@ -13,7 +13,7 @@ sidebar_label: Tests 1. Copy the test set that most closely resembles the tests you will be creating. 2. Rename the newly created test set to the behavior you're testing e.g, toggle-layer 3. Modify `behavior_keymap.dtsi` to create a keymap using the behavior and related behaviors -4. Modify `test_case/native_posix.keymap` for a simulated use case +4. Modify `test_case/native_posix_64.keymap` for a simulated use case 5. Modify `test_case/events.patterns` to collect relevant logs to the test - See: [sed manual](https://www.gnu.org/software/sed/manual/sed.html) and [tutorial](https://www.digitalocean.com/community/tutorials/the-basics-of-using-the-sed-stream-editor-to-manipulate-text-in-linux)