Now that all the expect() functionality is in console_base, move the
variables there too.
Ensure they are reset when a new connection is spawned.
Signed-off-by: Simon Glass <sjg@chromium.org>
This timeout relates to the expect() function so move it into the same
file and class.
Reset the timeout when a new spawn is created, to mimic the existing
behabiour. Update a few tests which access the timeout directly.
Signed-off-by: Simon Glass <sjg@chromium.org>
This function is only used from console_base and it is always accessed
via a 'self.p.expect()' expression, which is confusing.
Checking for expected output doesn't really relate to spawning in any
case, so move this function to console_base
For now the spawn class is kept as it is, to reduce the change in each
patch.
Signed-off-by: Simon Glass <sjg@chromium.org>
There are quite a few warnings which makes it confusing when editing
this file. Resolve the easy ones, with these remaining:
55:0: R0913: Too many arguments (7/5) (too-many-arguments)
91:0: R0902: Too many instance attributes (14/7) (too-many-instance-attributes)
136:12: W0702: No exception type(s) specified (bare-except)
246:4: R0912: Too many branches (14/12) (too-many-branches)
Signed-off-by: Simon Glass <sjg@chromium.org>
There are quite a few warnings which makes it confusing when editing
this file. Resolve the easy ones, leaving:
125:0: R0902: Too many instance attributes (14/7) (too-many-instance-attributes)
212:4: R0912: Too many branches (14/12) (too-many-branches)
271:4: R0913: Too many arguments (6/5) (too-many-arguments)
271:4: R0912: Too many branches (13/12) (too-many-branches)
454:8: W0702: No exception type(s) specified (bare-except)
531:8: W0702: No exception type(s) specified (bare-except)
Rename wait_for_boot_prompt() so it is clear that it is an internal
function.
Signed-off-by: Simon Glass <sjg@chromium.org>
We know this is U-Boot so the prefix serves no purpose other than to
make things longer and harder to read. Drop it and rename the files.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # test_android / test_dfu