diff options
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/reproducible.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py index f2d9f95292..bbc5c0d8a4 100644 --- a/meta/lib/oeqa/selftest/cases/reproducible.py +++ b/meta/lib/oeqa/selftest/cases/reproducible.py | |||
@@ -150,8 +150,14 @@ class DiffoscopeTests(OESelftestTestCase): | |||
150 | self.assertTrue(os.path.exists(os.path.join(tmpdir, 'index.html')), "HTML index not found!") | 150 | self.assertTrue(os.path.exists(os.path.join(tmpdir, 'index.html')), "HTML index not found!") |
151 | 151 | ||
152 | class ReproducibleTests(OESelftestTestCase): | 152 | class ReproducibleTests(OESelftestTestCase): |
153 | # Test the reproducibility of whatever is built between sstate_targets and targets | ||
154 | |||
153 | package_classes = ['deb', 'ipk', 'rpm'] | 155 | package_classes = ['deb', 'ipk', 'rpm'] |
154 | images = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline', 'world'] | 156 | |
157 | # targets are the things we want to test the reproducibility of | ||
158 | targets = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline', 'world'] | ||
159 | # sstate targets are things to pull from sstate to potentially cut build/debugging time | ||
160 | sstate_targets = [] | ||
155 | save_results = False | 161 | save_results = False |
156 | if 'OEQA_DEBUGGING_SAVED_OUTPUT' in os.environ: | 162 | if 'OEQA_DEBUGGING_SAVED_OUTPUT' in os.environ: |
157 | save_results = os.environ['OEQA_DEBUGGING_SAVED_OUTPUT'] | 163 | save_results = os.environ['OEQA_DEBUGGING_SAVED_OUTPUT'] |
@@ -232,6 +238,11 @@ class ReproducibleTests(OESelftestTestCase): | |||
232 | tmpdir=tmpdir) | 238 | tmpdir=tmpdir) |
233 | 239 | ||
234 | if not use_sstate: | 240 | if not use_sstate: |
241 | if self.sstate_targets: | ||
242 | self.logger.info("Building prebuild for %s (sstate allowed)..." % (name)) | ||
243 | self.write_config(config) | ||
244 | bitbake(' '.join(self.sstate_targets)) | ||
245 | |||
235 | # This config fragment will disable using shared and the sstate | 246 | # This config fragment will disable using shared and the sstate |
236 | # mirror, forcing a complete build from scratch | 247 | # mirror, forcing a complete build from scratch |
237 | config += textwrap.dedent('''\ | 248 | config += textwrap.dedent('''\ |
@@ -242,7 +253,8 @@ class ReproducibleTests(OESelftestTestCase): | |||
242 | self.logger.info("Building %s (sstate%s allowed)..." % (name, '' if use_sstate else ' NOT')) | 253 | self.logger.info("Building %s (sstate%s allowed)..." % (name, '' if use_sstate else ' NOT')) |
243 | self.write_config(config) | 254 | self.write_config(config) |
244 | d = get_bb_vars(capture_vars) | 255 | d = get_bb_vars(capture_vars) |
245 | bitbake(' '.join(self.images)) | 256 | # targets used to be called images |
257 | bitbake(' '.join(getattr(self, 'images', self.targets))) | ||
246 | return d | 258 | return d |
247 | 259 | ||
248 | def test_reproducible_builds(self): | 260 | def test_reproducible_builds(self): |