[U-Boot] [PATCH 05/14] test/py: Allow RunAndLog() to return the output
Teddy Reed
teddy.reed at gmail.com
Sun Jul 3 22:43:36 CEST 2016
Hi Simon,
On Sun, Jul 3, 2016 at 8:40 AM, Simon Glass <sjg at chromium.org> wrote:
> Tests may want to look at the output from running a command. Return it so
> that this is possible.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
Reviewed-by: Teddy Reed <teddy.reed at gmail.com>
> ---
>
> test/py/multiplexed_log.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/test/py/multiplexed_log.py b/test/py/multiplexed_log.py
> index 68917eb..02c44df 100644
> --- a/test/py/multiplexed_log.py
> +++ b/test/py/multiplexed_log.py
> @@ -119,7 +119,7 @@ class RunAndLog(object):
> raised if such problems occur.
>
> Returns:
> - Nothing.
> + The output as a string.
> """
>
> msg = '+' + ' '.join(cmd) + '\n'
> @@ -161,6 +161,7 @@ class RunAndLog(object):
> self.chained_file.write(output)
> if exception:
> raise exception
> + return output
>
> class SectionCtxMgr(object):
> """A context manager for Python's "with" statement, which allows a certain
> --
> 2.8.0.rc3.226.g39d4020
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
--
Teddy Reed V
More information about the U-Boot
mailing list