summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-02-12 20:35:10 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-04-23 10:41:14 +0100
commit5ec80538bdea72cb13938eb3938b113f426815f1 (patch)
tree40ce3d99dbd56661cc2ade6350a02504cd515329 /meta/lib/oeqa/selftest
parent548397c1562d8b68f574fa1a14336ee04fe29cb4 (diff)
downloadpoky-5ec80538bdea72cb13938eb3938b113f426815f1.tar.gz
selftest/reproducible: track unusued entries in the exclusion list
This helps with trimming down the list, and towards 100% reproducibility :) (From OE-Core rev: 857a8d8c619277ca0e40aa6c5c99793e6a019d84) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit da7a173d7a01524229c8515326465968a845e96f) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest')
-rw-r--r--meta/lib/oeqa/selftest/cases/reproducible.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index c023c92d5d..b331c3dedf 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -68,8 +68,8 @@ def is_excluded(package):
68 package_name = os.path.basename(package) 68 package_name = os.path.basename(package)
69 for i in exclude_packages: 69 for i in exclude_packages:
70 if package_name.startswith(i): 70 if package_name.startswith(i):
71 return True 71 return i
72 return False 72 return None
73 73
74MISSING = 'MISSING' 74MISSING = 'MISSING'
75DIFFERENT = 'DIFFERENT' 75DIFFERENT = 'DIFFERENT'
@@ -95,14 +95,17 @@ class PackageCompareResults(object):
95 self.different = [] 95 self.different = []
96 self.different_excluded = [] 96 self.different_excluded = []
97 self.same = [] 97 self.same = []
98 self.active_exclusions = set()
98 99
99 def add_result(self, r): 100 def add_result(self, r):
100 self.total.append(r) 101 self.total.append(r)
101 if r.status == MISSING: 102 if r.status == MISSING:
102 self.missing.append(r) 103 self.missing.append(r)
103 elif r.status == DIFFERENT: 104 elif r.status == DIFFERENT:
104 if is_excluded(r.reference): 105 exclusion = is_excluded(r.reference)
106 if exclusion:
105 self.different_excluded.append(r) 107 self.different_excluded.append(r)
108 self.active_exclusions.add(exclusion)
106 else: 109 else:
107 self.different.append(r) 110 self.different.append(r)
108 else: 111 else:
@@ -116,7 +119,10 @@ class PackageCompareResults(object):
116 self.same.sort() 119 self.same.sort()
117 120
118 def __str__(self): 121 def __str__(self):
119 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)) 122 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())
123
124 def unused_exclusions(self):
125 return set(exclude_packages) - self.active_exclusions
120 126
121def compare_file(reference, test, diffutils_sysroot): 127def compare_file(reference, test, diffutils_sysroot):
122 result = CompareResult() 128 result = CompareResult()