aboutsummaryrefslogtreecommitdiff
path: root/lava_dispatcher/actions/test
diff options
context:
space:
mode:
authorRĂ©mi Duraffort <remi.duraffort@linaro.org>2018-03-29 15:15:36 +0200
committerSenthil Kumaran Shanmugasundaram <senthil.kumaran@linaro.org>2018-04-03 01:17:26 +0000
commit0e30433587e57453d4d28fb43c94c1b33ad9b5ce (patch)
treeec4a35d3b42e502d8c58fc0e7058abbf4eb29b62 /lava_dispatcher/actions/test
parent351176ab8bdae7168bda48186e8e32b3f18d1699 (diff)
shell: wait for prompt between each command
Change-Id: Id6775e4a7d0ead122d167d83343a7a39e14ebbdc
Diffstat (limited to 'lava_dispatcher/actions/test')
-rw-r--r--lava_dispatcher/actions/test/shell.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lava_dispatcher/actions/test/shell.py b/lava_dispatcher/actions/test/shell.py
index 577e84e7e..4c4eda093 100644
--- a/lava_dispatcher/actions/test/shell.py
+++ b/lava_dispatcher/actions/test/shell.py
@@ -227,8 +227,6 @@ class TestShellAction(TestAction):
# FIXME: This should be logged whenever prompt_str is changed, by the connection object.
self.logger.debug("Setting default test shell prompt %s", connection.prompt_str)
connection.timeout = self.connection_timeout
- # force an initial prompt - not all shells will respond without an excuse.
- connection.sendline(connection.check_char)
self.wait(connection)
# use the string instead of self.name so that inheriting classes (like multinode)
@@ -242,6 +240,7 @@ class TestShellAction(TestAction):
if pre_command_list and running == 0:
for command in pre_command_list:
connection.sendline(command, delay=self.character_delay)
+ self.wait(connection)
if lava_test_results_dir is None:
raise JobError("Nothing to run. Maybe the 'deploy' stage is missing, "
@@ -249,8 +248,10 @@ class TestShellAction(TestAction):
self.logger.debug("Using %s" % lava_test_results_dir)
connection.sendline('ls -l %s/' % lava_test_results_dir, delay=self.character_delay)
+ self.wait(connection)
if lava_test_sh_cmd:
connection.sendline('export SHELL=%s' % lava_test_sh_cmd, delay=self.character_delay)
+ self.wait(connection)
try:
feedbacks = []
@@ -294,6 +295,7 @@ class TestShellAction(TestAction):
if bytes_read > 1:
self.logger.debug("Listened to connection for namespace '%s' done", feedback[0])
last_check = time.time()
+ self.wait(connection)
finally:
if self.current_run is not None:
self.logger.error("Marking unfinished test run as failed")