tests: drivers: build_all: Add a build_all test for bbram
The test targets the following devices at this time. - microchip,mcp7940n Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
This commit is contained in:
parent
23496f5208
commit
60dc055f9e
6 changed files with 72 additions and 0 deletions
8
tests/drivers/build_all/bbram/CMakeLists.txt
Normal file
8
tests/drivers/build_all/bbram/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Copyright (c) 2024 TOKITA Hiroshi
|
||||
# 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)
|
24
tests/drivers/build_all/bbram/app.overlay
Normal file
24
tests/drivers/build_all/bbram/app.overlay
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Copyright (c) 2024 TOKITA Hiroshi
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/i2c/i2c.h>
|
||||
|
||||
/ {
|
||||
test {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
test_i2c: i2c@11112222 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "vnd,i2c";
|
||||
reg = <0x11112222 0x1000>;
|
||||
status = "okay";
|
||||
clock-frequency = <I2C_BITRATE_STANDARD>;
|
||||
|
||||
#include "i2c.dtsi"
|
||||
};
|
||||
};
|
||||
};
|
14
tests/drivers/build_all/bbram/i2c.dtsi
Normal file
14
tests/drivers/build_all/bbram/i2c.dtsi
Normal file
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* Copyright (c) 2024 TOKITA Hiroshi
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/****************************************
|
||||
* PLEASE KEEP REG ADDRESSES SEQUENTIAL *
|
||||
***************************************/
|
||||
|
||||
mcp7940n@0 {
|
||||
compatible = "microchip,mcp7940n";
|
||||
reg = <0x0>;
|
||||
status = "okay";
|
||||
};
|
1
tests/drivers/build_all/bbram/prj.conf
Normal file
1
tests/drivers/build_all/bbram/prj.conf
Normal file
|
@ -0,0 +1 @@
|
|||
CONFIG_BBRAM=y
|
6
tests/drivers/build_all/bbram/src/main.c
Normal file
6
tests/drivers/build_all/bbram/src/main.c
Normal file
|
@ -0,0 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2024 TOKITA Hiroshi
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/* It is okay if main() is not included since just checking the build. */
|
19
tests/drivers/build_all/bbram/testcase.yaml
Normal file
19
tests/drivers/build_all/bbram/testcase.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Copyright (c) 2024 TOKITA hiroshi
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
common:
|
||||
build_only: true
|
||||
tags:
|
||||
- drivers
|
||||
- bbram
|
||||
|
||||
tests:
|
||||
drivers.bbram.build:
|
||||
platform_allow:
|
||||
- native_sim
|
||||
|
||||
drivers.bbram.emul.build:
|
||||
platform_allow:
|
||||
- native_sim
|
||||
extra_configs:
|
||||
- CONFIG_EMUL=y
|
Loading…
Add table
Add a link
Reference in a new issue