diff options
| -rw-r--r-- | meta/lib/oeqa/selftest/sstatetests.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/sstatetests.py b/meta/lib/oeqa/selftest/sstatetests.py index 0a761671a0..1ce8773ff7 100644 --- a/meta/lib/oeqa/selftest/sstatetests.py +++ b/meta/lib/oeqa/selftest/sstatetests.py | |||
| @@ -272,3 +272,37 @@ NATIVELSBSTRING = \"DistroB\" | |||
| 272 | files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2] | 272 | files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2] |
| 273 | self.assertItemsEqual(files1, files2) | 273 | self.assertItemsEqual(files1, files2) |
| 274 | 274 | ||
| 275 | def test_sstate_allarch_samesigs(self): | ||
| 276 | """ | ||
| 277 | The sstate checksums off allarch packages should be independent of whichever | ||
| 278 | MACHINE is set. Check this using bitbake -S. | ||
| 279 | """ | ||
| 280 | |||
| 281 | topdir = get_bb_var('TOPDIR') | ||
| 282 | targetos = get_bb_var('TARGET_OS') | ||
| 283 | targetvendor = get_bb_var('TARGET_VENDOR') | ||
| 284 | self.write_config(""" | ||
| 285 | TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\" | ||
| 286 | MACHINE = \"qemux86\" | ||
| 287 | """) | ||
| 288 | self.track_for_cleanup(topdir + "/tmp-sstatesamehash") | ||
| 289 | bitbake("world -S none") | ||
| 290 | self.write_config(""" | ||
| 291 | TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\" | ||
| 292 | MACHINE = \"qemuarm\" | ||
| 293 | """) | ||
| 294 | self.track_for_cleanup(topdir + "/tmp-sstatesamehash2") | ||
| 295 | bitbake("world -S none") | ||
| 296 | |||
| 297 | def get_files(d): | ||
| 298 | f = [] | ||
| 299 | for root, dirs, files in os.walk(d): | ||
| 300 | for name in files: | ||
| 301 | if "do_build" not in name: | ||
| 302 | f.append(os.path.join(root, name)) | ||
| 303 | return f | ||
| 304 | files1 = get_files(topdir + "/tmp-sstatesamehash/stamps/all" + targetvendor + "-" + targetos) | ||
| 305 | files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps/all" + targetvendor + "-" + targetos) | ||
| 306 | files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2] | ||
| 307 | self.maxDiff = None | ||
| 308 | self.assertItemsEqual(files1, files2) | ||
