diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-11-15 09:44:41 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-11-15 15:42:44 +0000 |
commit | abeea5c797a628d676f07edc7177c461e75588b7 (patch) | |
tree | c7d631cf028d063f07d90502c34901683ba41fe3 /meta/lib/oeqa/selftest/cases/reproducible.py | |
parent | cc2980ab7f3100d0e64aa66debd81f7a5d9fa70c (diff) | |
download | poky-abeea5c797a628d676f07edc7177c461e75588b7.tar.gz |
selftest/reproducible: Allow packages exclusion via config
OEQA_REPRODUCIBLE_EXCLUDED_PACKAGES can be used to prevent known
not-reproducible packages to make the reproducible test fail.
For example, in local.conf:
OEQA_REPRODUCIBLE_EXCLUDED_PACKAGES = "example-not-reproducible"
To quote the original exclusion commit (4864764667097b32a3ee1935e2c52df732d55632)
> selftest/reproducible: add an exclusion list for items that are not yet reproducible
> [...]
> Non-reproducible excluded packages are not given to diffoscope and do not cause a
> failure, but still saved side-by-side with non-reproducible failing ones to make
> investigation easier.
NB: Patch was written by Richard with small fixes and a commit message
from Yoann.
(From OE-Core rev: bea0e3f5b8b383ae8590b874a5878f67832d6929)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/reproducible.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/reproducible.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py index db24bf24d1..029b6af331 100644 --- a/meta/lib/oeqa/selftest/cases/reproducible.py +++ b/meta/lib/oeqa/selftest/cases/reproducible.py | |||
@@ -45,13 +45,14 @@ class CompareResult(object): | |||
45 | return (self.status, self.test) < (other.status, other.test) | 45 | return (self.status, self.test) < (other.status, other.test) |
46 | 46 | ||
47 | class PackageCompareResults(object): | 47 | class PackageCompareResults(object): |
48 | def __init__(self): | 48 | def __init__(self, exclusions): |
49 | self.total = [] | 49 | self.total = [] |
50 | self.missing = [] | 50 | self.missing = [] |
51 | self.different = [] | 51 | self.different = [] |
52 | self.different_excluded = [] | 52 | self.different_excluded = [] |
53 | self.same = [] | 53 | self.same = [] |
54 | self.active_exclusions = set() | 54 | self.active_exclusions = set() |
55 | exclude_packages.extend((exclusions or "").split()) | ||
55 | 56 | ||
56 | def add_result(self, r): | 57 | def add_result(self, r): |
57 | self.total.append(r) | 58 | self.total.append(r) |
@@ -161,6 +162,7 @@ class ReproducibleTests(OESelftestTestCase): | |||
161 | 'OEQA_REPRODUCIBLE_TEST_PACKAGE', | 162 | 'OEQA_REPRODUCIBLE_TEST_PACKAGE', |
162 | 'OEQA_REPRODUCIBLE_TEST_TARGET', | 163 | 'OEQA_REPRODUCIBLE_TEST_TARGET', |
163 | 'OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS', | 164 | 'OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS', |
165 | 'OEQA_REPRODUCIBLE_EXCLUDED_PACKAGES', | ||
164 | ] | 166 | ] |
165 | bb_vars = get_bb_vars(needed_vars) | 167 | bb_vars = get_bb_vars(needed_vars) |
166 | for v in needed_vars: | 168 | for v in needed_vars: |
@@ -183,7 +185,7 @@ class ReproducibleTests(OESelftestTestCase): | |||
183 | self.extraresults['reproducible.rawlogs']['log'] += msg | 185 | self.extraresults['reproducible.rawlogs']['log'] += msg |
184 | 186 | ||
185 | def compare_packages(self, reference_dir, test_dir, diffutils_sysroot): | 187 | def compare_packages(self, reference_dir, test_dir, diffutils_sysroot): |
186 | result = PackageCompareResults() | 188 | result = PackageCompareResults(self.oeqa_reproducible_excluded_packages) |
187 | 189 | ||
188 | old_cwd = os.getcwd() | 190 | old_cwd = os.getcwd() |
189 | try: | 191 | try: |