diff mbox series

[1/2] oeqa/selftest/reproducible: Add OEQA_REPRODUCIBLE_EXCLUDED_PACKAGES support

Message ID 20231114233220.2567795-1-richard.purdie@linuxfoundation.org
State New
Headers show
Series [1/2] oeqa/selftest/reproducible: Add OEQA_REPRODUCIBLE_EXCLUDED_PACKAGES support | expand

Commit Message

Richard Purdie Nov. 14, 2023, 11:32 p.m. UTC
Add a new variable to the reproducible test so the list of excluded
packages can be extended from the metadata. This might be useful for
meta-openembedded for example so known issues can be excluded and
therefore new regressions become more visible.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/lib/oeqa/selftest/cases/reproducible.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Yoann Congal Nov. 14, 2023, 11:59 p.m. UTC | #1
Hi Richard,

Le mer. 15 nov. 2023 à 00:32, Richard Purdie
<richard.purdie@linuxfoundation.org> a écrit :
>
> Add a new variable to the reproducible test so the list of excluded
> packages can be extended from the metadata. This might be useful for
> meta-openembedded for example so known issues can be excluded and
> therefore new regressions become more visible.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  meta/lib/oeqa/selftest/cases/reproducible.py | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)


FYI, this does clash with the patch I've sent from your work on this :
[PATCH] selftest/reproducible: Allow packages exclusion via config
https://lists.openembedded.org/g/openembedded-core/message/190526
diff mbox series

Patch

diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index 84c6c3a05ff..dac0dce3467 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -45,13 +45,14 @@  class CompareResult(object):
         return (self.status, self.test) < (other.status, other.test)
 
 class PackageCompareResults(object):
-    def __init__(self):
+    def __init__(self, exclusions):
         self.total = []
         self.missing = []
         self.different = []
         self.different_excluded = []
         self.same = []
         self.active_exclusions = set()
+        exclude_packages.extend((exclusions or "").split())
 
     def add_result(self, r):
         self.total.append(r)
@@ -153,7 +154,7 @@  class ReproducibleTests(OESelftestTestCase):
 
     def setUpLocal(self):
         super().setUpLocal()
-        needed_vars = ['TOPDIR', 'TARGET_PREFIX', 'BB_NUMBER_THREADS', 'BB_HASHSERVE', 'OEQA_REPRODUCIBLE_TEST_PACKAGE', 'OEQA_REPRODUCIBLE_TEST_TARGET', 'OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS']
+        needed_vars = ['TOPDIR', 'TARGET_PREFIX', 'BB_NUMBER_THREADS', 'BB_HASHSERVE', 'OEQA_REPRODUCIBLE_TEST_PACKAGE', 'OEQA_REPRODUCIBLE_TEST_TARGET', 'OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS', 'OEQA_REPRODUCIBLE_EXCLUDED_PACKAGES']
         bb_vars = get_bb_vars(needed_vars)
         for v in needed_vars:
             setattr(self, v.lower(), bb_vars[v])
@@ -175,7 +176,7 @@  class ReproducibleTests(OESelftestTestCase):
         self.extraresults['reproducible.rawlogs']['log'] += msg
 
     def compare_packages(self, reference_dir, test_dir, diffutils_sysroot):
-        result = PackageCompareResults()
+        result = PackageCompareResults(self.oeqa_reproducible_excluded_packages)
 
         old_cwd = os.getcwd()
         try: