From e195d47a621ed331c5c11d9c5269e4c620c5c4e3 Mon Sep 17 00:00:00 2001 From: Abdul Haleem Date: Tue, 23 Jan 2024 15:30:56 +0530 Subject: [PATCH] Patch helps to overcome login issue. 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 --- testcases/InstallUpstreamKernel.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testcases/InstallUpstreamKernel.py b/testcases/InstallUpstreamKernel.py index 94741e4f4..8f7787318 100644 --- a/testcases/InstallUpstreamKernel.py +++ b/testcases/InstallUpstreamKernel.py @@ -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()