Skip to content

Commit db1d0d7

Browse files
nordic-bamirlubos
authored andcommitted
tests: benchmarks: Correct UARTE test with automatic PM
This test was implemented incorrectly - fix it Signed-off-by: Bartosz Miller <[email protected]>
1 parent 1984144 commit db1d0d7

File tree

3 files changed

+5
-20
lines changed

3 files changed

+5
-20
lines changed

tests/benchmarks/multicore/idle_uarte/Kconfig

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/benchmarks/multicore/idle_uarte/src/main.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
*/
66

77
#include <zephyr/drivers/uart.h>
8+
#include <zephyr/pm/device.h>
89
#include <zephyr/pm/device_runtime.h>
910
#include <zephyr/kernel.h>
1011
#include <zephyr/logging/log.h>
11-
#include <zephyr/pm/device.h>
12-
#include <zephyr/pm/device_runtime.h>
1312

1413
/* Note: logging is normally disabled for this test
1514
* Enable only for debugging purposes
@@ -140,28 +139,16 @@ int main(void)
140139
pm_device_runtime_enable(console_dev);
141140
}
142141

143-
#if defined(CONFIG_TEST_AUTOMATIC_POWER_CONTROL)
144-
enable_uart_rx();
145-
#endif
146-
147142
while (1) {
148143
printk("Hello\n");
149-
150-
#if !defined(CONFIG_TEST_AUTOMATIC_POWER_CONTROL)
151144
enable_uart_rx();
152-
#endif
153-
154145
printk("UART test transmission\n");
155146
err = uart_tx(uart_dev, test_pattern, TEST_BUFFER_LEN, UART_ACTION_BASE_TIMEOUT_US);
156147
if (err != 0) {
157148
printk("Unexpected error when sending UART TX data: %d\n", err);
158149
return -1;
159150
}
160-
161-
#if !defined(CONFIG_TEST_AUTOMATIC_POWER_CONTROL)
162151
disable_uart_rx();
163-
#endif
164-
165152
printk("Good night\n");
166153
k_msleep(2000);
167154
}

tests/benchmarks/multicore/idle_uarte/testcase.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ tests:
4141
extra_args:
4242
- SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpurad.conf
4343
- DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_normal.overlay"
44-
- CONFIG_TEST_AUTOMATIC_POWER_CONTROL=y
44+
- CONFIG_PRINTK=y
45+
- CONFIG_LOG=y
46+
- CONFIG_CONSOLE=y
47+
- CONFIG_UART_CONSOLE=y
4548
harness_config:
4649
fixture: gpio_loopback
4750
pytest_root:

0 commit comments

Comments
 (0)