summaryrefslogtreecommitdiff
path: root/test/py/u_boot_utils.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-02-14 15:11:37 -0500
committerTom Rini <trini@konsulko.com>2023-02-14 15:11:37 -0500
commit2bfd217a16978794b43f0a30111b7472fba232b6 (patch)
treedfac18d00740bfc8c29da90e62dfb18765bb2143 /test/py/u_boot_utils.py
parentfaac9dee8e0629326dc122f4624fc4897e3f38b0 (diff)
parent9a8a27a76ad7ab51f19c7f019d7cdac8a3f9f3c9 (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/u_boot_utils.py')
-rw-r--r--test/py/u_boot_utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/py/u_boot_utils.py b/test/py/u_boot_utils.py
index c4fc23aeda3..9e161fbc238 100644
--- a/test/py/u_boot_utils.py
+++ b/test/py/u_boot_utils.py
@@ -157,7 +157,7 @@ def wait_until_file_open_fails(fn, ignore_errors):
return
raise Exception('File can still be opened')
-def run_and_log(u_boot_console, cmd, ignore_errors=False, stdin=None):
+def run_and_log(u_boot_console, cmd, ignore_errors=False, stdin=None, env=None):
"""Run a command and log its output.
Args:
@@ -170,6 +170,7 @@ def run_and_log(u_boot_console, cmd, ignore_errors=False, stdin=None):
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.
@@ -177,7 +178,7 @@ def run_and_log(u_boot_console, cmd, ignore_errors=False, stdin=None):
if isinstance(cmd, str):
cmd = cmd.split()
runner = u_boot_console.log.get_runner(cmd[0], sys.stdout)
- output = runner.run(cmd, ignore_errors=ignore_errors, stdin=stdin)
+ output = runner.run(cmd, ignore_errors=ignore_errors, stdin=stdin, env=env)
runner.close()
return output