diff options
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/archiver.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/archiver.py b/meta/lib/oeqa/selftest/cases/archiver.py index ffdea832be..3fa59fff51 100644 --- a/meta/lib/oeqa/selftest/cases/archiver.py +++ b/meta/lib/oeqa/selftest/cases/archiver.py | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | import os | 7 | import os |
| 8 | import glob | 8 | import glob |
| 9 | import re | ||
| 9 | from oeqa.utils.commands import bitbake, get_bb_vars | 10 | from oeqa.utils.commands import bitbake, get_bb_vars |
| 10 | from oeqa.selftest.case import OESelftestTestCase | 11 | from oeqa.selftest.case import OESelftestTestCase |
| 11 | 12 | ||
| @@ -119,7 +120,38 @@ class Archiver(OESelftestTestCase): | |||
| 119 | excluded_present = len(glob.glob(src_path_target + '/%s-*/*' % target_recipes[1])) | 120 | excluded_present = len(glob.glob(src_path_target + '/%s-*/*' % target_recipes[1])) |
| 120 | self.assertFalse(excluded_present, 'Recipe %s was not excluded.' % target_recipes[1]) | 121 | self.assertFalse(excluded_present, 'Recipe %s was not excluded.' % target_recipes[1]) |
| 121 | 122 | ||
| 123 | def test_archiver_multiconfig_shared_unpack_and_patch(self): | ||
| 124 | """ | ||
| 125 | Test that shared recipes in original mode with diff enabled works in multiconfig, | ||
| 126 | otherwise it will not build when using the same TMP dir. | ||
| 127 | """ | ||
| 128 | |||
| 129 | features = 'BBMULTICONFIG = "mc1 mc2"\n' | ||
| 130 | features += 'INHERIT += "archiver"\n' | ||
| 131 | features += 'ARCHIVER_MODE[src] = "original"\n' | ||
| 132 | features += 'ARCHIVER_MODE[diff] = "1"\n' | ||
| 133 | self.write_config(features) | ||
| 122 | 134 | ||
| 135 | # We can use any machine in multiconfig as long as they are different | ||
| 136 | self.write_config('MACHINE = "qemuarm"\n', 'mc1') | ||
| 137 | self.write_config('MACHINE = "qemux86"\n', 'mc2') | ||
| 138 | |||
| 139 | task = 'do_unpack_and_patch' | ||
| 140 | # Use gcc-source as it is a shared recipe (appends the pv to the pn) | ||
| 141 | pn = 'gcc-source-%s' % get_bb_vars(['PV'], 'gcc')['PV'] | ||
| 142 | |||
| 143 | # Generate the tasks signatures | ||
| 144 | bitbake('mc:mc1:%s mc:mc2:%s -c %s -S none' % (pn, pn, task)) | ||
| 145 | |||
| 146 | # Check the tasks signatures | ||
| 147 | # To be machine agnostic the tasks needs to generate the same signature for each machine | ||
| 148 | locked_sigs_inc = "%s/locked-sigs.inc" % self.builddir | ||
| 149 | locked_sigs = open(locked_sigs_inc).read() | ||
| 150 | task_sigs = re.findall(r"%s:%s:.*" % (pn, task), locked_sigs) | ||
| 151 | uniq_sigs = set(task_sigs) | ||
| 152 | self.assertFalse(len(uniq_sigs) - 1, \ | ||
| 153 | 'The task "%s" of the recipe "%s" has different signatures in "%s" for each machine in multiconfig' \ | ||
| 154 | % (task, pn, locked_sigs_inc)) | ||
| 123 | 155 | ||
| 124 | def test_archiver_srpm_mode(self): | 156 | def test_archiver_srpm_mode(self): |
| 125 | """ | 157 | """ |
