From b3302e8e18f3d8aef5fba21c2b33c765334116ae Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 15 Oct 2024 09:29:52 -0600 Subject: [PATCH] Housekeeping: remove duplicates from success_task Accidentally introduced in #21639. Thanks to Paul for the Python code to prevent this from happening again. Signed-off-by: Ed Santiago --- .cirrus.yml | 5 ----- contrib/cirrus/cirrus_yaml_test.py | 11 +++++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index c4c5936ae4..dbec29c12e 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1074,11 +1074,6 @@ success_task: - remote_system_test_aarch64 - rootless_remote_system_test - rootless_system_test - - local_system_test - - local_system_test_aarch64 - - remote_system_test - - rootless_remote_system_test - - rootless_system_test - farm_test - buildah_bud_test - upgrade_test diff --git a/contrib/cirrus/cirrus_yaml_test.py b/contrib/cirrus/cirrus_yaml_test.py index f127ffbfa2..cfa1098a84 100755 --- a/contrib/cirrus/cirrus_yaml_test.py +++ b/contrib/cirrus/cirrus_yaml_test.py @@ -60,6 +60,17 @@ def test_depends(self): msg=('No success aggregation task depends_on "{0}"'.format(task_name)) self.assertIn(task_name, success_deps, msg=msg) + def test_duplicate_depends(self): + """Check for duplicate names in depends_on""" + for task_name in self.ALL_TASK_NAMES: + task = self.CIRRUS_YAML[task_name + '_task'] + if 'depends_on' in task: + depends_on = task['depends_on'] + seen = set() + for x in depends_on: + self.assertNotIn(x,seen, msg=f"depends_on contains duplicated names in task {task_name}") + seen.add(x) + def test_only_if(self): """2024-07 PR#23174: ugly but necessary duplication in only_if conditions. Prevent typos or unwanted changes.""" # N/B: This giant string is white space sensitive, take care when updating/modifying