From 9593404d8b5efd2f3fd1c540f6be90b078043776 Mon Sep 17 00:00:00 2001 From: Florent 'Skia' Jacquet Date: Tue, 4 Mar 2025 15:34:40 +0100 Subject: [PATCH] Only run riscv64 autopkgtest for Noble and onwards --- britney2/policies/autopkgtest.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index 5477fff..62c7cdb 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -38,6 +38,7 @@ from urllib.error import HTTPError from urllib.request import urlopen import apt_pkg +import distro_info import britney2.hints @@ -846,9 +847,12 @@ class AutopkgtestPolicy(BasePolicy): # britney throw some tests at it, but we don't want the whole universe to come # there either, hence the filtering on main. try: - # Filter tests to main packages on riscv64 + # Filter tests to main packages on riscv64 for Noble+ if arch == "riscv64": - tests = [(src, version) for (src, version) in tests if sources_info[src].component == UbuntuComponent.MAIN] + if self.options.series >= distro_info.UbuntuDistroInfo().codename("noble"): + tests = [(src, version) for (src, version) in tests if sources_info[src].component == UbuntuComponent.MAIN] + else: + tests = [] except KeyError: # Sometimes™, sources_info[src] raises KeyError pass