Skip to content

Commit 0ea5ef8

Browse files
soburihenrikbrixandersen
authored andcommitted
tests: build_all: gpio: Excluding app.overlay from ads1145s0x tests
- Exclude `app.overlay` from DTC_OVERLAY_FILES in `drivers.gpio.build.adc_ads1145s0x_gpio` tests to avoid duplicate builds. - Modified so that adc_ads1145s0x_gpio.overlay can be tested alone. - Delete the conffile and move its contents to extra_configs. Signed-off-by: TOKITA Hiroshi <[email protected]>
1 parent 8d68f6a commit 0ea5ef8

File tree

3 files changed

+55
-25
lines changed

3 files changed

+55
-25
lines changed

tests/drivers/build_all/gpio/adc_ads1145s0x_gpio.conf

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,51 @@
1-
&test_spi {
2-
test_spi_ads114s08: ads114s08@0 {
3-
compatible = "ti,ads114s08";
4-
status = "okay";
5-
spi-max-frequency = <10000000>;
6-
reg = <0x00>;
1+
/*
2+
* Copyright (c) 2024 TOKITA Hiroshi
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
test {
79
#address-cells = <1>;
8-
#size-cells = <0>;
9-
#io-channel-cells = <1>;
10-
reset-gpios = <&test_gpio 0 0>;
11-
drdy-gpios = <&test_gpio 0 0>;
12-
start-sync-gpios = <&test_gpio 0 0>;
10+
#size-cells = <1>;
1311

14-
test_spi_ads114s08_gpio: ads114s0x_gpio {
15-
compatible = "ti,ads114s0x-gpio";
12+
test_gpio: gpio@deadbeef {
13+
compatible = "vnd,gpio";
1614
gpio-controller;
17-
ngpios = <4>;
18-
#gpio-cells = <2>;
15+
reg = <0xdeadbeef 0x1000>;
16+
#gpio-cells = <0x2>;
17+
status = "okay";
18+
};
19+
20+
test_spi: spi@33334444 {
21+
#address-cells = <1>;
22+
#size-cells = <0>;
23+
compatible = "vnd,spi";
24+
reg = <0x33334444 0x1000>;
25+
status = "okay";
26+
clock-frequency = <2000000>;
27+
28+
cs-gpios = <&test_gpio 0 0>;
29+
30+
test_spi_ads114s08: ads114s08@0 {
31+
compatible = "ti,ads114s08";
32+
status = "okay";
33+
spi-max-frequency = <10000000>;
34+
reg = <0x00>;
35+
#address-cells = <1>;
36+
#size-cells = <0>;
37+
#io-channel-cells = <1>;
38+
reset-gpios = <&test_gpio 0 0>;
39+
drdy-gpios = <&test_gpio 0 0>;
40+
start-sync-gpios = <&test_gpio 0 0>;
41+
42+
test_spi_ads114s08_gpio: ads114s0x_gpio {
43+
compatible = "ti,ads114s0x-gpio";
44+
gpio-controller;
45+
ngpios = <4>;
46+
#gpio-cells = <2>;
47+
};
48+
};
1949
};
2050
};
2151
};

tests/drivers/build_all/gpio/testcase.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,21 @@ tests:
2626

2727
drivers.gpio.build.adc_ads1145s0x_gpio:
2828
min_ram: 32
29-
platform_allow: m5stack_core2/esp32/procpu nrf52840dk/nrf52840
29+
platform_allow:
30+
- m5stack_core2/esp32/procpu
31+
- nrf52840dk/nrf52840
32+
- native_sim
33+
- native_sim/native/64
3034
depends_on:
3135
- gpio
3236
- adc
3337
- spi
3438
extra_args:
35-
- DTC_OVERLAY_FILE="app.overlay;adc_ads1145s0x_gpio.overlay"
36-
- CONF_FILE="adc_ads1145s0x_gpio.conf"
39+
- DTC_OVERLAY_FILE="adc_ads1145s0x_gpio.overlay"
40+
extra_configs:
41+
- CONFIG_ADC=y
42+
- CONFIG_ADC_INIT_PRIORITY=80
43+
- CONFIG_ADC_ADS114S0X_GPIO=y
3744

3845
drivers.gpio.build.iproc:
3946
platform_allow: qemu_cortex_m3

0 commit comments

Comments
 (0)