tests: drivers: build_all: mdio: add bit bang testsuite
- Add mdio to a build_all testsuite - Add mdio bit bang to a build_all testsuite Signed-off-by: Aleksandr Senin <al@meshium.net>
This commit is contained in:
parent
a1e2fdcc4d
commit
cec9bc29ba
8
tests/drivers/build_all/mdio/CMakeLists.txt
Normal file
8
tests/drivers/build_all/mdio/CMakeLists.txt
Normal 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)
|
||||
|
||||
FILE(GLOB app_sources src/*.c)
|
||||
target_sources(app PRIVATE ${app_sources})
|
42
tests/drivers/build_all/mdio/app.overlay
Normal file
42
tests/drivers/build_all/mdio/app.overlay
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Aleksandr Senin
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Application overlay for testing driver builds
|
||||
*
|
||||
* Names in this file should be chosen in a way that won't conflict
|
||||
* with real-world devicetree nodes, to allow these tests to run on
|
||||
* (and be extended to test) real hardware.
|
||||
*/
|
||||
|
||||
/ {
|
||||
test {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
test_gpio: gpio@deadbeef {
|
||||
compatible = "vnd,gpio";
|
||||
gpio-controller;
|
||||
reg = <0xdeadbeef 0x1000>;
|
||||
#gpio-cells = <0x2>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
test_mdio0: mdio@11112222 {
|
||||
compatible = "zephyr,mdio-gpio";
|
||||
reg = <0x11112222 1>;
|
||||
mdc-gpios = <&test_gpio 0 0>;
|
||||
mdio-gpios = <&test_gpio 0 0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
test_mdio1: mdio@33334444 {
|
||||
compatible = "zephyr,mdio-gpio";
|
||||
reg = <0x33334444 1>;
|
||||
mdc-gpios = <&test_gpio 0 0>;
|
||||
mdio-gpios = <&test_gpio 0 0>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
5
tests/drivers/build_all/mdio/prj.conf
Normal file
5
tests/drivers/build_all/mdio/prj.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_TEST_USERSPACE=y
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_MDIO=y
|
||||
CONFIG_MDIO_GPIO=y
|
10
tests/drivers/build_all/mdio/src/main.c
Normal file
10
tests/drivers/build_all/mdio/src/main.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Aleksandr Senin
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
int main(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
8
tests/drivers/build_all/mdio/testcase.yaml
Normal file
8
tests/drivers/build_all/mdio/testcase.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
common:
|
||||
build_only: true
|
||||
tags:
|
||||
- drivers
|
||||
- mdio
|
||||
tests:
|
||||
drivers.mdio.build:
|
||||
platform_allow: qemu_cortex_m0
|
Loading…
Reference in a new issue