diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/docs/dev-setup.md | 3 | ||||
-rw-r--r-- | docs/docs/dev-tests.md | 20 | ||||
-rw-r--r-- | docs/sidebars.js | 1 | ||||
-rw-r--r-- | docs/static/setup.sh | 3 |
4 files changed, 26 insertions, 1 deletions
diff --git a/docs/docs/dev-setup.md b/docs/docs/dev-setup.md index 6e893b3..fae0aa0 100644 --- a/docs/docs/dev-setup.md +++ b/docs/docs/dev-setup.md @@ -52,6 +52,7 @@ sudo apt install -y \ autoconf \ automake \ build-essential \ + bzip2 \ ccache \ device-tree-compiler \ dfu-util \ @@ -91,6 +92,7 @@ sudo apt install -y \ autoconf \ automake \ build-essential \ + bzip2 \ ccache \ device-tree-compiler \ dfu-util \ @@ -130,6 +132,7 @@ sudo dnf install -y \ wget \ autoconf \ automake \ + bzip2 \ ccache \ dtc \ dfu-util \ diff --git a/docs/docs/dev-tests.md b/docs/docs/dev-tests.md new file mode 100644 index 0000000..68d4725 --- /dev/null +++ b/docs/docs/dev-tests.md @@ -0,0 +1,20 @@ +--- +id: dev-tests +title: Tests +sidebar_label: Tests +--- + +Running tests requires [native posix support](./dev-posix-board). Any folder under `/app/tests` +containing `native_posix.keymap` will be selected when running `./run-test.sh all`. + +## Creating a New Test Set +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 +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) +6. Modify `test_case/keycode_events.snapshot` for to include the expected output +7. Rename the `test_case` folder to describe the test. +8. Repeat steps 4 to 7 for every test case
\ No newline at end of file diff --git a/docs/sidebars.js b/docs/sidebars.js index 51313fc..d426667 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -20,6 +20,7 @@ module.exports = { "dev-setup", "dev-boards-shields-keymaps", "dev-posix-board", + "dev-tests", ], "Dev Guides": ["dev-guide-new-shield", "dev-guide-usb-logging"], }, diff --git a/docs/static/setup.sh b/docs/static/setup.sh index bb61df6..4dc740a 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -38,7 +38,7 @@ echo "" echo "Keyboard Shield Selection:" prompt="Pick an keyboard:" -options=("Kyria" "Lily58" "Corne") +options=("Kyria" "Lily58" "Corne" "Splitreus62") PS3="$prompt " # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. @@ -50,6 +50,7 @@ select opt in "${options[@]}" "Quit"; do 1 ) shield_title="Kyria" shield="kyria"; split="y"; break;; 2 ) shield_title="Lily58" shield="lily58"; split="y"; break;; 3 ) shield_title="Corne" shield="corne"; split="y"; break;; + 4 ) shield_title="Splitreus62" shield="splitreus62"; split="y"; break;; # Add link to docs on adding your own custom shield in your ZMK config! # $(( ${#options[@]}+1 )) ) echo "Other!"; break;; |