[oe-commits] [openembedded-core] 07/08: oeqa/selftest/cases/glibc.py: Rework and tag with toolchain-user/system
git at git.openembedded.org
git at git.openembedded.org
Sat Sep 7 13:11:38 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit fe80627ac2b767d97d75c2aa864e1fc2fc8b9635
Author: Nathan Rossi <nathan at nathanrossi.com>
AuthorDate: Sat Sep 7 12:55:06 2019 +0000
oeqa/selftest/cases/glibc.py: Rework and tag with toolchain-user/system
Rework the glibc execution into a common base class. Additionally tag
the tests with "toolchain-user" and "toolchain-system".
Signed-off-by: Nathan Rossi <nathan at nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/selftest/cases/glibc.py | 44 +++++++++++++++++++----------------
1 file changed, 24 insertions(+), 20 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/glibc.py b/meta/lib/oeqa/selftest/cases/glibc.py
index e13de87..ea0f79e 100644
--- a/meta/lib/oeqa/selftest/cases/glibc.py
+++ b/meta/lib/oeqa/selftest/cases/glibc.py
@@ -13,12 +13,8 @@ def parse_values(content):
yield i[len(v) + 2:].strip(), v
break
- at OETestTag("machine")
-class GlibcSelfTest(OESelftestTestCase):
- def test_glibc(self):
- self.glibc_run_check()
-
- def glibc_run_check(self, ssh = None):
+class GlibcSelfTestBase(OESelftestTestCase):
+ def run_check(self, ssh = None):
# configure ssh target
features = []
if ssh is not None:
@@ -40,25 +36,23 @@ class GlibcSelfTest(OESelftestTestCase):
for test, result in parse_values(f):
self.extraresults["ptestresult.{}.{}".format(ptestsuite, test)] = {"status" : result}
-class GlibcSelfTestSystemEmulated(GlibcSelfTest):
- default_installed_packages = [
- "glibc-charmaps",
- "libgcc",
- "libstdc++",
- "libatomic",
- "libgomp",
- # "python3",
- # "python3-pexpect",
- "nfs-utils",
- ]
-
- def glibc_run_check(self):
+ def run_check_emulated(self):
with contextlib.ExitStack() as s:
# use the base work dir, as the nfs mount, since the recipe directory may not exist
tmpdir = get_bb_var("BASE_WORKDIR")
nfsport, mountport = s.enter_context(unfs_server(tmpdir))
# build core-image-minimal with required packages
+ default_installed_packages = [
+ "glibc-charmaps",
+ "libgcc",
+ "libstdc++",
+ "libatomic",
+ "libgomp",
+ # "python3",
+ # "python3-pexpect",
+ "nfs-utils",
+ ]
features = []
features.append('IMAGE_FEATURES += "ssh-server-openssh"')
features.append('CORE_IMAGE_EXTRA_INSTALL += "{0}"'.format(" ".join(self.default_installed_packages)))
@@ -80,5 +74,15 @@ class GlibcSelfTestSystemEmulated(GlibcSelfTest):
if status != 0:
raise Exception("Failed to setup NFS mount on target ({})".format(repr(output)))
- super().glibc_run_check(ssh = qemu.ip)
+ self.run_check(ssh = qemu.ip)
+
+ at OETestTag("machine", "toolchain-user")
+class GlibcSelfTest(GlibcSelfTestBase):
+ def test_glibc(self):
+ self.run_check()
+
+ at OETestTag("machine", "toolchain-system")
+class GlibcSelfTestSystemEmulated(GlibcSelfTestBase):
+ def test_glibc(self):
+ self.run_check_emulated()
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list