aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/buildperf/base.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py
index 119e6edf18..a3cd3f3155 100644
--- a/meta/lib/oeqa/buildperf/base.py
+++ b/meta/lib/oeqa/buildperf/base.py
@@ -188,7 +188,7 @@ class BuildPerfTestResult(unittest.TextTestResult):
fobj.write(','.join(values) + '\n')
- def git_commit_results(self, repo_path, branch=None):
+ def git_commit_results(self, repo_path, branch=None, tag=None):
"""Commit results into a Git repository"""
repo = GitRepo(repo_path, is_topdir=True)
if not branch:
@@ -223,6 +223,15 @@ class BuildPerfTestResult(unittest.TextTestResult):
if repo.get_current_branch() == branch:
log.info("Updating %s HEAD to latest commit", repo_path)
repo.run_cmd('reset --hard')
+
+ # Create (annotated) tag
+ if tag:
+ # Replace keywords
+ tag = tag.format(git_branch=self.git_branch,
+ git_commit=self.git_commit,
+ tester_host=self.hostname)
+ repo.run_cmd(['tag', '-a', '-m', msg, tag, commit])
+
finally:
if os.path.exists(tmp_index):
os.unlink(tmp_index)