diff options
Diffstat (limited to 'meta/lib')
-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() |