From: Simon Glass Date: Sun, 3 Jul 2016 15:40:37 +0000 (-0600) Subject: test/py: Allow RunAndLog() to return the output X-Git-Tag: v2016.09-rc1~108 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3b8d9d977b6dd6d04f0cfe2eb5dce25264fe40f5;p=u-boot 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 Reviewed-by: Teddy Reed --- diff --git a/test/py/multiplexed_log.py b/test/py/multiplexed_log.py index 68917eb0ea..02c44df883 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