From: Nathan Cutler Date: Fri, 17 Jan 2020 21:36:21 +0000 (+0100) Subject: suite/run.py: provide teuthology hash along with branch X-Git-Tag: 1.1.0~165^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=851988c3a0d5aad42a228ab96c62873c600045d2;p=teuthology.git suite/run.py: provide teuthology hash along with branch When running teuthology-suite with -t option, I see: teuthology branch: wip-fix-opensuse-provisioning ceph branch: wip-foo eb2fd5065c6e489ca8dd9282ba62ab231f144f7a In other words, the ceph branch message has the SHA1 but the teuthology branch message does not. This commit adds it. Signed-off-by: Nathan Cutler --- diff --git a/teuthology/suite/run.py b/teuthology/suite/run.py index f5ca1c198..4aa3cf2ad 100644 --- a/teuthology/suite/run.py +++ b/teuthology/suite/run.py @@ -15,6 +15,7 @@ from teuthology.exceptions import ( ) from teuthology.misc import deep_merge, get_results_url from teuthology.orchestra.opsys import OS +from teuthology.repo_utils import build_git_url from teuthology.suite import util from teuthology.suite.build_matrix import combine_path, build_matrix @@ -206,7 +207,14 @@ class Run(object): "branch {0} not in teuthology.git; will use master for" " teuthology".format(self.args.ceph_branch)) teuthology_branch = 'master' - log.info("teuthology branch: %s", teuthology_branch) + teuthology_hash = util.git_ls_remote( + 'teuthology', + teuthology_branch + ) + if not teuthology_hash: + exc = BranchNotFoundError(teuthology_branch, build_git_url('teuthology')) + util.schedule_fail(message=str(exc), name=self.name) + log.info("teuthology branch: %s %s", teuthology_branch, teuthology_hash) return teuthology_branch @property