Testing: split input test (#2762)

test(pointing): Add mock input device.

New mock input device to generate input events for tests.

test(split): Add peripheral input test.

Test event propagation from peripheral input devices.

fix(split): Proper scoping for local within switch.

Minor compile fix.

chore: Fix up test snapshots after logging changes.

Adjust the test snapshots after logging changes to the central.

fix(kscan): Don't fire last mock event twice.

Fix a bug where the kscan mock would raise the last mock event
twice before halting processing.
This commit is contained in:
Pete Johanson
2025-01-13 13:15:16 -07:00
committed by GitHub
parent 022603ec16
commit 8dddb1d9d7
25 changed files with 332 additions and 21 deletions

View File

@@ -23,9 +23,10 @@ profile 1 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 23
profile 1 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 28
profile 1 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 30
profile 1 <dbg> ble_central: discover_func: [SUBSCRIBED]
profile 1 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 32
profile 1 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 34
profile 1 <dbg> ble_central: discover_func: [CONSUMER SUBSCRIBED]
profile 1 <dbg> ble_central: notify_func: payload
profile 1 00 00 04 00 00 00 00 00 |........
profile 1 <dbg> ble_central: notify_func: payload
profile 1 00 00 00 00 00 00 00 00 |........
profile 1 <dbg> ble_central: notify_func: payload
profile 1 00 00 00 00 00 00 00 00 |........

View File

@@ -23,9 +23,10 @@ profile 1 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 23
profile 1 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 28
profile 1 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 30
profile 1 <dbg> ble_central: discover_func: [SUBSCRIBED]
profile 1 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 32
profile 1 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 34
profile 1 <dbg> ble_central: discover_func: [CONSUMER SUBSCRIBED]
profile 1 <dbg> ble_central: notify_func: payload
profile 1 00 00 04 00 00 00 00 00 |........
profile 1 <dbg> ble_central: notify_func: payload
profile 1 00 00 00 00 00 00 00 00 |........
profile 1 <dbg> ble_central: notify_func: payload
profile 1 00 00 00 00 00 00 00 00 |........

View File

@@ -13,6 +13,9 @@
<dbg> ble_central: discover_func: [ATTRIBUTE] handle 28
<dbg> ble_central: discover_func: [ATTRIBUTE] handle 30
<dbg> ble_central: discover_func: [SUBSCRIBED]
<dbg> ble_central: discover_func: [ATTRIBUTE] handle 32
<dbg> ble_central: discover_func: [ATTRIBUTE] handle 34
<dbg> ble_central: discover_func: [CONSUMER SUBSCRIBED]
<dbg> ble_central: notify_func: payload
00 00 04 00 00 00 00 00 |........
<dbg> ble_central: notify_func: payload
@@ -21,5 +24,3 @@
00 00 05 00 00 00 00 00 |........
<dbg> ble_central: notify_func: payload
00 00 00 00 00 00 00 00 |........
<dbg> ble_central: notify_func: payload
00 00 00 00 00 00 00 00 |........

View File

@@ -16,6 +16,9 @@ profile 0 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 23
profile 0 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 28
profile 0 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 30
profile 0 <dbg> ble_central: discover_func: [SUBSCRIBED]
profile 0 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 32
profile 0 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 34
profile 0 <dbg> ble_central: discover_func: [CONSUMER SUBSCRIBED]
profile 0 <dbg> ble_central: notify_func: payload
profile 0 00 00 04 00 00 00 00 00 |........
profile 0 <dbg> ble_central: notify_func: payload
@@ -32,9 +35,10 @@ profile 1 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 23
profile 1 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 28
profile 1 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 30
profile 1 <dbg> ble_central: discover_func: [SUBSCRIBED]
profile 1 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 32
profile 1 <dbg> ble_central: discover_func: [ATTRIBUTE] handle 34
profile 1 <dbg> ble_central: discover_func: [CONSUMER SUBSCRIBED]
profile 1 <dbg> ble_central: notify_func: payload
profile 1 00 00 05 00 00 00 00 00 |........
profile 1 <dbg> ble_central: notify_func: payload
profile 1 00 00 00 00 00 00 00 00 |........
profile 1 <dbg> ble_central: notify_func: payload
profile 1 00 00 00 00 00 00 00 00 |........

View File

@@ -22,6 +22,9 @@
<dbg> ble_central: discover_func: [ATTRIBUTE] handle 28
<dbg> ble_central: discover_func: [ATTRIBUTE] handle 30
<dbg> ble_central: discover_func: [SUBSCRIBED]
<dbg> ble_central: discover_func: [ATTRIBUTE] handle 32
<dbg> ble_central: discover_func: [ATTRIBUTE] handle 34
<dbg> ble_central: discover_func: [CONSUMER SUBSCRIBED]
<dbg> ble_central: notify_func: payload
00 00 04 00 00 00 00 00 |........
<dbg> ble_central: notify_func: payload
@@ -30,5 +33,3 @@
00 00 05 00 00 00 00 00 |........
<dbg> ble_central: notify_func: payload
00 00 00 00 00 00 00 00 |........
<dbg> ble_central: notify_func: payload
00 00 00 00 00 00 00 00 |........

View File

@@ -21,6 +21,9 @@
<dbg> ble_central: discover_func: [ATTRIBUTE] handle 28
<dbg> ble_central: discover_func: [ATTRIBUTE] handle 30
<dbg> ble_central: discover_func: [SUBSCRIBED]
<dbg> ble_central: discover_func: [ATTRIBUTE] handle 32
<dbg> ble_central: discover_func: [ATTRIBUTE] handle 34
<dbg> ble_central: discover_func: [CONSUMER SUBSCRIBED]
<dbg> ble_central: notify_func: payload
00 00 04 00 00 00 00 00 |........
<dbg> ble_central: notify_func: payload
@@ -29,5 +32,3 @@
00 00 05 00 00 00 00 00 |........
<dbg> ble_central: notify_func: payload
00 00 00 00 00 00 00 00 |........
<dbg> ble_central: notify_func: payload
00 00 00 00 00 00 00 00 |........