From b073a719112e50fab353007beeb8ac2619e7f72a Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 18 Jul 2017 12:18:28 +0100 Subject: [PATCH] Check whether testsuite triggers have any binaries We should only run autopkgtests for testsuite triggers if the source package has any binaries on the relevant architecture, as otherwise it should be expected to fail. --- britney2/policies/autopkgtest.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index fac6860..2e8ee1e 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -375,8 +375,11 @@ class AutopkgtestPolicy(BasePolicy): except KeyError: continue if 'autopkgtest' in tdep_src_info.testsuite or self.has_autodep8(tdep_src_info, binaries_info): - tests.append((tdep_src, tdep_src_info[VERSION])) - reported_pkgs.add(tdep_src) + for pkg_id in tdep_src_info.binaries: + if pkg_id.architecture == arch: + tests.append((tdep_src, tdep_src_info[VERSION])) + reported_pkgs.add(tdep_src) + break # Hardcode linux-meta → linux, lxc, glibc, systemd triggers until we get a more flexible # implementation: https://bugs.debian.org/779559