[OE-core][kirkstone 29/38] selftest/reproducible: Clean up pathnames

Steve Sakoman
2024-12-04T17:55:15Z

From: Richard Purdie <richard.purdie@linuxfoundation.org>

There are several problems with these paths. Firstly they contain full
system paths which depend upon where the test was run. These are pretty
pointless and just take up a lot of space making the results files large.

Secondly, they contain the same path twice. The reference and target path
will always be the same thing in two different locations.

Strip off the prefix and remove the duplication. This does change the output
data but that can't really be avoided. It does shrink the results data and makes
it more readable.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 81a44de36e864b08687451fd85aeba7c529fd7f7)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
meta/lib/oeqa/selftest/cases/reproducible.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index df7d9cc159..08c23227d3 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -191,7 +191,7 @@ class ReproducibleTests(OESelftestTestCase):

def write_package_list(self, package_class, name, packages):
self.extraresults['reproducible']['files'].setdefault(package_class, {})[name] = [
- {'reference': p.reference, 'test': p.test} for p in packages]
+ p.reference.split("/./")[1] for p in packages]

def copy_file(self, source, dest):
bb.utils.mkdirhier(os.path.dirname(dest))
--
2.34.1