tests: drivers: stepper: build all
This commit introduces preliminary build all test for stepper driver Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
This commit is contained in:
parent
32390d55ab
commit
179f990e46
6 changed files with 80 additions and 0 deletions
8
tests/drivers/build_all/stepper/CMakeLists.txt
Normal file
8
tests/drivers/build_all/stepper/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
# SPDX-FileCopyrightText: Copyright (c) 2023 Carl Zeiss Meditec AG
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.20.0)
|
||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||
project(build_all)
|
||||
|
||||
target_sources(app PRIVATE src/main.c)
|
21
tests/drivers/build_all/stepper/app.overlay
Normal file
21
tests/drivers/build_all/stepper/app.overlay
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Carl Zeiss Meditec AG
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/ {
|
||||
test {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
test_gpio: gpio@deadbeef {
|
||||
compatible = "vnd,gpio";
|
||||
gpio-controller;
|
||||
reg = <0xdeadbeef 0x1000>;
|
||||
#gpio-cells = <0x2>;
|
||||
status = "okay";
|
||||
|
||||
#include "gpio.dtsi"
|
||||
};
|
||||
};
|
||||
};
|
23
tests/drivers/build_all/stepper/gpio.dtsi
Normal file
23
tests/drivers/build_all/stepper/gpio.dtsi
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Carl Zeiss Meditec AG
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
test_uln2003_motor_cluster: uln2003_motor_cluster {
|
||||
compatible = "gpio-steppers";
|
||||
status = "okay";
|
||||
motor_1: motor_1 {
|
||||
micro-step-res = <1>;
|
||||
gpios = <&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>;
|
||||
};
|
||||
motor_2: motor_2 {
|
||||
micro-step-res = <2>;
|
||||
gpios = <&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>;
|
||||
};
|
||||
};
|
7
tests/drivers/build_all/stepper/prj.conf
Normal file
7
tests/drivers/build_all/stepper/prj.conf
Normal file
|
@ -0,0 +1,7 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_TEST_USERSPACE=y
|
||||
CONFIG_LOG=y
|
||||
CONFIG_STEPPER_LOG_LEVEL_DBG=y
|
||||
CONFIG_POLL=y
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_STEPPER=y
|
9
tests/drivers/build_all/stepper/src/main.c
Normal file
9
tests/drivers/build_all/stepper/src/main.c
Normal file
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Carl Zeiss Meditec AG
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
int main(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
12
tests/drivers/build_all/stepper/testcase.yaml
Normal file
12
tests/drivers/build_all/stepper/testcase.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
# SPDX-FileCopyrightText: Copyright (c) 2023 Carl Zeiss Meditec AG
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
tests:
|
||||
drivers.stepper.build:
|
||||
tags:
|
||||
- drivers
|
||||
- stepper
|
||||
build_only: true
|
||||
platform_allow:
|
||||
- native_posix
|
||||
- native_sim
|
Loading…
Add table
Add a link
Reference in a new issue