aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-11-23 11:27:44 +0000
committerPeter Maydell <peter.maydell@linaro.org>2020-11-23 11:27:44 +0000
commit6ab64cc2a51dd30f4b19eba707f5bfcba0524a0a (patch)
treea585109df5d6a7331464e2158fb247e67c4d6936 /scripts
parent8cc30eb1400fc01f2b139cdd3dc524f8b84dbe07 (diff)
parent534f80e1dffbf520bed9bf5fd5ae98de6662e126 (diff)
downloadqemu-6ab64cc2a51dd30f4b19eba707f5bfcba0524a0a.zip
qemu-6ab64cc2a51dd30f4b19eba707f5bfcba0524a0a.tar.gz
qemu-6ab64cc2a51dd30f4b19eba707f5bfcba0524a0a.tar.bz2
Merge remote-tracking branch 'remotes/stsquad/tags/pull-for-5.2-rc3-231120-1' into staging
Misc CI fixes: - more helpful logic for git-pipeline-status - fix tempdir leak in avocado - move remaining x86 check-tcg to gitlab - add tracing headers to ubuntu2004 docker - move tracing backend tests to gitlab - bump up timeouts on cirrus MacOS # gpg: Signature made Mon 23 Nov 2020 09:58:18 GMT # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-for-5.2-rc3-231120-1: .cirrus.yml: bump timeout period for MacOS builds gitlab-ci: Move trace backend tests across to gitlab tests/docker: Install liblttng-ust-dev package in Ubuntu 20.04 image gitlab: move remaining x86 check-tcg targets to gitlab tests/avocado: clean-up socket directory after run tests: add prefixes to the bare mkdtemp calls scripts/ci: clean up default args logic a little Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ci/gitlab-pipeline-status24
1 files changed, 13 insertions, 11 deletions
diff --git a/scripts/ci/gitlab-pipeline-status b/scripts/ci/gitlab-pipeline-status
index bac8233..78e72f6 100755
--- a/scripts/ci/gitlab-pipeline-status
+++ b/scripts/ci/gitlab-pipeline-status
@@ -31,7 +31,7 @@ class NoPipelineFound(Exception):
"""Communication is successfull but pipeline is not found."""
-def get_local_branch_commit(branch='staging'):
+def get_local_branch_commit(branch):
"""
Returns the commit sha1 for the *local* branch named "staging"
"""
@@ -126,18 +126,16 @@ def create_parser():
help=('The GitLab project ID. Defaults to the project '
'for https://gitlab.com/qemu-project/qemu, that '
'is, "%(default)s"'))
- try:
- default_commit = get_local_branch_commit()
- commit_required = False
- except ValueError:
- default_commit = ''
- commit_required = True
- parser.add_argument('-c', '--commit', required=commit_required,
- default=default_commit,
+ parser.add_argument('-b', '--branch', type=str, default="staging",
+ help=('Specify the branch to check. '
+ 'Use HEAD for your current branch. '
+ 'Otherwise looks at "%(default)s"'))
+ parser.add_argument('-c', '--commit',
+ default=None,
help=('Look for a pipeline associated with the given '
'commit. If one is not explicitly given, the '
- 'commit associated with the local branch named '
- '"staging" is used. Default: %(default)s'))
+ 'commit associated with the default branch '
+ 'is used.'))
parser.add_argument('--verbose', action='store_true', default=False,
help=('A minimal verbosity level that prints the '
'overall result of the check/wait'))
@@ -149,6 +147,10 @@ def main():
"""
parser = create_parser()
args = parser.parse_args()
+
+ if not args.commit:
+ args.commit = get_local_branch_commit(args.branch)
+
success = False
try:
if args.wait: