zephyr/samples/net/sockets/can/sample.yaml
Jukka Rissanen 03c5c0f818 samples: net: Disable native_posix target in more samples
The native_posix compilations fail with various socket
errors like this:

samples/net/sockets/can/src/main.c:65:9: error: implicit \
     declaration of function ‘send’ [-Werror=implicit-function-declaration]
     65 |   ret = send(fd, &sframe, sizeof(sframe), 0);
        |         ^~~~

So disable the native_posix board from networking samples as
native_posix board is not compatible with CONFIG_POSIX_API

This is related to commit b8fc1c4c3e ("samples: net: Disable
native_posix target in samples") but disables more network samples
for native_posix board.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-17 14:28:08 +02:00

38 lines
1.1 KiB
YAML

sample:
name: SocketCAN sample
common:
tags:
- net
- socket
- can
filter: dt_chosen_enabled("zephyr,canbus") and not dt_compat_enabled("kvaser,pcican")
depends_on: can
harness: console
# native_posix does not work with CONFIG_POSIX_API
platform_exclude:
- native_posix
- native_posix/native/64
tests:
sample.net.sockets.can.one_socket:
extra_configs:
- CONFIG_NET_SOCKETS_CAN_RECEIVERS=1
- CONFIG_LOG_BACKEND_SHOW_COLOR=n
harness_config:
type: multi_line
ordered: true
regex:
- "(.*)\\[0|3\\] CAN frame: IDE 0x0 RTR 0x0 ID 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
- CONFIG_LOG_BACKEND_SHOW_COLOR=n
harness_config:
type: multi_line
ordered: true
regex:
- "(.*)\\[0|3\\] CAN frame: IDE 0x0 RTR 0x0 ID 0x1 DLC 0x8"
- "(.*)f0 f1 f2 f3 f4 f5 f6 f7"
- "(.*)\\[1|4\\] CAN frame: IDE 0x0 RTR 0x0 ID 0x1 DLC 0x8"
- "(.*)f0 f1 f2 f3 f4 f5 f6 f7"