Skip to content

Commit 2c1274f

Browse files
soburihenrikbrixandersen
authored andcommitted
tests: drivers: build_all: Add power_domain drivers test
Add build_all test for power_domain drivers. Signed-off-by: TOKITA Hiroshi <[email protected]>
1 parent 663c7bc commit 2c1274f

File tree

5 files changed

+67
-0
lines changed

5 files changed

+67
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
cmake_minimum_required(VERSION 3.20.0)
4+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
5+
project(build_all_power_domain)
6+
7+
FILE(GLOB app_sources src/*.c)
8+
target_sources(app PRIVATE ${app_sources})
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (c) 2024 TOKITA Hiroshi
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/ {
7+
test {
8+
#address-cells = <1>;
9+
#size-cells = <1>;
10+
11+
test_gpio: gpio@deadbeef {
12+
compatible = "vnd,gpio";
13+
gpio-controller;
14+
reg = <0xdeadbeef 0x1000>;
15+
#gpio-cells = <0x2>;
16+
status = "okay";
17+
};
18+
19+
power_domain_gpio {
20+
compatible = "power-domain-gpio";
21+
enable-gpios = <&test_gpio 0 0>;
22+
zephyr,pm-device-runtime-auto;
23+
};
24+
25+
power_domain_gpio_monitor {
26+
compatible = "power-domain-gpio-monitor";
27+
status = "okay";
28+
gpios = <&test_gpio 0 0>;
29+
};
30+
};
31+
};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
CONFIG_TEST=y
2+
CONFIG_TEST_USERSPACE=y
3+
CONFIG_GPIO=y
4+
CONFIG_POWER_DOMAIN=y
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* Copyright (c) 2024 TOKITA Hiroshi
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
int main(void)
8+
{
9+
return 0;
10+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
common:
2+
build_only: true
3+
tags:
4+
- drivers
5+
- power_domain
6+
platform_allow:
7+
- native_sim
8+
- native_sim/native/64
9+
tests:
10+
drivers.power_domain.build: {}
11+
drivers.power_domain.build.pm:
12+
extra_configs:
13+
- CONFIG_PM_DEVICE=y
14+
- CONFIG_PM_DEVICE_RUNTIME=y

0 commit comments

Comments
 (0)