summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest')
-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)