Skip to content

Commit

Permalink
Patch helps to overcome login issue.
Browse files Browse the repository at this point in the history
Sometimes the console via ssh is not connected and Login attempt fails,
This could be due to network issue.Attempting to login for 5 times if
the connection is not established in one go.

Signed-off-by: Abdul Haleem <[email protected]>
  • Loading branch information
abdhaleegit committed Feb 1, 2024
1 parent 9da58c2 commit e738300
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions testcases/InstallUpstreamKernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,12 @@ def is_url(path):
self.prompt = self.cv_SYSTEM.util.build_prompt()
self.console_thread.console_terminate()
con.close()
time.sleep(10)
raw_pty = self.cv_SYSTEM.console.get_console()
for i in range(5):
raw_pty = self.wait_for(self.cv_SYSTEM.console.get_console, timeout=20)
time.sleep(10)
if raw_pty is not None:
raw_pty.sendline("uname -r")
break
raw_pty.sendline("reboot")
raw_pty.expect("login:", timeout=600)
raw_pty.close()
Expand Down

0 comments on commit e738300

Please sign in to comment.