samples: can: filter out tests if zephyr,canbus not enabled

- Filter out the remaining CAN tests if no zephyr,canbus chosen node is
  enabled in the devicetree.
- Rename the tests to shorten the name a bit.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2022-02-23 16:31:28 +01:00 committed by Maureen Helm
parent 878ea22eac
commit cc394e073d
3 changed files with 10 additions and 8 deletions

View file

@ -2,8 +2,9 @@ sample:
name: CAN driver sample
tests:
sample.drivers.can:
tags: CAN
tags: can
depends_on: can
filter: dt_chosen_enabled("zephyr,canbus")
harness: console
harness_config:
type: one_line

View file

@ -1,14 +1,14 @@
sample:
name: SocketCAN sample
common:
tags: net socket can CAN
tags: net socket can
filter: dt_chosen_enabled("zephyr,canbus")
depends_on: can
harness: can
sample:
description: Test BSD sockets CAN support
name: Socket CAN example
tests:
sample.net.sockets.can.test_with_one_socket:
sample.net.sockets.can.one_socket:
extra_configs:
- CONFIG_NET_SOCKETS_CAN_RECEIVERS=1
sample.net.sockets.can.test_with_two_sockets:
sample.net.sockets.can.two_sockets:
extra_configs:
- CONFIG_NET_SOCKETS_CAN_RECEIVERS=2

View file

@ -2,8 +2,9 @@ sample:
name: ISO-TP lib sample
tests:
sample.subsys.canbus.isotp:
tags: CAN
tags: can
depends_on: can
filter: dt_chosen_enabled("zephyr,canbus")
harness: console
harness_config:
type: one_line