From db1cc0b53390bff5bd255a92a1644eccd30d7f18 Mon Sep 17 00:00:00 2001 From: Nathan Rossi Date: Sat, 7 Sep 2019 12:55:06 +0000 Subject: 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 Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/gcc.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'meta/lib/oeqa/selftest/cases/gcc.py') 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): @OETestTag("machine") class GccSelfTest(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 gcc_runtime_check_skip(self, suite): targets = get_bb_var("RUNTIMETARGET", "gcc-runtime").split() if suite not in targets: @@ -71,6 +62,7 @@ class GccSelfTest(OESelftestTestCase): bb_vars = get_bb_vars(["B", "TARGET_SYS"], recipe) builddir, target_sys = bb_vars["B"], bb_vars["TARGET_SYS"] + self.extraresults = {"ptestresult.sections" : {}} for suite in suites: sumspath = os.path.join(builddir, "gcc", "testsuite", suite, "{0}.sum".format(suite)) if not os.path.exists(sumspath): # check in target dirs @@ -80,10 +72,10 @@ class GccSelfTest(OESelftestTestCase): ptestsuite = "gcc-{}".format(suite) if suite != "gcc" else suite ptestsuite = ptestsuite + "-user" if ssh is None else ptestsuite - self.tc.extraresults["ptestresult.sections"][ptestsuite] = {} + self.extraresults["ptestresult.sections"][ptestsuite] = {} with open(sumspath, "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 GccSelfTestSystemEmulated(GccSelfTest): default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp"] -- cgit v1.2.3-54-g00ecf