=== modified file 'lava_dispatcher/actions/lava_test_shell.py'
@@ -454,7 +454,7 @@
signal_director = SignalDirector(self.client, testdefs_by_uuid)
with target.runner() as runner:
- runner.run("") # make sure we have a shell prompt
+ runner.wait_for_prompt(timeout)
runner._connection.sendline("%s/bin/lava-test-runner" % target.deployment_data['lava_test_dir'])
start = time.time()
if timeout == -1:
=== modified file 'lava_dispatcher/client/base.py'
@@ -87,6 +87,9 @@
self.match_id = None
self.match = None
+ def wait_for_prompt(self, timeout = -1):
+ wait_for_prompt(self._connection, self._prompt_str, timeout)
+
def run(self, cmd, response=None, timeout=-1, failok=False):
"""Run `cmd` and wait for a shell response.
@@ -121,7 +124,7 @@
self.match_id = None
self.match = None
- wait_for_prompt(self._connection, self._prompt_str, timeout)
+ self.wait_for_prompt(timeout)
if self._prompt_str_includes_rc:
rc = int(self._connection.match.group(1))