test/py: Use longer timeout for lab-mode restart
When restarting U-Boot in lab mode, ensure_spawned() sets the timeout to TIMEOUT_MS (30 seconds) before calling _wait_for_boot_prompt(). In lab mode, _wait_for_banner() is skipped, so TIMEOUT_PREPARE_MS is never restored. This causes tests that boot into Linux and then restart U-Boot (like test_distro_script) to fail with a timeout if the board takes more than 30 seconds to reset and boot. Fix this by setting the timeout to TIMEOUT_PREPARE_MS (3 minutes) at the start of _wait_for_boot_prompt() when in lab mode. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
@@ -309,6 +309,8 @@ class ConsoleBase():
|
||||
try:
|
||||
self.log.info('Waiting for U-Boot to be ready')
|
||||
|
||||
if self.lab_mode:
|
||||
self.timeout = TIMEOUT_PREPARE_MS
|
||||
if not self.lab_mode:
|
||||
self._wait_for_banner(loop_num)
|
||||
self.u_boot_version_string = self.after
|
||||
|
||||
Reference in New Issue
Block a user