diff --git a/tests/drivers/build_all/bbram/CMakeLists.txt b/tests/drivers/build_all/bbram/CMakeLists.txt new file mode 100644 index 00000000000000..3742cd1ce05c63 --- /dev/null +++ b/tests/drivers/build_all/bbram/CMakeLists.txt @@ -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) diff --git a/tests/drivers/build_all/bbram/app.overlay b/tests/drivers/build_all/bbram/app.overlay new file mode 100644 index 00000000000000..9143fb1bdf6819 --- /dev/null +++ b/tests/drivers/build_all/bbram/app.overlay @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2024 TOKITA Hiroshi + * SPDX-License-Identifier: Apache-2.0 + */ + + #include + +/ { + 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 = ; + + #include "i2c.dtsi" + }; + }; +}; diff --git a/tests/drivers/build_all/bbram/i2c.dtsi b/tests/drivers/build_all/bbram/i2c.dtsi new file mode 100644 index 00000000000000..dbf06f7e39588c --- /dev/null +++ b/tests/drivers/build_all/bbram/i2c.dtsi @@ -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"; +}; diff --git a/tests/drivers/build_all/bbram/prj.conf b/tests/drivers/build_all/bbram/prj.conf new file mode 100644 index 00000000000000..b32bd7ecffa8af --- /dev/null +++ b/tests/drivers/build_all/bbram/prj.conf @@ -0,0 +1 @@ +CONFIG_BBRAM=y diff --git a/tests/drivers/build_all/bbram/src/main.c b/tests/drivers/build_all/bbram/src/main.c new file mode 100644 index 00000000000000..175b9065f67781 --- /dev/null +++ b/tests/drivers/build_all/bbram/src/main.c @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2024 TOKITA Hiroshi + * SPDX-License-Identifier: Apache-2.0 + */ + +int main(void) +{ + return 0; +} diff --git a/tests/drivers/build_all/bbram/testcase.yaml b/tests/drivers/build_all/bbram/testcase.yaml new file mode 100644 index 00000000000000..04e626a6ada26c --- /dev/null +++ b/tests/drivers/build_all/bbram/testcase.yaml @@ -0,0 +1,21 @@ +# Copyright (c) 2024 TOKITA hiroshi +# SPDX-License-Identifier: Apache-2.0 + +tests: + drivers.bbram.build: + tags: + - drivers + - bbram + build_only: true + platform_allow: + - native_sim + + drivers.bbram.emul.build: + tags: + - drivers + - bbram + build_only: true + platform_allow: + - native_sim + extra_configs: + - CONFIG_EMUL=y