From 586083acfacc52f858530a4b4ea8bb318f59273e Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 15 Jan 2020 21:21:43 -0800 Subject: [PATCH] Don't trigger tests on an arch the triggering package has no binaries for If reverse-dependencies of this package still exist on the architecture, these would be captured as uninstallables; we don't need to additionally trigger tests that can never succeed, would tell us nothing about the package if they did, and will just cause more work to hint away the results. --- britney2/policies/autopkgtest.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index 9c23d96..b46f749 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -336,6 +336,15 @@ class AutopkgtestPolicy(BasePolicy): # we want to test the package itself, if it still has a test in unstable srcinfo = self.britney.sources['unstable'][src] + test_for_arch = False + for pkg_id in srcinfo.binaries: + if pkg_id.architecture in (arch, 'all'): + test_for_arch = True + # If the source package builds no binaries for this architecture, + # don't try to trigger tests for it. + if not test_for_arch: + return [] + if 'autopkgtest' in srcinfo.testsuite or self.has_autodep8(srcinfo, binaries_info): reported_pkgs.add(src) tests.append((src, ver))