diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2019-09-07 12:55:06 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-09-07 21:52:27 +0100 |
commit | 6a1b0c2003a0b4a1983f9494440e6ea02dc25585 (patch) | |
tree | 34329aa16f5aa02c2a154a674a1d23d75290b8b1 /meta/lib/oeqa/selftest/cases/glibc.py | |
parent | 0becf9c1fabb080a2481ebdacef6221f52301621 (diff) | |
download | openembedded-core-contrib-6a1b0c2003a0b4a1983f9494440e6ea02dc25585.tar.gz |
oeqa/selftest: Use extraresults on self instead of self.tc
In order to take advantage of multiprocess execution of tests the
extraresults must be passed through the TestResult. With changes to how
oeqa/core handles test cases the extraresults attribute of the testcase
is passed to the TestResult, with passing across process boundaries
handled automatically.
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/glibc.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/glibc.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/meta/lib/oeqa/selftest/cases/glibc.py b/meta/lib/oeqa/selftest/cases/glibc.py index 4d0c13131b..e13de87014 100644 --- a/meta/lib/oeqa/selftest/cases/glibc.py +++ b/meta/lib/oeqa/selftest/cases/glibc.py @@ -15,15 +15,6 @@ def parse_values(content): @OETestTag("machine") class GlibcSelfTest(OESelftestTestCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - if not hasattr(cls.tc, "extraresults"): - cls.tc.extraresults = {} - - if "ptestresult.sections" not in cls.tc.extraresults: - cls.tc.extraresults["ptestresult.sections"] = {} - def test_glibc(self): self.glibc_run_check() @@ -44,10 +35,10 @@ class GlibcSelfTest(OESelftestTestCase): builddir = get_bb_var("B", "glibc-testsuite") ptestsuite = "glibc-user" if ssh is None else "glibc" - self.tc.extraresults["ptestresult.sections"][ptestsuite] = {} + self.extraresults = {"ptestresult.sections" : {ptestsuite : {}}} with open(os.path.join(builddir, "tests.sum"), "r") as f: for test, result in parse_values(f): - self.tc.extraresults["ptestresult.{}.{}".format(ptestsuite, test)] = {"status" : result} + self.extraresults["ptestresult.{}.{}".format(ptestsuite, test)] = {"status" : result} class GlibcSelfTestSystemEmulated(GlibcSelfTest): default_installed_packages = [ |