From 84c37fad4c7e559d5ebeec34623d4106a47c1164 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 12 Feb 2021 20:35:10 +0100 Subject: selftest/reproducible: track unusued entries in the exclusion list This helps with trimming down the list, and towards 100% reproducibility :) (From OE-Core rev: da7a173d7a01524229c8515326465968a845e96f) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/reproducible.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'meta/lib/oeqa') diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py index deddf6e50b..ecd69b3577 100644 --- a/meta/lib/oeqa/selftest/cases/reproducible.py +++ b/meta/lib/oeqa/selftest/cases/reproducible.py @@ -79,8 +79,8 @@ def is_excluded(package): package_name = os.path.basename(package) for i in exclude_packages: if package_name.startswith(i): - return True - return False + return i + return None MISSING = 'MISSING' DIFFERENT = 'DIFFERENT' @@ -106,14 +106,17 @@ class PackageCompareResults(object): self.different = [] self.different_excluded = [] self.same = [] + self.active_exclusions = set() def add_result(self, r): self.total.append(r) if r.status == MISSING: self.missing.append(r) elif r.status == DIFFERENT: - if is_excluded(r.reference): + exclusion = is_excluded(r.reference) + if exclusion: self.different_excluded.append(r) + self.active_exclusions.add(exclusion) else: self.different.append(r) else: @@ -127,7 +130,10 @@ class PackageCompareResults(object): self.same.sort() def __str__(self): - return 'same=%i different=%i different_excluded=%i missing=%i total=%i' % (len(self.same), len(self.different), len(self.different_excluded), len(self.missing), len(self.total)) + return 'same=%i different=%i different_excluded=%i missing=%i total=%i\nunused_exclusions=%s' % (len(self.same), len(self.different), len(self.different_excluded), len(self.missing), len(self.total), self.unused_exclusions()) + + def unused_exclusions(self): + return set(exclude_packages) - self.active_exclusions def compare_file(reference, test, diffutils_sysroot): result = CompareResult() -- cgit v1.2.3-54-g00ecf