summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/cases/reproducible.py16
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 7f74cec28f..f570958f80 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -78,8 +78,14 @@ def compare_file(reference, test, diffutils_sysroot):
78 return result 78 return result
79 79
80class ReproducibleTests(OESelftestTestCase): 80class ReproducibleTests(OESelftestTestCase):
81 # Test the reproducibility of whatever is built between sstate_targets and targets
82
81 package_classes = ['deb', 'ipk'] 83 package_classes = ['deb', 'ipk']
82 images = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline'] 84
85 # targets are the things we want to test the reproducibility of
86 targets = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline']
87 # sstate targets are things to pull from sstate to potentially cut build/debugging time
88 sstate_targets = []
83 save_results = False 89 save_results = False
84 if 'OEQA_DEBUGGING_SAVED_OUTPUT' in os.environ: 90 if 'OEQA_DEBUGGING_SAVED_OUTPUT' in os.environ:
85 save_results = os.environ['OEQA_DEBUGGING_SAVED_OUTPUT'] 91 save_results = os.environ['OEQA_DEBUGGING_SAVED_OUTPUT']
@@ -154,6 +160,11 @@ class ReproducibleTests(OESelftestTestCase):
154 tmpdir=tmpdir) 160 tmpdir=tmpdir)
155 161
156 if not use_sstate: 162 if not use_sstate:
163 if self.sstate_targets:
164 self.logger.info("Building prebuild for %s (sstate allowed)..." % (name))
165 self.write_config(config)
166 bitbake(' '.join(self.sstate_targets))
167
157 # This config fragment will disable using shared and the sstate 168 # This config fragment will disable using shared and the sstate
158 # mirror, forcing a complete build from scratch 169 # mirror, forcing a complete build from scratch
159 config += textwrap.dedent('''\ 170 config += textwrap.dedent('''\
@@ -164,7 +175,8 @@ class ReproducibleTests(OESelftestTestCase):
164 self.logger.info("Building %s (sstate%s allowed)..." % (name, '' if use_sstate else ' NOT')) 175 self.logger.info("Building %s (sstate%s allowed)..." % (name, '' if use_sstate else ' NOT'))
165 self.write_config(config) 176 self.write_config(config)
166 d = get_bb_vars(capture_vars) 177 d = get_bb_vars(capture_vars)
167 bitbake(' '.join(self.images)) 178 # targets used to be called images
179 bitbake(' '.join(getattr(self, 'images', self.targets)))
168 return d 180 return d
169 181
170 def test_reproducible_builds(self): 182 def test_reproducible_builds(self):