diff options
author | Simon Glass <sjg@chromium.org> | 2016-07-03 09:40:37 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-07-14 18:22:34 -0400 |
commit | 3b8d9d977b6dd6d04f0cfe2eb5dce25264fe40f5 (patch) | |
tree | 1bb87a7ed6c7664344807d1085de088466f246e9 /test | |
parent | 0671960beee89da3016f40d059df4a14f257d442 (diff) | |
download | u-boot-imx-3b8d9d977b6dd6d04f0cfe2eb5dce25264fe40f5.zip u-boot-imx-3b8d9d977b6dd6d04f0cfe2eb5dce25264fe40f5.tar.gz u-boot-imx-3b8d9d977b6dd6d04f0cfe2eb5dce25264fe40f5.tar.bz2 |
test/py: Allow RunAndLog() to return the output
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@chromium.org>
Reviewed-by: Teddy Reed <teddy.reed@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/py/multiplexed_log.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 |