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
11  # native_posix does not work with CONFIG_POSIX_API
12  platform_exclude:
13    - native_posix
14    - native_posix/native/64
15tests:
16  sample.net.sockets.can.one_socket:
17    extra_configs:
18      - CONFIG_NET_SOCKETS_CAN_RECEIVERS=1
19      - CONFIG_LOG_BACKEND_SHOW_COLOR=n
20    harness_config:
21      type: multi_line
22      ordered: true
23      regex:
24        - "(.*)\\[0|3\\] CAN frame: IDE 0x0 RTR 0x0 ID 0x1 DLC 0x8"
25        - "(.*)f0 f1 f2 f3 f4 f5 f6 f7"
26  sample.net.sockets.can.two_sockets:
27    extra_configs:
28      - CONFIG_NET_SOCKETS_CAN_RECEIVERS=2
29      - CONFIG_LOG_BACKEND_SHOW_COLOR=n
30    harness_config:
31      type: multi_line
32      ordered: true
33      regex:
34        - "(.*)\\[0|3\\] CAN frame: IDE 0x0 RTR 0x0 ID 0x1 DLC 0x8"
35        - "(.*)f0 f1 f2 f3 f4 f5 f6 f7"
36        - "(.*)\\[1|4\\] CAN frame: IDE 0x0 RTR 0x0 ID 0x1 DLC 0x8"
37        - "(.*)f0 f1 f2 f3 f4 f5 f6 f7"
38