diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-02-12 20:35:10 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-13 17:01:12 +0000 |
commit | 84c37fad4c7e559d5ebeec34623d4106a47c1164 (patch) | |
tree | 03045ce0c23d5abf54c8e1b81bd80706532a99fe /meta/lib/oeqa | |
parent | 900c8abe1cf7bdf36fc3cb45afcc26b56b574543 (diff) | |
download | poky-84c37fad4c7e559d5ebeec34623d4106a47c1164.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: da7a173d7a01524229c8515326465968a845e96f)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/reproducible.py | 14 |
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 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): | |||
79 | package_name = os.path.basename(package) | 79 | package_name = os.path.basename(package) |
80 | for i in exclude_packages: | 80 | for i in exclude_packages: |
81 | if package_name.startswith(i): | 81 | if package_name.startswith(i): |
82 | return True | 82 | return i |
83 | return False | 83 | return None |
84 | 84 | ||
85 | MISSING = 'MISSING' | 85 | MISSING = 'MISSING' |
86 | DIFFERENT = 'DIFFERENT' | 86 | DIFFERENT = 'DIFFERENT' |
@@ -106,14 +106,17 @@ class PackageCompareResults(object): | |||
106 | self.different = [] | 106 | self.different = [] |
107 | self.different_excluded = [] | 107 | self.different_excluded = [] |
108 | self.same = [] | 108 | self.same = [] |
109 | self.active_exclusions = set() | ||
109 | 110 | ||
110 | def add_result(self, r): | 111 | def add_result(self, r): |
111 | self.total.append(r) | 112 | self.total.append(r) |
112 | if r.status == MISSING: | 113 | if r.status == MISSING: |
113 | self.missing.append(r) | 114 | self.missing.append(r) |
114 | elif r.status == DIFFERENT: | 115 | elif r.status == DIFFERENT: |
115 | if is_excluded(r.reference): | 116 | exclusion = is_excluded(r.reference) |
117 | if exclusion: | ||
116 | self.different_excluded.append(r) | 118 | self.different_excluded.append(r) |
119 | self.active_exclusions.add(exclusion) | ||
117 | else: | 120 | else: |
118 | self.different.append(r) | 121 | self.different.append(r) |
119 | else: | 122 | else: |
@@ -127,7 +130,10 @@ class PackageCompareResults(object): | |||
127 | self.same.sort() | 130 | self.same.sort() |
128 | 131 | ||
129 | def __str__(self): | 132 | def __str__(self): |
130 | 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)) | 133 | 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()) |
134 | |||
135 | def unused_exclusions(self): | ||
136 | return set(exclude_packages) - self.active_exclusions | ||
131 | 137 | ||
132 | def compare_file(reference, test, diffutils_sysroot): | 138 | def compare_file(reference, test, diffutils_sysroot): |
133 | result = CompareResult() | 139 | result = CompareResult() |