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:56:43 +0100 |
commit | db1cc0b53390bff5bd255a92a1644eccd30d7f18 (patch) | |
tree | bfbf35bdef08fb1be27084f952d8ee057630f5e7 /meta/lib/oeqa/selftest/cases/glibc.py | |
parent | 074388daf5ceb0b413caa76f348bf6f4b19fc131 (diff) | |
download | poky-db1cc0b53390bff5bd255a92a1644eccd30d7f18.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.
(From OE-Core rev: 6a1b0c2003a0b4a1983f9494440e6ea02dc25585)
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): | |||
15 | 15 | ||
16 | @OETestTag("machine") | 16 | @OETestTag("machine") |
17 | class GlibcSelfTest(OESelftestTestCase): | 17 | class GlibcSelfTest(OESelftestTestCase): |
18 | @classmethod | ||
19 | def setUpClass(cls): | ||
20 | super().setUpClass() | ||
21 | if not hasattr(cls.tc, "extraresults"): | ||
22 | cls.tc.extraresults = {} | ||
23 | |||
24 | if "ptestresult.sections" not in cls.tc.extraresults: | ||
25 | cls.tc.extraresults["ptestresult.sections"] = {} | ||
26 | |||
27 | def test_glibc(self): | 18 | def test_glibc(self): |
28 | self.glibc_run_check() | 19 | self.glibc_run_check() |
29 | 20 | ||
@@ -44,10 +35,10 @@ class GlibcSelfTest(OESelftestTestCase): | |||
44 | builddir = get_bb_var("B", "glibc-testsuite") | 35 | builddir = get_bb_var("B", "glibc-testsuite") |
45 | 36 | ||
46 | ptestsuite = "glibc-user" if ssh is None else "glibc" | 37 | ptestsuite = "glibc-user" if ssh is None else "glibc" |
47 | self.tc.extraresults["ptestresult.sections"][ptestsuite] = {} | 38 | self.extraresults = {"ptestresult.sections" : {ptestsuite : {}}} |
48 | with open(os.path.join(builddir, "tests.sum"), "r") as f: | 39 | with open(os.path.join(builddir, "tests.sum"), "r") as f: |
49 | for test, result in parse_values(f): | 40 | for test, result in parse_values(f): |
50 | self.tc.extraresults["ptestresult.{}.{}".format(ptestsuite, test)] = {"status" : result} | 41 | self.extraresults["ptestresult.{}.{}".format(ptestsuite, test)] = {"status" : result} |
51 | 42 | ||
52 | class GlibcSelfTestSystemEmulated(GlibcSelfTest): | 43 | class GlibcSelfTestSystemEmulated(GlibcSelfTest): |
53 | default_installed_packages = [ | 44 | default_installed_packages = [ |