summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Crowe <mac@mcrowe.com>2019-12-17 08:02:25 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-30 23:39:10 +0000
commitc1ad30fd80740701f7c264381fc2e3e34460927f (patch)
tree98a32c5a954c49d441f8aa10840a836e8f9da761
parent30c8fbf7798f55193800ed83be92255484ae2709 (diff)
downloadpoky-c1ad30fd80740701f7c264381fc2e3e34460927f.tar.gz
multilib.conf: Ensure that RECIPE_SYSROOT is unchanged for native
Ensure that RECIPE_SYSROOT is the same for -native recipes whether multilib.conf is included or not. Without this change task signatures for -native recipes change when switching between MACHINEs that require multilib.conf and those that don't. This fix was one of the ones suggested by Khem Raj in http://lists.openembedded.org/pipermail/openembedded-core/2019-December/290303.html Add test_sstate_multilib_or_not_native_samesigs test case to sstatetests.py to ensure that this stays fixed. (From OE-Core rev: aa05f1ded71366b86eda7fce24d8b5395e85ada2) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/conf/multilib.conf1
-rw-r--r--meta/lib/oeqa/selftest/cases/sstatetests.py40
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
index cfed3fbbd0..58f2ac5c86 100644
--- a/meta/conf/multilib.conf
+++ b/meta/conf/multilib.conf
@@ -9,6 +9,7 @@ MULTILIBS ??= "multilib:lib32"
9STAGING_DIR_HOST = "${WORKDIR}/${MLPREFIX}recipe-sysroot" 9STAGING_DIR_HOST = "${WORKDIR}/${MLPREFIX}recipe-sysroot"
10STAGING_DIR_TARGET = "${WORKDIR}/${MLPREFIX}recipe-sysroot" 10STAGING_DIR_TARGET = "${WORKDIR}/${MLPREFIX}recipe-sysroot"
11RECIPE_SYSROOT = "${WORKDIR}/${MLPREFIX}recipe-sysroot" 11RECIPE_SYSROOT = "${WORKDIR}/${MLPREFIX}recipe-sysroot"
12RECIPE_SYSROOT_class-native = "${WORKDIR}/recipe-sysroot"
12 13
13INHERIT += "multilib_global" 14INHERIT += "multilib_global"
14 15
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py
index 6757a0ec68..9adb511960 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -446,6 +446,46 @@ BB_SIGNATURE_HANDLER = "OEBasicHash"
446 self.assertCountEqual(files1, files2) 446 self.assertCountEqual(files1, files2)
447 447
448 448
449 def test_sstate_multilib_or_not_native_samesigs(self):
450 """The sstate checksums of two native recipes (and their dependencies)
451 where the target is using multilib in one but not the other
452 should be the same. We use the qemux86copy machine to test
453 this.
454 """
455
456 self.write_config("""
457TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
458TCLIBCAPPEND = \"\"
459MACHINE = \"qemux86\"
460require conf/multilib.conf
461MULTILIBS = "multilib:lib32"
462DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
463BB_SIGNATURE_HANDLER = "OEBasicHash"
464""")
465 self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash")
466 bitbake("binutils-native -S none")
467 self.write_config("""
468TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
469TCLIBCAPPEND = \"\"
470MACHINE = \"qemux86copy\"
471BB_SIGNATURE_HANDLER = "OEBasicHash"
472""")
473 self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2")
474 bitbake("binutils-native -S none")
475
476 def get_files(d):
477 f = []
478 for root, dirs, files in os.walk(d):
479 for name in files:
480 f.append(os.path.join(root, name))
481 return f
482 files1 = get_files(self.topdir + "/tmp-sstatesamehash/stamps")
483 files2 = get_files(self.topdir + "/tmp-sstatesamehash2/stamps")
484 files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2]
485 self.maxDiff = None
486 self.assertCountEqual(files1, files2)
487
488
449 def test_sstate_noop_samesigs(self): 489 def test_sstate_noop_samesigs(self):
450 """ 490 """
451 The sstate checksums of two builds with these variables changed or 491 The sstate checksums of two builds with these variables changed or