tests: drivers: can: move CAN utilities tests to correct location
Move the CAN utilities tests to the tests/drivers/can/ directory. The tests/subsys/canbus directory is for tests related to code located in subsys/canbus. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
df59335541
commit
967978a432
5 changed files with 9 additions and 17 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||||
project(can_frame)
|
project(can_utilities)
|
||||||
|
|
||||||
FILE(GLOB app_sources src/*.c)
|
FILE(GLOB app_sources src/*.c)
|
||||||
target_sources(app PRIVATE ${app_sources})
|
target_sources(app PRIVATE ${app_sources})
|
|
@ -1,21 +1,15 @@
|
||||||
/* main.c - Application main entry point */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2019 Intel Corporation
|
* Copyright (c) 2019 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <logging/log.h>
|
|
||||||
LOG_MODULE_REGISTER(can_test, LOG_LEVEL_ERR);
|
|
||||||
|
|
||||||
#include <zephyr/types.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <drivers/can.h>
|
#include <drivers/can.h>
|
||||||
|
#include <logging/log.h>
|
||||||
#include <ztest.h>
|
#include <ztest.h>
|
||||||
|
|
||||||
|
LOG_MODULE_REGISTER(can_utilities, LOG_LEVEL_ERR);
|
||||||
|
|
||||||
static void test_can_frame_to_zcan_frame(void)
|
static void test_can_frame_to_zcan_frame(void)
|
||||||
{
|
{
|
||||||
struct can_frame frame = { 0 };
|
struct can_frame frame = { 0 };
|
||||||
|
@ -137,11 +131,11 @@ static void test_zcan_filter_to_can_filter(void)
|
||||||
|
|
||||||
void test_main(void)
|
void test_main(void)
|
||||||
{
|
{
|
||||||
ztest_test_suite(test_can_frame,
|
ztest_test_suite(can_utilities_tests,
|
||||||
ztest_unit_test(test_can_frame_to_zcan_frame),
|
ztest_unit_test(test_can_frame_to_zcan_frame),
|
||||||
ztest_unit_test(test_zcan_frame_to_can_frame),
|
ztest_unit_test(test_zcan_frame_to_can_frame),
|
||||||
ztest_unit_test(test_can_filter_to_zcan_filter),
|
ztest_unit_test(test_can_filter_to_zcan_filter),
|
||||||
ztest_unit_test(test_zcan_filter_to_can_filter));
|
ztest_unit_test(test_zcan_filter_to_can_filter));
|
||||||
|
|
||||||
ztest_run_test_suite(test_can_frame);
|
ztest_run_test_suite(can_utilities_tests);
|
||||||
}
|
}
|
3
tests/drivers/can/utilities/testcase.yaml
Normal file
3
tests/drivers/can/utilities/testcase.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
tests:
|
||||||
|
drivers.can.utilities:
|
||||||
|
tags: drivers can
|
|
@ -1,5 +0,0 @@
|
||||||
common:
|
|
||||||
platform_allow: native_posix native_posix_64 qemu_x86 qemu_cortex_m3 qemu_leon3 qemu_riscv32 qemu_riscv64
|
|
||||||
tests:
|
|
||||||
can.frame:
|
|
||||||
tags: net
|
|
Loading…
Add table
Add a link
Reference in a new issue