Merge ~cjwatson/britney/+git/britney2-ubuntu:testsuite-triggers-check-arch into ~ubuntu-release/britney/+git/britney2-ubuntu:master

Proposed by Colin Watson
Status: Merged
Merged at revision: b073a719112e50fab353007beeb8ac2619e7f72a
Proposed branch: ~cjwatson/britney/+git/britney2-ubuntu:testsuite-triggers-check-arch
Merge into: ~ubuntu-release/britney/+git/britney2-ubuntu:master
Diff against target: 18 lines (+5/-2)
1 file modified
britney2/policies/autopkgtest.py (+5/-2)
Reviewer Review Type Date Requested Status
Steve Langasek Needs Information
Review via email: mp+327610@code.launchpad.net

Commit message

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.

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

Doesn't this cause us to miss tests for arch: all packages that are meant to be tested on all archs?

review: Needs Information
Revision history for this message
Colin Watson (cjwatson) wrote :

Shouldn't do, because BinaryPackageId.architecture is set to the architecture of the Packages file that the binary's information was read from, not to the Architecture field of the binary itself. See britney.py:Britney._read_packages_file.

Revision history for this message
Iain Lane (laney) wrote :

On Tue, Jul 18, 2017 at 11:24:25AM -0000, Colin Watson wrote:
> Colin Watson has proposed merging ~cjwatson/britney/+git/britney2-ubuntu:testsuite-triggers-check-arch into ~ubuntu-release/britney/+git/britney2-ubuntu:master.
>
> Commit message:
> 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.

I know this is merged, but for the record - I think this is worth a test
(tests/test_autopkgtest.py), to specify exactly what we want to happen
if nothing else.

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py
2index fac6860..2e8ee1e 100644
3--- a/britney2/policies/autopkgtest.py
4+++ b/britney2/policies/autopkgtest.py
5@@ -375,8 +375,11 @@ class AutopkgtestPolicy(BasePolicy):
6 except KeyError:
7 continue
8 if 'autopkgtest' in tdep_src_info.testsuite or self.has_autodep8(tdep_src_info, binaries_info):
9- tests.append((tdep_src, tdep_src_info[VERSION]))
10- reported_pkgs.add(tdep_src)
11+ for pkg_id in tdep_src_info.binaries:
12+ if pkg_id.architecture == arch:
13+ tests.append((tdep_src, tdep_src_info[VERSION]))
14+ reported_pkgs.add(tdep_src)
15+ break
16
17 # Hardcode linux-meta → linux, lxc, glibc, systemd triggers until we get a more flexible
18 # implementation: https://bugs.debian.org/779559

Subscribers

People subscribed via source and target branches