From 38b7c80217c4e72b1d8988eb1e60bb6e77334114 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 18 Apr 2024 07:52:22 +0200 Subject: Adding upstream version 9.4.0+dfsg. Signed-off-by: Daniel Baumann --- .../.azure-pipelines/scripts/aggregate-coverage.sh | 8 +++---- .../.azure-pipelines/scripts/combine-coverage.py | 27 +++++++++++----------- .../.azure-pipelines/scripts/publish-codecov.sh | 26 ++++++++++----------- .../.azure-pipelines/scripts/report-coverage.sh | 10 ++++---- .../hcloud/.azure-pipelines/scripts/run-tests.sh | 24 +++++++++---------- .../.azure-pipelines/scripts/time-command.py | 11 ++++----- 6 files changed, 52 insertions(+), 54 deletions(-) (limited to 'ansible_collections/hetzner/hcloud/.azure-pipelines/scripts') diff --git a/ansible_collections/hetzner/hcloud/.azure-pipelines/scripts/aggregate-coverage.sh b/ansible_collections/hetzner/hcloud/.azure-pipelines/scripts/aggregate-coverage.sh index f3113dd0a..c196ab014 100755 --- a/ansible_collections/hetzner/hcloud/.azure-pipelines/scripts/aggregate-coverage.sh +++ b/ansible_collections/hetzner/hcloud/.azure-pipelines/scripts/aggregate-coverage.sh @@ -13,8 +13,8 @@ options=(--venv --venv-system-site-packages --color -v) ansible-test coverage combine --export "${agent_temp_directory}/coverage/" "${options[@]}" -if ansible-test coverage analyze targets generate --help >/dev/null 2>&1; then - # Only analyze coverage if the installed version of ansible-test supports it. - # Doing so allows this script to work unmodified for multiple Ansible versions. - ansible-test coverage analyze targets generate "${agent_temp_directory}/coverage/coverage-analyze-targets.json" "${options[@]}" +if ansible-test coverage analyze targets generate --help > /dev/null 2>&1; then + # Only analyze coverage if the installed version of ansible-test supports it. + # Doing so allows this script to work unmodified for multiple Ansible versions. + ansible-test coverage analyze targets generate "${agent_temp_directory}/coverage/coverage-analyze-targets.json" "${options[@]}" fi diff --git a/ansible_collections/hetzner/hcloud/.azure-pipelines/scripts/combine-coverage.py b/ansible_collections/hetzner/hcloud/.azure-pipelines/scripts/combine-coverage.py index 506ade646..bab3c4226 100755 --- a/ansible_collections/hetzner/hcloud/.azure-pipelines/scripts/combine-coverage.py +++ b/ansible_collections/hetzner/hcloud/.azure-pipelines/scripts/combine-coverage.py @@ -7,8 +7,7 @@ Keep in mind that Azure Pipelines does not enforce unique job display names (onl It is up to pipeline authors to avoid name collisions when deviating from the recommended format. """ -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type +from __future__ import annotations import os import re @@ -20,12 +19,12 @@ def main(): """Main program entry point.""" source_directory = sys.argv[1] - if '/ansible_collections/' in os.getcwd(): + if "/ansible_collections/" in os.getcwd(): output_path = "tests/output" else: output_path = "test/results" - destination_directory = os.path.join(output_path, 'coverage') + destination_directory = os.path.join(output_path, "coverage") if not os.path.exists(destination_directory): os.makedirs(destination_directory) @@ -34,27 +33,27 @@ def main(): count = 0 for name in os.listdir(source_directory): - match = re.search('^Coverage (?P[0-9]+) (?P