From: Nathan Rossi <nathan@nathanrossi.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 6/7] oeqa/selftest/cases/gcc.py: Split into classes for parallelism
Date: Sat, 07 Sep 2019 12:55:06 +0000 [thread overview]
Message-ID: <20190907125506.17536-6-nathan@nathanrossi.com> (raw)
In-Reply-To: <20190907125506.17536-1-nathan@nathanrossi.com>
Split the gcc selftest cases into multiple classes one for each test.
This is done in order to make it easy to execute multiple gcc tests in
parallel when using oe-selftest with the '-j' arg.
Additionally tag the user tests with "toolchain-user" and the system
emulation (qemu system) tests with "toolchain-system".
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
meta/lib/oeqa/selftest/cases/gcc.py | 99 ++++++++++++++++++++++++++-----------
1 file changed, 70 insertions(+), 29 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/gcc.py b/meta/lib/oeqa/selftest/cases/gcc.py
index d0f0ca06e7..6eafa41720 100644
--- a/meta/lib/oeqa/selftest/cases/gcc.py
+++ b/meta/lib/oeqa/selftest/cases/gcc.py
@@ -11,34 +11,13 @@ def parse_values(content):
yield i[len(v) + 2:].strip(), v
break
-@OETestTag("machine")
-class GccSelfTest(OESelftestTestCase):
- def gcc_runtime_check_skip(self, suite):
+class GccSelfTestBase(OESelftestTestCase):
+ def check_skip(self, suite):
targets = get_bb_var("RUNTIMETARGET", "gcc-runtime").split()
if suite not in targets:
self.skipTest("Target does not use {0}".format(suite))
- def test_cross_gcc(self):
- self.gcc_run_check("gcc", "g++")
-
- def test_libatomic(self):
- self.gcc_run_check("libatomic")
-
- def test_libgomp(self):
- self.gcc_run_check("libgomp")
-
- def test_libstdcxx(self):
- self.gcc_run_check("libstdc++-v3")
-
- def test_libssp(self):
- self.gcc_runtime_check_skip("libssp")
- self.gcc_run_check("libssp")
-
- def test_libitm(self):
- self.gcc_runtime_check_skip("libitm")
- self.gcc_run_check("libitm")
-
- def gcc_run_check(self, *suites, ssh = None):
+ def run_check(self, *suites, ssh = None):
targets = set()
for s in suites:
if s in ["gcc", "g++"]:
@@ -77,11 +56,9 @@ class GccSelfTest(OESelftestTestCase):
for test, result in parse_values(f):
self.extraresults["ptestresult.{}.{}".format(ptestsuite, test)] = {"status" : result}
-class GccSelfTestSystemEmulated(GccSelfTest):
- default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp"]
-
- def gcc_run_check(self, *args, **kwargs):
+ def run_check_emulated(self, *args, **kwargs):
# build core-image-minimal with required packages
+ default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp"]
features = []
features.append('IMAGE_FEATURES += "ssh-server-openssh"')
features.append('CORE_IMAGE_EXTRA_INSTALL += "{0}"'.format(" ".join(self.default_installed_packages)))
@@ -94,5 +71,69 @@ class GccSelfTestSystemEmulated(GccSelfTest):
status, _ = qemu.run("uname")
self.assertEqual(status, 0)
- return super().gcc_run_check(*args, **kwargs, ssh = qemu.ip)
+ return self.run_check(*args, **kwargs, ssh = qemu.ip)
+
+@OETestTag("machine", "toolchain-user")
+class GccCrossSelfTest(GccSelfTestBase):
+ def test_cross_gcc(self):
+ self.run_check("gcc", "g++")
+
+@OETestTag("machine", "toolchain-user")
+class GccLibAtomicSelfTest(GccSelfTestBase):
+ def test_libatomic(self):
+ self.run_check("libatomic")
+
+@OETestTag("machine", "toolchain-user")
+class GccLibGompSelfTest(GccSelfTestBase):
+ def test_libgomp(self):
+ self.run_check("libgomp")
+
+@OETestTag("machine", "toolchain-user")
+class GccLibStdCxxSelfTest(GccSelfTestBase):
+ def test_libstdcxx(self):
+ self.run_check("libstdc++-v3")
+
+@OETestTag("machine", "toolchain-user")
+class GccLibSspSelfTest(GccSelfTestBase):
+ def test_libssp(self):
+ self.check_skip("libssp")
+ self.run_check("libssp")
+
+@OETestTag("machine", "toolchain-user")
+class GccLibItmSelfTest(GccSelfTestBase):
+ def test_libitm(self):
+ self.check_skip("libitm")
+ self.run_check("libitm")
+
+@OETestTag("machine", "toolchain-system")
+class GccCrossSelfTestSystemEmulated(GccSelfTestBase):
+ def test_cross_gcc(self):
+ self.run_check_emulated("gcc", "g++")
+
+@OETestTag("machine", "toolchain-system")
+class GccLibAtomicSelfTestSystemEmulated(GccSelfTestBase):
+ def test_libatomic(self):
+ self.run_check_emulated("libatomic")
+
+@OETestTag("machine", "toolchain-system")
+class GccLibGompSelfTestSystemEmulated(GccSelfTestBase):
+ def test_libgomp(self):
+ self.run_check_emulated("libgomp")
+
+@OETestTag("machine", "toolchain-system")
+class GccLibStdCxxSelfTestSystemEmulated(GccSelfTestBase):
+ def test_libstdcxx(self):
+ self.run_check_emulated("libstdc++-v3")
+
+@OETestTag("machine", "toolchain-system")
+class GccLibSspSelfTestSystemEmulated(GccSelfTestBase):
+ def test_libssp(self):
+ self.check_skip("libssp")
+ self.run_check_emulated("libssp")
+
+@OETestTag("machine", "toolchain-system")
+class GccLibItmSelfTestSystemEmulated(GccSelfTestBase):
+ def test_libitm(self):
+ self.check_skip("libitm")
+ self.run_check_emulated("libitm")
---
2.23.0.rc1
next prev parent reply other threads:[~2019-09-07 12:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-07 12:55 [PATCH 1/7] oeqa/core/runner.py: Fix OETestTag listing Nathan Rossi
2019-09-07 12:55 ` [PATCH 5/7] oeqa/core/decorator: Fix super class modifying subclass tags Nathan Rossi
2019-09-07 12:55 ` [PATCH 3/7] oeqa/selftest: Use extraresults on self instead of self.tc Nathan Rossi
2019-09-07 12:55 ` Nathan Rossi [this message]
2019-09-07 12:55 ` [PATCH 4/7] oeqa/selftest/context.py: Change -t/-T args to be optional Nathan Rossi
2019-09-07 12:55 ` [PATCH 7/7] oeqa/selftest/cases/glibc.py: Rework and tag with toolchain-user/system Nathan Rossi
2019-09-07 12:55 ` [PATCH 2/7] oeqa/core: Implement proper extra result collection and serialization Nathan Rossi
2019-09-07 13:02 ` ✗ patchtest: failure for "oeqa/core/runner.py: Fix OETes..." and 6 more Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190907125506.17536-6-nathan@nathanrossi.com \
--to=nathan@nathanrossi.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox