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/gcc.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/gcc.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/gcc.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/meta/lib/oeqa/selftest/cases/gcc.py b/meta/lib/oeqa/selftest/cases/gcc.py index f4fed40ea5..24ee66a2ae 100644 --- a/meta/lib/oeqa/selftest/cases/gcc.py +++ b/meta/lib/oeqa/selftest/cases/gcc.py | |||
@@ -13,15 +13,6 @@ def parse_values(content): | |||
13 | 13 | ||
14 | @OETestTag("machine") | 14 | @OETestTag("machine") |
15 | class GccSelfTest(OESelftestTestCase): | 15 | class GccSelfTest(OESelftestTestCase): |
16 | @classmethod | ||
17 | def setUpClass(cls): | ||
18 | super().setUpClass() | ||
19 | if not hasattr(cls.tc, "extraresults"): | ||
20 | cls.tc.extraresults = {} | ||
21 | |||
22 | if "ptestresult.sections" not in cls.tc.extraresults: | ||
23 | cls.tc.extraresults["ptestresult.sections"] = {} | ||
24 | |||
25 | def gcc_runtime_check_skip(self, suite): | 16 | def gcc_runtime_check_skip(self, suite): |
26 | targets = get_bb_var("RUNTIMETARGET", "gcc-runtime").split() | 17 | targets = get_bb_var("RUNTIMETARGET", "gcc-runtime").split() |
27 | if suite not in targets: | 18 | if suite not in targets: |
@@ -71,6 +62,7 @@ class GccSelfTest(OESelftestTestCase): | |||
71 | bb_vars = get_bb_vars(["B", "TARGET_SYS"], recipe) | 62 | bb_vars = get_bb_vars(["B", "TARGET_SYS"], recipe) |
72 | builddir, target_sys = bb_vars["B"], bb_vars["TARGET_SYS"] | 63 | builddir, target_sys = bb_vars["B"], bb_vars["TARGET_SYS"] |
73 | 64 | ||
65 | self.extraresults = {"ptestresult.sections" : {}} | ||
74 | for suite in suites: | 66 | for suite in suites: |
75 | sumspath = os.path.join(builddir, "gcc", "testsuite", suite, "{0}.sum".format(suite)) | 67 | sumspath = os.path.join(builddir, "gcc", "testsuite", suite, "{0}.sum".format(suite)) |
76 | if not os.path.exists(sumspath): # check in target dirs | 68 | if not os.path.exists(sumspath): # check in target dirs |
@@ -80,10 +72,10 @@ class GccSelfTest(OESelftestTestCase): | |||
80 | 72 | ||
81 | ptestsuite = "gcc-{}".format(suite) if suite != "gcc" else suite | 73 | ptestsuite = "gcc-{}".format(suite) if suite != "gcc" else suite |
82 | ptestsuite = ptestsuite + "-user" if ssh is None else ptestsuite | 74 | ptestsuite = ptestsuite + "-user" if ssh is None else ptestsuite |
83 | self.tc.extraresults["ptestresult.sections"][ptestsuite] = {} | 75 | self.extraresults["ptestresult.sections"][ptestsuite] = {} |
84 | with open(sumspath, "r") as f: | 76 | with open(sumspath, "r") as f: |
85 | for test, result in parse_values(f): | 77 | for test, result in parse_values(f): |
86 | self.tc.extraresults["ptestresult.{}.{}".format(ptestsuite, test)] = {"status" : result} | 78 | self.extraresults["ptestresult.{}.{}".format(ptestsuite, test)] = {"status" : result} |
87 | 79 | ||
88 | class GccSelfTestSystemEmulated(GccSelfTest): | 80 | class GccSelfTestSystemEmulated(GccSelfTest): |
89 | default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp"] | 81 | default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp"] |