summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-04-20 17:19:11 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-04-26 13:58:45 +0100
commit24ca62b3c1fd404b67d549b29aeeacf913e6dc86 (patch)
treee6cb0f85444392b69a140b58e6f52e13c0e40f1c /meta
parent920beaaeef62b558e046f32c8ef0332250969ef1 (diff)
downloadopenembedded-core-contrib-24ca62b3c1fd404b67d549b29aeeacf913e6dc86.tar.gz
oeqa/selftest: Add test for conflicting sysroot provider
sysroot-test depends on virtual/sysroot-test which we build for one machine, switch machine, switch provider of virtual/sysroot-test and check that the sysroot is correctly cleaned up. The files in the two providers overlap so can cause errors if the sysroot code doesn't function correctly. Yes, sysroot-test should be machine specific really to avoid this, however the sysroot cleanup should also work. This adds a test for bug: [YOCTO #13702] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/selftest/cases/sysroot.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/sysroot.py b/meta/lib/oeqa/selftest/cases/sysroot.py
new file mode 100644
index 0000000000..6e34927c90
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/sysroot.py
@@ -0,0 +1,37 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import uuid
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake
+
+class SysrootTests(OESelftestTestCase):
+ def test_sysroot_cleanup(self):
+ """
+ Build sysroot test which depends on virtual/sysroot-test for one machine,
+ switch machine, switch provider of virtual/sysroot-test and check that the
+ sysroot is correctly cleaned up. The files in the two providers overlap
+ so can cause errors if the sysroot code doesn't function correctly.
+ Yes, sysroot-test should be machine specific really to avoid this, however
+ the sysroot cleanup should also work [YOCTO #13702].
+ """
+
+ uuid1 = uuid.uuid4()
+ uuid2 = uuid.uuid4()
+
+ self.write_config("""
+PREFERRED_PROVIDER_virtual/sysroot-test = "sysroot-test-arch1"
+MACHINE = "qemux86"
+TESTSTRING_pn-sysroot-test-arch1 = "%s"
+TESTSTRING_pn-sysroot-test-arch2 = "%s"
+""" % (uuid1, uuid2))
+ bitbake("sysroot-test")
+ self.write_config("""
+PREFERRED_PROVIDER_virtual/sysroot-test = "sysroot-test-arch2"
+MACHINE = "qemux86copy"
+TESTSTRING_pn-sysroot-test-arch1 = "%s"
+TESTSTRING_pn-sysroot-test-arch2 = "%s"
+""" % (uuid1, uuid2))
+ bitbake("sysroot-test")