[oe-commits] [openembedded-core] 12/24: oeqa: reproducible: Record packages in test results

git at git.openembedded.org git at git.openembedded.org
Thu Aug 29 13:21:57 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 559566e1ebf6a054b25dc93155804cc42b03c156
Author: Joshua Watt <jpewhacker at gmail.com>
AuthorDate: Tue Aug 27 14:33:48 2019 -0500

    oeqa: reproducible: Record packages in test results
    
    Records the results of the reproducibility analysis in the JSON test
    results file. This makes it easier to do post-test analysis on the
    packages.
    
    [YOCTO #13324]
    
    Signed-off-by: Joshua Watt <JPEWhacker at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oeqa/selftest/cases/reproducible.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index 2b8b4e9..ebfa88f 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -8,6 +8,7 @@ from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
 import functools
 import multiprocessing
 import textwrap
+import json
 import unittest
 
 MISSING = 'MISSING'
@@ -86,6 +87,7 @@ class ReproducibleTests(OESelftestTestCase):
         self.extras = self.tc.extraresults
 
         self.extras.setdefault('reproducible.rawlogs', {})['log'] = ''
+        self.extras.setdefault('reproducible', {}).setdefault('files', {})
 
     def append_to_log(self, msg):
         self.extras['reproducible.rawlogs']['log'] += msg
@@ -114,6 +116,10 @@ class ReproducibleTests(OESelftestTestCase):
         result.sort()
         return result
 
+    def write_package_list(self, package_class, name, packages):
+        self.extras['reproducible']['files'].setdefault(package_class, {})[name] = [
+                {'reference': p.reference, 'test': p.test} for p in packages]
+
     @unittest.skip("Reproducible builds do not yet pass")
     def test_reproducible_builds(self):
         capture_vars = ['DEPLOY_DIR_' + c.upper() for c in self.package_classes]
@@ -162,6 +168,10 @@ class ReproducibleTests(OESelftestTestCase):
 
                 self.append_to_log('\n'.join("%s: %s" % (r.status, r.test) for r in result.total))
 
+                self.write_package_list(package_class, 'missing', result.missing)
+                self.write_package_list(package_class, 'different', result.different)
+                self.write_package_list(package_class, 'same', result.same)
+
                 if result.missing or result.different:
                     self.fail("The following %s packages are missing or different: %s" %
                             (c, ' '.join(r.test for r in (result.missing + result.different))))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list