u_boot_pylib: Provide directories to gitutil functions
For testing it is useful to be able to set the current directory used
for git operations, as well as the git-repo directory. Update some of
the functions to support this.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/u_boot_pylib/command.py b/tools/u_boot_pylib/command.py
index 0e24735..cb7ebf4 100644
--- a/tools/u_boot_pylib/command.py
+++ b/tools/u_boot_pylib/command.py
@@ -203,7 +203,7 @@
return run_pipe([cmd], **kwargs)
-def run_list(cmd):
+def run_list(cmd, **kwargs):
"""Run a command and return its output
Args:
@@ -211,8 +211,9 @@
Returns:
str: output of command
+ **kwargs (dict of args): Extra arguments to pass in
"""
- return run_pipe([cmd], capture=True).stdout
+ return run_pipe([cmd], capture=True, **kwargs).stdout
def stop_all():