From 090ccdff9e5be7f38538cebf2714f88937cb3491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Mon, 19 Jul 2021 13:03:14 +0200 Subject: [PATCH] Add an option to configure whether all ADT test results should be displayed or not. --- britney.conf | 3 +++ britney.conf.template | 3 +++ britney2/policies/autopkgtest.py | 6 ++++-- tests/__init__.py | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/britney.conf b/britney.conf index d73b012..1fc1399 100644 --- a/britney.conf +++ b/britney.conf @@ -116,6 +116,9 @@ ADT_PRIVATE_URL = https://autopkgtest.ubuntu.com/private-results/ # Base URL for autopkgtest site, used for links in the excuses ADT_CI_URL = https://autopkgtest.ubuntu.com/ ADT_HUGE = 20 +# Change to 'yes' for excuses to include all ADT results, even those requiring +# no action (like passing or always-failed) +ADT_SHOW_IRRELEVANT = no # Autopkgtest results can be used to influence the aging ADT_REGRESSION_PENALTY = diff --git a/britney.conf.template b/britney.conf.template index e58b9c4..d46877e 100644 --- a/britney.conf.template +++ b/britney.conf.template @@ -140,6 +140,9 @@ ADT_CI_URL = https://example.com/ # Enable the huge queue for packages that trigger vast amounts of tests to not # starve the regular queue #ADT_HUGE = 20 +# Change to 'yes' for excuses to include all ADT results, even those requiring +# no action (like passing or always-failed) +ADT_SHOW_IRRELEVANT = no # Autopkgtest results can be used to influence the aging, leave # ADT_REGRESSION_PENALTY empty to have regressions block migration diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index f647261..5751523 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -519,8 +519,10 @@ class AutopkgtestPolicy(BasePolicy): html_archmsg.append(message) # render HTML line for testsrc entry, but only when action is - # or may be required - if r - {'PASS', 'NEUTRAL', 'RUNNING-ALWAYSFAIL', 'ALWAYSFAIL', 'IGNORE-FAIL'}: + # or may be required or when britney is configured to print + # everything + if (self.options.adt_show_irrelevant or + r - {'PASS', 'NEUTRAL', 'RUNNING-ALWAYSFAIL', 'ALWAYSFAIL', 'IGNORE-FAIL'}): results_info.append("autopkgtest for %s: %s" % (testname, ', '.join(html_archmsg))) if verdict != PolicyVerdict.PASS: diff --git a/tests/__init__.py b/tests/__init__.py index 86146a5..64a960c 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -404,6 +404,7 @@ ADT_PRIVATE_SHARED = ADT_PRIVATE_URL = ADT_CI_URL = https://autopkgtest.ubuntu.com/ ADT_HUGE = 20 +ADT_SHOW_IRRELEVANT = no ADT_SUCCESS_BOUNTY = ADT_REGRESSION_PENALTY =