Skip to content

Commit

Permalink
tests: drivers: build_all: watchdog: Add i2c-devices build test
Browse files Browse the repository at this point in the history
Add build test for following device.

- nordic,npm6001-wdt

Signed-off-by: TOKITA Hiroshi <[email protected]>
  • Loading branch information
soburi committed Sep 17, 2024
1 parent 0bca195 commit 44529ae
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
37 changes: 37 additions & 0 deletions tests/drivers/build_all/watchdog/i2c_devices.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* 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";
};

test_i2c: i2c@11112222 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "vnd,i2c";
reg = <0x11112222 0x1000>;
status = "okay";
clock-frequency = <100000>;

npm6001_ek_pmic: pmic@0 {
compatible = "nordic,npm6001";
reg = <0x0>;

npm6001_ek_wdt: watchdog {
compatible = "nordic,npm6001-wdt";
};
};
};
};
};
7 changes: 7 additions & 0 deletions tests/drivers/build_all/watchdog/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ tests:
# will cover drivers without in-tree boards
platform_allow: qemu_cortex_m3
extra_args: "CONFIG_WATCHDOG=y"
drivers.watchdog.build.i2c:
extra_args: DTC_OVERLAY_FILE="i2c_devices.overlay"
extra_configs:
- CONFIG_I2C=y
platform_allow:
- native_sim
- native_sim/native/64

0 comments on commit 44529ae

Please sign in to comment.