summaryrefslogtreecommitdiff
path: root/meta/lib
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-05-13 16:34:04 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-25 22:59:54 +0100
commit9b3c7c47f5d0fa473fe1db81b59b26531414781c (patch)
tree082d2fda4d526f245bf64126729a650a9a31fb1d /meta/lib
parent4b7bf7860713581ba351599fe32817ba24e8f8d0 (diff)
downloadopenembedded-core-9b3c7c47f5d0fa473fe1db81b59b26531414781c.tar.gz
openembedded-core-9b3c7c47f5d0fa473fe1db81b59b26531414781c.tar.bz2
openembedded-core-9b3c7c47f5d0fa473fe1db81b59b26531414781c.zip
oeqa.utils.git: support git commands with updated env
Extend GitRepo.run_cmd so that the caller may redefine and/or define additional environment variables that will be used when the git command is run. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/utils/git.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/git.py b/meta/lib/oeqa/utils/git.py
index a4c6741f4e..6a2987fbe8 100644
--- a/meta/lib/oeqa/utils/git.py
+++ b/meta/lib/oeqa/utils/git.py
@@ -30,9 +30,13 @@ class GitRepo(object):
cmd_str, ret.status, ret.output))
return ret.output.strip()
- def run_cmd(self, git_args):
+ def run_cmd(self, git_args, env_update=None):
"""Run Git command"""
- return self._run_git_cmd_at(git_args, self.top_dir)
+ env = None
+ if env_update:
+ env = os.environ.copy()
+ env.update(env_update)
+ return self._run_git_cmd_at(git_args, self.top_dir, env=env)