zephyr/samples/net/sockets/can/sample.yaml
Henrik Brix Andersen 7da63e1551 samples: net: sockets: can: add console harness configuration
Add a console harness for validating the output from the SocketCAN sample.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-19 10:31:10 +02:00

29 lines
822 B
YAML

sample:
name: SocketCAN sample
common:
tags: net socket can
filter: dt_chosen_enabled("zephyr,canbus")
depends_on: can
harness: console
tests:
sample.net.sockets.can.one_socket:
extra_configs:
- CONFIG_NET_SOCKETS_CAN_RECEIVERS=1
harness_config:
type: multi_line
ordered: True
regex:
- "(.*)\\[0\\] CAN msg: type 0x0 RTR 0x0 EID 0x1 DLC 0x8"
- "(.*)f0 f1 f2 f3 f4 f5 f6 f7"
sample.net.sockets.can.two_sockets:
extra_configs:
- CONFIG_NET_SOCKETS_CAN_RECEIVERS=2
harness_config:
type: multi_line
ordered: True
regex:
- "(.*)\\[0\\] CAN msg: type 0x0 RTR 0x0 EID 0x1 DLC 0x8"
- "(.*)f0 f1 f2 f3 f4 f5 f6 f7"
- "(.*)\\[1\\] CAN msg: type 0x0 RTR 0x0 EID 0x1 DLC 0x8"
- "(.*)f0 f1 f2 f3 f4 f5 f6 f7"