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.
This commit is contained in:
Colin Watson 2017-07-18 12:18:28 +01:00
parent 132ffaf465
commit b073a71911

View File

@ -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