diff options
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/buildperf/base.py | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/utils/git.py | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py index 30b8e47556..6a8d9feb02 100644 --- a/meta/lib/oeqa/buildperf/base.py +++ b/meta/lib/oeqa/buildperf/base.py | |||
@@ -114,7 +114,7 @@ class BuildPerfTestResult(unittest.TextTestResult): | |||
114 | "and OE_BUILDPERFTEST_GIT_BRANCH environment variables") | 114 | "and OE_BUILDPERFTEST_GIT_BRANCH environment variables") |
115 | else: | 115 | else: |
116 | if not rev: | 116 | if not rev: |
117 | rev = self.repo.run_cmd(['rev-parse', 'HEAD']) | 117 | rev = self.repo.rev_parse('HEAD') |
118 | if not branch: | 118 | if not branch: |
119 | try: | 119 | try: |
120 | # Strip 11 chars, i.e. 'refs/heads' from the beginning | 120 | # Strip 11 chars, i.e. 'refs/heads' from the beginning |
diff --git a/meta/lib/oeqa/utils/git.py b/meta/lib/oeqa/utils/git.py index 6a2987fbe8..647465467d 100644 --- a/meta/lib/oeqa/utils/git.py +++ b/meta/lib/oeqa/utils/git.py | |||
@@ -38,5 +38,12 @@ class GitRepo(object): | |||
38 | env.update(env_update) | 38 | env.update(env_update) |
39 | return self._run_git_cmd_at(git_args, self.top_dir, env=env) | 39 | return self._run_git_cmd_at(git_args, self.top_dir, env=env) |
40 | 40 | ||
41 | def rev_parse(self, revision): | ||
42 | """Do git rev-parse""" | ||
43 | try: | ||
44 | return self.run_cmd(['rev-parse', revision]) | ||
45 | except GitError: | ||
46 | # Revision does not exist | ||
47 | return None | ||
41 | 48 | ||
42 | 49 | ||