From 17dcde87870838001e7dccab8b3a79e3e2f69033 Mon Sep 17 00:00:00 2001 From: Maska989 Date: Mon, 13 Jan 2025 10:30:54 +0100 Subject: [PATCH] trunner: add missing expect during flash procedure It is essential to include an assertion after performing a reboot to verify that PSH has loaded correctly and to avoid excessive output during the subsequent test case. --- trunner/harness/plo.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/trunner/harness/plo.py b/trunner/harness/plo.py index befb2384..b61944ea 100644 --- a/trunner/harness/plo.py +++ b/trunner/harness/plo.py @@ -285,6 +285,11 @@ def __call__(self): self.rebooter(flash=False, hard=True) + try: + self.dut.expect_exact("(psh)%", timeout=10) + except pexpect.TIMEOUT as e: + raise PloError("Error: missing psh prompt after flash!", output=self.dut.before) from e + class PloPhoenixdAppLoader(TerminalHarness, PloInterface): """Harness to load the binaries to syspage using plo bootloader.