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 Jan 24, 2024
1 parent 9da58c2 commit e195d47
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion testcases/InstallUpstreamKernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ def is_url(path):
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.cv_SYSTEM.console.get_console()
time.sleep(10)
if raw_pty.sendline("uname -r")!=0:
break
raw_pty.sendline("reboot")
raw_pty.expect("login:", timeout=600)
raw_pty.close()
Expand Down

0 comments on commit e195d47

Please sign in to comment.