Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native posix integration testing #131

Merged

Conversation

BrainWart
Copy link
Contributor

@BrainWart BrainWart commented Aug 28, 2020

Thank you, pete, for getting me started with this. I moved the files to a more robust layout, created tests for a handful of the behaviors, modified the run-test.sh script to allow running all commands and for it to show a brief summary of the successful builds.

Not tested at the moment:

  • RGB behaviors
  • reset and bootloader behaviors
  • mod-tap

I would like to have run-test.sh work with a set of tests. I think it would be nice to execute a set of tests by calling run-test.sh with the folder of tests or different selections.

Copy link
Contributor

@petejohanson petejohanson left a comment

Looking good! A few minor nitpicks.

app/tests/Creating Tests.md Outdated Show resolved Hide resolved
app/run-test.sh Show resolved Hide resolved
Copy link
Contributor

@petejohanson petejohanson left a comment

Was the intent to have some of these tests failing when we merge it?

I'm getting:

Running tests/keypress/cp-press-release:
Running tests/keypress/kp-press-release:
Running tests/transparent/layered:
Running tests/transparent/normal:
Running tests/momentary-layer/early-key-release:
Running tests/momentary-layer/normal:
Running tests/none/layered:
Running tests/none/normal:
Running tests/toggle-layer/early-key-release:
Running tests/toggle-layer/normal:
--- tests/none/layered/keycode_events.snapshot	2020-08-28 09:57:55.582139659 -0400
+++ build/tests/none/layered/keycode_events.log	2020-08-28 09:58:31.844354346 -0400
@@ -0,0 +1,2 @@
+kp_pressed: usage_page 0x07 keycode 0x04
+kp_released: usage_page 0x07 keycode 0x04
--- tests/momentary-layer/early-key-release/keycode_events.snapshot	2020-08-28 09:57:55.581139653 -0400
+++ build/tests/momentary-layer/early-key-release/keycode_events.log	2020-08-28 09:58:31.860354441 -0400
@@ -1,4 +1,4 @@
 kp_pressed: usage_page 0x07 keycode 0x05
 mo_pressed: position 1 layer 1
-kp_released: usage_page 0x07 keycode 0x05
+kp_released: usage_page 0x0c keycode 0xb5
 mo_released: position 1 layer 1
--- tests/toggle-layer/early-key-release/keycode_events.snapshot	2020-08-28 09:57:55.582139659 -0400
+++ build/tests/toggle-layer/early-key-release/keycode_events.log	2020-08-28 09:58:41.048435553 -0400
@@ -1,6 +1,6 @@
 kp_pressed: usage_page 0x07 keycode 0x05
 tog_pressed: position 1 layer 1
-kp_released: usage_page 0x07 keycode 0x05
+kp_released: usage_page 0x0c keycode 0xb5
 tog_released: position 1 layer 1
 kp_pressed: usage_page 0x0c keycode 0xb5
 kp_released: usage_page 0x0c keycode 0xb5

PASS: tests/keypress/cp-press-release
PASS: tests/keypress/kp-press-release
FAIL: tests/momentary-layer/early-key-release
PASS: tests/momentary-layer/normal
FAIL: tests/none/layered
PASS: tests/none/normal
FAIL: tests/toggle-layer/early-key-release
PASS: tests/toggle-layer/normal
PASS: tests/transparent/layered
PASS: tests/transparent/normal

When I run all here.

@BrainWart
Copy link
Contributor Author

BrainWart commented Aug 28, 2020

Yeah. Those tests fail. I'm trying to get some PRs that'll make those pass correctly. None should pass now that it's fixed in main. This branch doesn't have the fix though

@BrainWart BrainWart force-pushed the tests/native-posix-test-exploration branch from 6dfa362 to 205a54b Compare Aug 28, 2020
pending tests will not fail the build
Copy link
Contributor

@petejohanson petejohanson left a comment

This is a great first implementation of this!

@petejohanson petejohanson merged commit 86c3dac into zmkfirmware:main Aug 29, 2020
1 check passed
MangoIV pushed a commit to MangoIV/zmk that referenced this pull request Dec 18, 2020
…test-exploration

Native posix integration testing
tyalie pushed a commit to tyalie/zmk that referenced this pull request Nov 15, 2022
…test-exploration

Native posix integration testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants