diff options
author | Neil Williams <neil.williams@linaro.org> | 2018-06-08 16:12:36 +0100 |
---|---|---|
committer | Neil Williams <neil.williams@linaro.org> | 2018-06-08 16:23:05 +0000 |
commit | 50e347aca78dcaf7f58a19394eba0ab4eb415fff (patch) | |
tree | 74f7efa8a0e0327857c4663245ef38f7e60c737f /lava_dispatcher/shell.py | |
parent | 3cd50f3abd7521870130f2aaec67ca9399d1018c (diff) |
Change spawnwindowsize to spawn_maxread
spawnwindowsize limits the amount of buffer searched without
changing the size of the buffer, so prompts were missed.
Use maxread - within the platform/tty restrictions - to
slightly improve the buffer size. Keep searchwindowsize
at the default of searching the entire buffer.
Change-Id: I99fa570c6537a1b499d34533bc214ae939084a1a
Diffstat (limited to 'lava_dispatcher/shell.py')
-rw-r--r-- | lava_dispatcher/shell.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lava_dispatcher/shell.py b/lava_dispatcher/shell.py index 6700509b8..701e0c705 100644 --- a/lava_dispatcher/shell.py +++ b/lava_dispatcher/shell.py @@ -92,7 +92,7 @@ class ShellCommand(pexpect.spawn): # pylint: disable=too-many-public-methods A ShellCommand is a raw_connection for a ShellConnection instance. """ - def __init__(self, command, lava_timeout, logger=None, cwd=None, window=-1): + def __init__(self, command, lava_timeout, logger=None, cwd=None, window=2000): if isinstance(window, str): # constants need to be stored as strings. try: @@ -109,7 +109,9 @@ class ShellCommand(pexpect.spawn): # pylint: disable=too-many-public-methods cwd=cwd, logfile=ShellLogger(logger), encoding='utf-8', - searchwindowsize=window, + # Data before searchwindowsize point is preserved, but not searched. + searchwindowsize=None, # pattern match the entire buffer + maxread=window, # limit the size of the buffer. 1 to turn off buffering codec_errors='replace' ) self.name = "ShellCommand" |