diff --git a/samples/sysbuild/hello_world/pytest/test_both_uart.py b/samples/sysbuild/hello_world/pytest/test_both_uart.py index ad920034d31..c81542ecd4f 100644 --- a/samples/sysbuild/hello_world/pytest/test_both_uart.py +++ b/samples/sysbuild/hello_world/pytest/test_both_uart.py @@ -3,6 +3,7 @@ # # SPDX-License-Identifier: Apache-2.0 # +import pytest from twister_harness import DeviceAdapter timeout = 5 @@ -16,4 +17,7 @@ def test_uart_in_app(dut: DeviceAdapter): def test_uart_in_second_core(dut: DeviceAdapter): """Verify logs from uart in second core""" + if len(dut.connections) < 2: + pytest.skip("Only one UART connection configured for this device") + dut.readlines_until(connection_index=1, regex=regex, print_output=True, timeout=timeout)