Skip to content

Commit

Permalink
tests: drivers: build_all: Add power_domain drivers test
Browse files Browse the repository at this point in the history
Add build_all test for power_domain drivers.

Signed-off-by: TOKITA Hiroshi <[email protected]>
  • Loading branch information
soburi committed Sep 17, 2024
1 parent 7430e96 commit 0d7ffb5
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/drivers/build_all/power_domain/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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})
25 changes: 25 additions & 0 deletions tests/drivers/build_all/power_domain/app.overlay
Original file line number Diff line number Diff line change
@@ -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>;
};
};
};
6 changes: 6 additions & 0 deletions tests/drivers/build_all/power_domain/prj.conf
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions tests/drivers/build_all/power_domain/src/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* Copyright (c) 2024 TOKITA Hiroshi
*
* SPDX-License-Identifier: Apache-2.0
*/

int main(void)
{
return 0;
}
10 changes: 10 additions & 0 deletions tests/drivers/build_all/power_domain/testcase.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0d7ffb5

Please sign in to comment.