1sample:
2  name: SocketCAN sample
3common:
4  tags:
5    - net
6    - socket
7    - can
8  filter: dt_chosen_enabled("zephyr,canbus") and not dt_compat_enabled("kvaser,pcican")
9  depends_on: can
10  harness: console
11tests:
12  sample.net.sockets.can.one_socket:
13    extra_configs:
14      - CONFIG_NET_SOCKETS_CAN_RECEIVERS=1
15      - CONFIG_LOG_BACKEND_SHOW_COLOR=n
16    harness_config:
17      type: multi_line
18      ordered: true
19      regex:
20        - "(.*)\\[0|3\\] CAN frame: IDE 0x0 RTR 0x0 ID 0x1 DLC 0x8"
21        - "(.*)f0 f1 f2 f3 f4 f5 f6 f7"
22  sample.net.sockets.can.two_sockets:
23    extra_configs:
24      - CONFIG_NET_SOCKETS_CAN_RECEIVERS=2
25      - CONFIG_LOG_BACKEND_SHOW_COLOR=n
26    harness_config:
27      type: multi_line
28      ordered: true
29      regex:
30        - "(.*)\\[0|3\\] CAN frame: IDE 0x0 RTR 0x0 ID 0x1 DLC 0x8"
31        - "(.*)f0 f1 f2 f3 f4 f5 f6 f7"
32        - "(.*)\\[1|4\\] CAN frame: IDE 0x0 RTR 0x0 ID 0x1 DLC 0x8"
33        - "(.*)f0 f1 f2 f3 f4 f5 f6 f7"
34