diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-30 14:49:23 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-01 07:43:35 +0100 |
| commit | ff17f148785c3b24ff8069a4829cd3baffa43a9a (patch) | |
| tree | 54f7d0c96682742b222d21bfa891f684769625a6 | |
| parent | d8227648314c49c66b41657f256e51207654318a (diff) | |
| download | poky-ff17f148785c3b24ff8069a4829cd3baffa43a9a.tar.gz | |
oeqa/selftest/sstatetests: Add test that MACHINE doesn't change target sigs
When we change between two machines with the same tune, we shouldn't see
rebuilds of binaries. This adds a test for this using the qemux86copy
machine. We also extend the test to cover multilibs.
(From OE-Core rev: df49d7a0f80673e73f753e8650cd88a086e77245)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/lib/oeqa/selftest/sstatetests.py | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/sstatetests.py b/meta/lib/oeqa/selftest/sstatetests.py index 1940e662f8..9ccc7bb265 100644 --- a/meta/lib/oeqa/selftest/sstatetests.py +++ b/meta/lib/oeqa/selftest/sstatetests.py | |||
| @@ -329,4 +329,49 @@ MACHINE = \"qemuarm\" | |||
| 329 | files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2] | 329 | files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2] |
| 330 | self.maxDiff = None | 330 | self.maxDiff = None |
| 331 | self.assertItemsEqual(files1, files2) | 331 | self.assertItemsEqual(files1, files2) |
| 332 | 332 | ||
| 333 | def test_sstate_sametune_samesigs(self): | ||
| 334 | """ | ||
| 335 | The sstate checksums of two identical machines (using the same tune) should be the | ||
| 336 | same, apart from changes within the machine specific stamps directory. We use the | ||
| 337 | qemux86copy machine to test this. Also include multilibs in the test. | ||
| 338 | """ | ||
| 339 | |||
| 340 | topdir = get_bb_var('TOPDIR') | ||
| 341 | targetos = get_bb_var('TARGET_OS') | ||
| 342 | targetvendor = get_bb_var('TARGET_VENDOR') | ||
| 343 | self.write_config(""" | ||
| 344 | TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\" | ||
| 345 | MACHINE = \"qemux86\" | ||
| 346 | require conf/multilib.conf | ||
| 347 | MULTILIBS = "multilib:lib32" | ||
| 348 | DEFAULTTUNE_virtclass-multilib-lib32 = "x86" | ||
| 349 | """) | ||
| 350 | self.track_for_cleanup(topdir + "/tmp-sstatesamehash") | ||
| 351 | bitbake("world meta-toolchain -S none") | ||
| 352 | self.write_config(""" | ||
| 353 | TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\" | ||
| 354 | MACHINE = \"qemux86copy\" | ||
| 355 | require conf/multilib.conf | ||
| 356 | MULTILIBS = "multilib:lib32" | ||
| 357 | DEFAULTTUNE_virtclass-multilib-lib32 = "x86" | ||
| 358 | """) | ||
| 359 | self.track_for_cleanup(topdir + "/tmp-sstatesamehash2") | ||
| 360 | bitbake("world meta-toolchain -S none") | ||
| 361 | |||
| 362 | def get_files(d): | ||
| 363 | f = [] | ||
| 364 | for root, dirs, files in os.walk(d): | ||
| 365 | for name in files: | ||
| 366 | if "meta-environment" in root or "cross-canadian" in root: | ||
| 367 | continue | ||
| 368 | if "qemux86copy-" in root or "qemux86-" in root: | ||
| 369 | continue | ||
| 370 | if "do_build" not in name and "do_populate_sdk" not in name: | ||
| 371 | f.append(os.path.join(root, name)) | ||
| 372 | return f | ||
| 373 | files1 = get_files(topdir + "/tmp-sstatesamehash/stamps") | ||
| 374 | files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps") | ||
| 375 | files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2] | ||
| 376 | self.maxDiff = None | ||
| 377 | self.assertItemsEqual(files1, files2) | ||
