From 7d6d4debdfdcc4f42dca25c246679d10974ba038 Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Sun, 19 Jul 2020 12:44:15 +0100 Subject: [PATCH] autopkgtest, DependsPolicy: Run tests where we didn't care about the depends problem We currently skip running autopkgtests where there is an installability problem, but in a few cases the depends policy notes these only, but otherwise doesn't block migration on them. In these cases, let's try to run the autopkgtests anyway. There will be a few instances of uninstallability here, but since we migrate the packages we should give them a chance to be tested. --- britney2/policies/autopkgtest.py | 3 ++- britney2/policies/policy.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index 8ee2fc5..13fe64c 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -396,7 +396,8 @@ class AutopkgtestPolicy(BasePolicy): verdict = PolicyVerdict.REJECTED_TEMPORARILY self.logger.info('%s hasn''t been built on arch %s, delay autopkgtest there', source_name, arch) excuse.add_verdict_info(verdict, "arch:%s not built yet, autopkgtest delayed there" % arch) - elif arch in excuse.unsatisfiable_on_archs: + elif (arch in excuse.unsatisfiable_on_archs and + arch not in excuse.policy_info['depends'].get('skip_dep_check', [])): self.logger.info('%s is uninstallable on arch %s, not running autopkgtest there', source_name, arch) excuse.addinfo("uninstallable on arch %s, not running autopkgtest there" % arch) else: diff --git a/britney2/policies/policy.py b/britney2/policies/policy.py index da294eb..56d98ad 100644 --- a/britney2/policies/policy.py +++ b/britney2/policies/policy.py @@ -876,7 +876,9 @@ class DependsPolicy(BasePolicy): # ...but if the binary is allowed to become uninstallable, # we don't care # we still want the binary to be listed as uninstallable, - # so the autopkgtest policy knows not to try to run tests + # let the autopkgtest policy see that we did this so that + # it can run the test anyway + deps_info.setdefault('skip_dep_check', []).append(arch) continue verdict = PolicyVerdict.REJECTED_PERMANENTLY excuse.add_verdict_info(verdict, "%s/%s has unsatisfiable dependency" % (