Skip to content

Commit 806111a

Browse files
nordic-bamirlubos
authored andcommitted
tests: samples: automate testing with PPK for peripheral_power_profiling
Add two test cases that will be used in the automatic power tests Signed-off-by: Bartosz Miller <[email protected]>
1 parent 333818a commit 806111a

File tree

3 files changed

+164
-0
lines changed

3 files changed

+164
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/ {
8+
aliases {
9+
/delete-property/ sw2;
10+
/delete-property/ sw3;
11+
};
12+
/*
13+
* Redefine button0 to use RXD0 - P0.01
14+
* Thus, when sending character from host, there will be gpio interrupt,
15+
* the same as originally triggered by sw0 button.
16+
*/
17+
buttons {
18+
compatible = "gpio-keys";
19+
button0: button_0 {
20+
gpios = <&gpio0 1 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
21+
label = "Input 0";
22+
zephyr,code = <INPUT_KEY_0>;
23+
};
24+
};
25+
};
26+
27+
/delete-node/ &button2;
28+
/delete-node/ &button3;
29+
30+
&uart20 {
31+
zephyr,pm-device-runtime-auto;
32+
};
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/ {
8+
aliases {
9+
/delete-property/ sw2;
10+
/delete-property/ sw3;
11+
};
12+
/*
13+
* Redefine button1 to use RXD0 - P0.01
14+
* Thus, when sending character from host, there will be gpio interrupt,
15+
* the same as originally triggered by sw0 button.
16+
*/
17+
buttons {
18+
compatible = "gpio-keys";
19+
button1: button_1 {
20+
gpios = <&gpio0 1 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
21+
label = "Input 0";
22+
zephyr,code = <INPUT_KEY_0>;
23+
};
24+
};
25+
};
26+
27+
/delete-node/ &button2;
28+
/delete-node/ &button3;
29+
30+
&uart20 {
31+
zephyr,pm-device-runtime-auto;
32+
};

samples/bluetooth/peripheral_power_profiling/sample.yaml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,103 @@ tests:
1515
platform_allow: nrf52dk/nrf52832 nrf52833dk/nrf52833 nrf52840dk/nrf52840
1616
nrf5340dk/nrf5340/cpuapp nrf5340dk/nrf5340/cpuapp/ns nrf54l15dk/nrf54l15/cpuapp
1717
tags: bluetooth ci_build sysbuild
18+
19+
sample.bluetooth.peripheral_power_profiling.auto_conn_advert_lfrc_0dBm_100ms:
20+
sysbuild: true
21+
harness: pytest
22+
integration_platforms:
23+
- nrf54l15dk/nrf54l15/cpuapp
24+
platform_allow:
25+
- nrf54l15dk/nrf54l15/cpuapp
26+
extra_args:
27+
- DTC_OVERLAY_FILE='boards/nrf54l15dk_nrf54l15_cpuapp_auto_conn_advert.overlay'
28+
- CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
29+
- CONFIG_BT_CTLR_TX_PWR_0=y
30+
- CONFIG_BT_POWER_PROFILING_DATA_LENGTH=31
31+
- CONFIG_BT_POWER_PROFILING_NOTIFICATION_INTERVAL=100
32+
tags: bluetooth ci_build sysbuild ppk_power_measure
33+
harness_config:
34+
fixture: ppk_power_measure
35+
pytest_root:
36+
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_54L_ble_power_profiling"
37+
timeout: 90
38+
39+
sample.bluetooth.peripheral_power_profiling.auto_conn_advert_lfrc_8dBm_100ms:
40+
sysbuild: true
41+
harness: pytest
42+
integration_platforms:
43+
- nrf54l15dk/nrf54l15/cpuapp
44+
platform_allow:
45+
- nrf54l15dk/nrf54l15/cpuapp
46+
extra_args:
47+
- DTC_OVERLAY_FILE='boards/nrf54l15dk_nrf54l15_cpuapp_auto_conn_advert.overlay'
48+
- CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
49+
- CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
50+
- CONFIG_BT_POWER_PROFILING_DATA_LENGTH=31
51+
- CONFIG_BT_POWER_PROFILING_NOTIFICATION_INTERVAL=100
52+
tags: bluetooth ci_build sysbuild ppk_power_measure
53+
harness_config:
54+
fixture: ppk_power_measure
55+
pytest_root:
56+
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_54L_ble_power_profiling"
57+
timeout: 90
58+
59+
sample.bluetooth.peripheral_power_profiling.auto_conn_advert_lfxo_0dBm_100ms:
60+
sysbuild: true
61+
harness: pytest
62+
integration_platforms:
63+
- nrf54l15dk/nrf54l15/cpuapp
64+
platform_allow:
65+
- nrf54l15dk/nrf54l15/cpuapp
66+
extra_args:
67+
- DTC_OVERLAY_FILE='boards/nrf54l15dk_nrf54l15_cpuapp_auto_conn_advert.overlay'
68+
- CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
69+
- CONFIG_BT_CTLR_TX_PWR_0=y
70+
- CONFIG_BT_POWER_PROFILING_DATA_LENGTH=31
71+
- CONFIG_BT_POWER_PROFILING_NOTIFICATION_INTERVAL=100
72+
tags: bluetooth ci_build sysbuild ppk_power_measure
73+
harness_config:
74+
fixture: ppk_power_measure
75+
pytest_root:
76+
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_54L_ble_power_profiling"
77+
timeout: 90
78+
79+
sample.bluetooth.peripheral_power_profiling.auto_conn_advert_lfxo_8dBm_100ms:
80+
sysbuild: true
81+
harness: pytest
82+
integration_platforms:
83+
- nrf54l15dk/nrf54l15/cpuapp
84+
platform_allow:
85+
- nrf54l15dk/nrf54l15/cpuapp
86+
extra_args:
87+
- DTC_OVERLAY_FILE='boards/nrf54l15dk_nrf54l15_cpuapp_auto_conn_advert.overlay'
88+
- CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
89+
- CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
90+
- CONFIG_BT_POWER_PROFILING_DATA_LENGTH=31
91+
- CONFIG_BT_POWER_PROFILING_NOTIFICATION_INTERVAL=100
92+
tags: bluetooth ci_build sysbuild ppk_power_measure
93+
harness_config:
94+
fixture: ppk_power_measure
95+
pytest_root:
96+
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_54L_ble_power_profiling"
97+
timeout: 90
98+
99+
sample.bluetooth.peripheral_power_profiling.auto_non_conn_advert_lfxo_0dbm_100ms:
100+
sysbuild: true
101+
harness: pytest
102+
integration_platforms:
103+
- nrf54l15dk/nrf54l15/cpuapp
104+
platform_allow:
105+
- nrf54l15dk/nrf54l15/cpuapp
106+
extra_args:
107+
- DTC_OVERLAY_FILE='boards/nrf54l15dk_nrf54l15_cpuapp_auto_non_conn_advert.overlay'
108+
- CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
109+
- CONFIG_BT_CTLR_TX_PWR_0=y
110+
- CONFIG_BT_POWER_PROFILING_DATA_LENGTH=31
111+
- CONFIG_BT_POWER_PROFILING_NOTIFICATION_INTERVAL=100
112+
tags: bluetooth ci_build sysbuild ppk_power_measure
113+
harness_config:
114+
fixture: ppk_power_measure
115+
pytest_root:
116+
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_54L_ble_power_profiling"
117+
timeout: 120

0 commit comments

Comments
 (0)