Skip to content

Commit 1c2bf6d

Browse files
tests: on_target: test_shell: improve boot pattern matching
Improve the pattern matching for the boot sequence to be more robust. Signed-off-by: Syver Haraldsen <syver.haraldsen@nordicsemi.no>
1 parent e5f6b14 commit 1c2bf6d

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

tests/on_target/tests/test_functional/test_shell.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ def test_shell(dut_cloud, hex_file):
2121
flash_device(os.path.abspath(hex_file))
2222
dut_cloud.uart.xfactoryreset()
2323

24-
patterns_boot = [
25-
"main: connected_sending_entry: connected_sending_entry",
26-
]
27-
patterns_boot_done = [
28-
"main: connected_waiting_entry: connected_waiting_entry",
29-
]
3024
patterns_button_press = [
3125
"main: connected_sampling_entry: connected_sampling_entry",
3226
]
@@ -44,8 +38,7 @@ def test_shell(dut_cloud, hex_file):
4438
dut_cloud.uart.flush()
4539
reset_device()
4640
dut_cloud.uart.wait_for_str_with_retries("Connected to Cloud", max_retries=3, timeout=240, reset_func=reset_device)
47-
dut_cloud.uart.wait_for_str(patterns_boot, timeout=120)
48-
dut_cloud.uart.wait_for_str(patterns_boot_done, timeout=120)
41+
dut_cloud.uart.wait_for_str_re(r"Next sample trigger in [1-9]\d* seconds", timeout=120)
4942

5043
# Button press
5144
dut_cloud.uart.flush()

0 commit comments

Comments
 (0)