diff options
author | Tom Rini <trini@konsulko.com> | 2023-02-14 15:11:37 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-02-14 15:11:37 -0500 |
commit | 2bfd217a16978794b43f0a30111b7472fba232b6 (patch) | |
tree | dfac18d00740bfc8c29da90e62dfb18765bb2143 /test/py/multiplexed_log.py | |
parent | faac9dee8e0629326dc122f4624fc4897e3f38b0 (diff) | |
parent | 9a8a27a76ad7ab51f19c7f019d7cdac8a3f9f3c9 (diff) |
Merge tag 'dm-next-valentine' of https://source.denx.de/u-boot/custodians/u-boot-dm into next
Move U-Boot over to the new schema for driver model tags
Diffstat (limited to 'test/py/multiplexed_log.py')
-rw-r--r-- | test/py/multiplexed_log.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/py/multiplexed_log.py b/test/py/multiplexed_log.py index 5e79075f2e6..63237594bb4 100644 --- a/test/py/multiplexed_log.py +++ b/test/py/multiplexed_log.py @@ -111,7 +111,7 @@ class RunAndLog(object): """Clean up any resources managed by this object.""" pass - def run(self, cmd, cwd=None, ignore_errors=False, stdin=None): + def run(self, cmd, cwd=None, ignore_errors=False, stdin=None, env=None): """Run a command as a sub-process, and log the results. The output is available at self.output which can be useful if there is @@ -126,6 +126,7 @@ class RunAndLog(object): or exits with an error code, otherwise an exception will be raised if such problems occur. stdin: Input string to pass to the command as stdin (or None) + env: Environment to use, or None to use the current one Returns: The output as a string. @@ -139,7 +140,7 @@ class RunAndLog(object): try: p = subprocess.Popen(cmd, cwd=cwd, stdin=subprocess.PIPE if stdin else None, - stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env) (stdout, stderr) = p.communicate(input=stdin) if stdout is not None: stdout = stdout.decode('utf-8') |