aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillian Rampazzo <willianr@redhat.com>2021-09-20 17:49:30 -0300
committerPhilippe Mathieu-Daudé <philmd@redhat.com>2021-09-27 19:06:30 +0200
commit22e82e0982a893074738cd9c6184c8eb1c012422 (patch)
treed1a54ab078027083138b3ba97497959925eb80ba
parente410bac0701b6f6a3d45990caf9aaca7f8d46bb3 (diff)
downloadqemu-arm-22e82e0982a893074738cd9c6184c8eb1c012422.tar.gz
avocado_qemu: tweak ssh connect method
The current implementation will crash if the connection fails as the `time` module is not imported. Fix the import problem. While here, tweaks the connection to wait progressively when the connection fails. Signed-off-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> [PMD: Reworded description] Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210920204932.94132-5-willianr@redhat.com>
-rw-r--r--tests/acceptance/avocado_qemu/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
index edb9ed7485..c3613f9262 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -13,6 +13,7 @@ import os
import shutil
import sys
import tempfile
+import time
import uuid
import avocado
@@ -305,8 +306,7 @@ class LinuxSSHMixIn:
self.ssh_session.connect()
return
except:
- time.sleep(4)
- pass
+ time.sleep(i)
self.fail('ssh connection timeout')
def ssh_command(self, command):