Skip to content

Commit

Permalink
tests: benchmarks: Correct UARTE test with automatic PM
Browse files Browse the repository at this point in the history
This test was implemented incorrectly - fix it

Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
  • Loading branch information
nordic-bami authored and rlubos committed Nov 8, 2024
1 parent 1984144 commit db1d0d7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
5 changes: 0 additions & 5 deletions tests/benchmarks/multicore/idle_uarte/Kconfig

This file was deleted.

15 changes: 1 addition & 14 deletions tests/benchmarks/multicore/idle_uarte/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
*/

#include <zephyr/drivers/uart.h>
#include <zephyr/pm/device.h>
#include <zephyr/pm/device_runtime.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/pm/device.h>
#include <zephyr/pm/device_runtime.h>

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

#if defined(CONFIG_TEST_AUTOMATIC_POWER_CONTROL)
enable_uart_rx();
#endif

while (1) {
printk("Hello\n");

#if !defined(CONFIG_TEST_AUTOMATIC_POWER_CONTROL)
enable_uart_rx();
#endif

printk("UART test transmission\n");
err = uart_tx(uart_dev, test_pattern, TEST_BUFFER_LEN, UART_ACTION_BASE_TIMEOUT_US);
if (err != 0) {
printk("Unexpected error when sending UART TX data: %d\n", err);
return -1;
}

#if !defined(CONFIG_TEST_AUTOMATIC_POWER_CONTROL)
disable_uart_rx();
#endif

printk("Good night\n");
k_msleep(2000);
}
Expand Down
5 changes: 4 additions & 1 deletion tests/benchmarks/multicore/idle_uarte/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ tests:
extra_args:
- SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpurad.conf
- DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_normal.overlay"
- CONFIG_TEST_AUTOMATIC_POWER_CONTROL=y
- CONFIG_PRINTK=y
- CONFIG_LOG=y
- CONFIG_CONSOLE=y
- CONFIG_UART_CONSOLE=y
harness_config:
fixture: gpio_loopback
pytest_root:
Expand Down

0 comments on commit db1d0d7

Please sign in to comment.