summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-30 14:49:23 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-01 07:43:35 +0100
commitff17f148785c3b24ff8069a4829cd3baffa43a9a (patch)
tree54f7d0c96682742b222d21bfa891f684769625a6 /meta/lib
parentd8227648314c49c66b41657f256e51207654318a (diff)
downloadpoky-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>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/sstatetests.py47
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("""
344TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
345MACHINE = \"qemux86\"
346require conf/multilib.conf
347MULTILIBS = "multilib:lib32"
348DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
349""")
350 self.track_for_cleanup(topdir + "/tmp-sstatesamehash")
351 bitbake("world meta-toolchain -S none")
352 self.write_config("""
353TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
354MACHINE = \"qemux86copy\"
355require conf/multilib.conf
356MULTILIBS = "multilib:lib32"
357DEFAULTTUNE_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)