From 0d7ffb52b26b0b2cb4572ff7dc202593dc2388e8 Mon Sep 17 00:00:00 2001 From: TOKITA Hiroshi Date: Wed, 18 Sep 2024 06:30:39 +0900 Subject: [PATCH] tests: drivers: build_all: Add power_domain drivers test Add build_all test for power_domain drivers. Signed-off-by: TOKITA Hiroshi --- .../build_all/power_domain/CMakeLists.txt | 8 ++++++ .../build_all/power_domain/app.overlay | 25 +++++++++++++++++++ tests/drivers/build_all/power_domain/prj.conf | 6 +++++ .../drivers/build_all/power_domain/src/main.c | 10 ++++++++ .../build_all/power_domain/testcase.yaml | 10 ++++++++ 5 files changed, 59 insertions(+) create mode 100644 tests/drivers/build_all/power_domain/CMakeLists.txt create mode 100644 tests/drivers/build_all/power_domain/app.overlay create mode 100644 tests/drivers/build_all/power_domain/prj.conf create mode 100644 tests/drivers/build_all/power_domain/src/main.c create mode 100644 tests/drivers/build_all/power_domain/testcase.yaml diff --git a/tests/drivers/build_all/power_domain/CMakeLists.txt b/tests/drivers/build_all/power_domain/CMakeLists.txt new file mode 100644 index 000000000000000..0ee1f839afd9a49 --- /dev/null +++ b/tests/drivers/build_all/power_domain/CMakeLists.txt @@ -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_power_domain) + +FILE(GLOB app_sources src/*.c) +target_sources(app PRIVATE ${app_sources}) diff --git a/tests/drivers/build_all/power_domain/app.overlay b/tests/drivers/build_all/power_domain/app.overlay new file mode 100644 index 000000000000000..8c4515ecd773dee --- /dev/null +++ b/tests/drivers/build_all/power_domain/app.overlay @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2024 TOKITA Hiroshi + * 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"; + }; + + power_domain_gpio_monitor { + compatible = "power-domain-gpio-monitor"; + status = "okay"; + gpios = <&test_gpio 0 0>; + }; + }; +}; diff --git a/tests/drivers/build_all/power_domain/prj.conf b/tests/drivers/build_all/power_domain/prj.conf new file mode 100644 index 000000000000000..50fa14ed37f6176 --- /dev/null +++ b/tests/drivers/build_all/power_domain/prj.conf @@ -0,0 +1,6 @@ +CONFIG_TEST=y +CONFIG_TEST_USERSPACE=y +CONFIG_GPIO=y +CONFIG_POWER_DOMAIN=y +CONFIG_PM_DEVICE=y +CONFIG_PM_DEVICE_RUNTIME=y diff --git a/tests/drivers/build_all/power_domain/src/main.c b/tests/drivers/build_all/power_domain/src/main.c new file mode 100644 index 000000000000000..19f5ee731afd714 --- /dev/null +++ b/tests/drivers/build_all/power_domain/src/main.c @@ -0,0 +1,10 @@ +/* + * Copyright (c) 2024 TOKITA Hiroshi + * + * SPDX-License-Identifier: Apache-2.0 + */ + +int main(void) +{ + return 0; +} diff --git a/tests/drivers/build_all/power_domain/testcase.yaml b/tests/drivers/build_all/power_domain/testcase.yaml new file mode 100644 index 000000000000000..2c56b113c04889a --- /dev/null +++ b/tests/drivers/build_all/power_domain/testcase.yaml @@ -0,0 +1,10 @@ +common: + build_only: true + tags: + - drivers + - power_domain +tests: + drivers.power_domain.build: + platform_allow: + - native_sim + - native_sim/native/64