diff options
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/reproducible.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py index 2b8b4e9e88..ebfa88fbc5 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 | |||
| 8 | import functools | 8 | import functools |
| 9 | import multiprocessing | 9 | import multiprocessing |
| 10 | import textwrap | 10 | import textwrap |
| 11 | import json | ||
| 11 | import unittest | 12 | import unittest |
| 12 | 13 | ||
| 13 | MISSING = 'MISSING' | 14 | MISSING = 'MISSING' |
| @@ -86,6 +87,7 @@ class ReproducibleTests(OESelftestTestCase): | |||
| 86 | self.extras = self.tc.extraresults | 87 | self.extras = self.tc.extraresults |
| 87 | 88 | ||
| 88 | self.extras.setdefault('reproducible.rawlogs', {})['log'] = '' | 89 | self.extras.setdefault('reproducible.rawlogs', {})['log'] = '' |
| 90 | self.extras.setdefault('reproducible', {}).setdefault('files', {}) | ||
| 89 | 91 | ||
| 90 | def append_to_log(self, msg): | 92 | def append_to_log(self, msg): |
| 91 | self.extras['reproducible.rawlogs']['log'] += msg | 93 | self.extras['reproducible.rawlogs']['log'] += msg |
| @@ -114,6 +116,10 @@ class ReproducibleTests(OESelftestTestCase): | |||
| 114 | result.sort() | 116 | result.sort() |
| 115 | return result | 117 | return result |
| 116 | 118 | ||
| 119 | def write_package_list(self, package_class, name, packages): | ||
| 120 | self.extras['reproducible']['files'].setdefault(package_class, {})[name] = [ | ||
| 121 | {'reference': p.reference, 'test': p.test} for p in packages] | ||
| 122 | |||
| 117 | @unittest.skip("Reproducible builds do not yet pass") | 123 | @unittest.skip("Reproducible builds do not yet pass") |
| 118 | def test_reproducible_builds(self): | 124 | def test_reproducible_builds(self): |
| 119 | capture_vars = ['DEPLOY_DIR_' + c.upper() for c in self.package_classes] | 125 | capture_vars = ['DEPLOY_DIR_' + c.upper() for c in self.package_classes] |
| @@ -162,6 +168,10 @@ class ReproducibleTests(OESelftestTestCase): | |||
| 162 | 168 | ||
| 163 | self.append_to_log('\n'.join("%s: %s" % (r.status, r.test) for r in result.total)) | 169 | self.append_to_log('\n'.join("%s: %s" % (r.status, r.test) for r in result.total)) |
| 164 | 170 | ||
| 171 | self.write_package_list(package_class, 'missing', result.missing) | ||
| 172 | self.write_package_list(package_class, 'different', result.different) | ||
| 173 | self.write_package_list(package_class, 'same', result.same) | ||
| 174 | |||
| 165 | if result.missing or result.different: | 175 | if result.missing or result.different: |
| 166 | self.fail("The following %s packages are missing or different: %s" % | 176 | self.fail("The following %s packages are missing or different: %s" % |
| 167 | (c, ' '.join(r.test for r in (result.missing + result.different)))) | 177 | (c, ' '.join(r.test for r in (result.missing + result.different)))) |
