diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-05-13 16:34:04 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-25 23:03:46 +0100 |
commit | 7fcc9f5ead9d82067b27facf1b47a490b93489c7 (patch) | |
tree | 58fbc4afcd297ab38cb1600ed64d6d91ea65c80b /meta/lib/oeqa | |
parent | 665800fdf645cfc4757be9137a7b6800bc8f4767 (diff) | |
download | poky-7fcc9f5ead9d82067b27facf1b47a490b93489c7.tar.gz |
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.
(From OE-Core rev: 9b3c7c47f5d0fa473fe1db81b59b26531414781c)
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/utils/git.py | 8 |
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): | |||
30 | cmd_str, ret.status, ret.output)) | 30 | cmd_str, ret.status, ret.output)) |
31 | return ret.output.strip() | 31 | return ret.output.strip() |
32 | 32 | ||
33 | def run_cmd(self, git_args): | 33 | def run_cmd(self, git_args, env_update=None): |
34 | """Run Git command""" | 34 | """Run Git command""" |
35 | return self._run_git_cmd_at(git_args, self.top_dir) | 35 | env = None |
36 | if env_update: | ||
37 | env = os.environ.copy() | ||
38 | env.update(env_update) | ||
39 | return self._run_git_cmd_at(git_args, self.top_dir, env=env) | ||
36 | 40 | ||
37 | 41 | ||
38 | 42 | ||