test: drivers: can: move build-only tests to proper location

Move the build-only test for the MCP2515 CAN controller driver to the
tests/drivers/build_all/can/ folder.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2023-04-30 14:21:46 +02:00 committed by Maureen Helm
parent f3ee73a1b9
commit ef3d01d16f
6 changed files with 33 additions and 5 deletions

View file

@ -675,6 +675,7 @@ Release Notes:
- samples/subsys/canbus/
- subsys/canbus/
- subsys/net/l2/canbus/
- tests/drivers/build_all/can/
- tests/drivers/can/
- tests/net/socket/can/
- tests/subsys/canbus/

View file

@ -0,0 +1,8 @@
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(build_all_can)
FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})

View file

@ -0,0 +1,6 @@
CONFIG_TEST=y
CONFIG_TEST_USERSPACE=y
CONFIG_GPIO=y
CONFIG_CAN=y
CONFIG_CAN_FD_MODE=y
CONFIG_CAN_AUTO_BUS_OFF_RECOVERY=n

View file

@ -0,0 +1,10 @@
/*
* Copyright (c) 2023 Vestas Wind Systems A/S
*
* SPDX-License-Identifier: Apache-2.0
*/
int main(void)
{
return 0;
}

View file

@ -0,0 +1,8 @@
common:
build_only: true
tags: drivers can
tests:
drivers.build_all.can.mcp2515:
depends_on: arduino_spi arduino_gpio
extra_args: SHIELD=dfrobot_can_bus_v2_0
platform_allow: frdm_k64f

View file

@ -3,11 +3,6 @@ tests:
tags: drivers can
depends_on: can
filter: dt_chosen_enabled("zephyr,canbus") and not dt_compat_enabled("kvaser,pcican")
drivers.can.api.mcp2515:
tags: drivers can
depends_on: arduino_spi arduino_gpio
extra_args: SHIELD=dfrobot_can_bus_v2_0
build_only: true
drivers.can.api.twai:
tags: drivers can
extra_args: DTC_OVERLAY_FILE="twai-enable.overlay"