samples: sysbuild: hello_world: Skip test if no second UART

If a second UART was not configured in the hardware map, then skip
the testcase instead of failing.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
This commit is contained in:
Grzegorz Chwierut
2026-01-08 14:33:02 +01:00
committed by Maureen Helm
parent e0da5fa899
commit ca26f143f0

View File

@@ -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)