summaryrefslogtreecommitdiff
path: root/meta/lib/oeqa/buildperf
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-05-16 14:36:27 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-25 22:59:56 +0100
commitdcba2302adab47b398f1ce7d09c38828ea9ae426 (patch)
treed6681c4e5f572a5c6f9230af08bf5304e41350e9 /meta/lib/oeqa/buildperf
parent55726e931536ed0cbd7b80588060b05a3145c934 (diff)
downloadopenembedded-core-dcba2302adab47b398f1ce7d09c38828ea9ae426.tar.gz
openembedded-core-dcba2302adab47b398f1ce7d09c38828ea9ae426.tar.bz2
openembedded-core-dcba2302adab47b398f1ce7d09c38828ea9ae426.zip
oeqa.utils.git: implement GitRepo.get_current_branch()
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib/oeqa/buildperf')
-rw-r--r--meta/lib/oeqa/buildperf/base.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py
index 6a8d9feb02..adc3da3e2c 100644
--- a/meta/lib/oeqa/buildperf/base.py
+++ b/meta/lib/oeqa/buildperf/base.py
@@ -116,12 +116,9 @@ class BuildPerfTestResult(unittest.TextTestResult):
if not rev:
rev = self.repo.rev_parse('HEAD')
if not branch:
- try:
- # Strip 11 chars, i.e. 'refs/heads' from the beginning
- branch = self.repo.run_cmd(['symbolic-ref', 'HEAD'])[11:]
- except GitError:
+ branch = self.repo.get_current_branch()
+ if not branch:
log.debug('Currently on detached HEAD')
- branch = None
return str(rev), str(branch)
def addSuccess(self, test):