diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/gcc.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/gcc.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/cases/gcc.py b/meta/lib/oeqa/selftest/cases/gcc.py index 2c25b5904c..5a917b9c44 100644 --- a/meta/lib/oeqa/selftest/cases/gcc.py +++ b/meta/lib/oeqa/selftest/cases/gcc.py | |||
@@ -1,6 +1,7 @@ | |||
1 | # SPDX-License-Identifier: MIT | 1 | # SPDX-License-Identifier: MIT |
2 | import os | 2 | import os |
3 | from oeqa.core.decorator import OETestTag | 3 | from oeqa.core.decorator import OETestTag |
4 | from oeqa.core.case import OEPTestResultTestCase | ||
4 | from oeqa.selftest.case import OESelftestTestCase | 5 | from oeqa.selftest.case import OESelftestTestCase |
5 | from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars, runqemu, Command | 6 | from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars, runqemu, Command |
6 | 7 | ||
@@ -11,7 +12,7 @@ def parse_values(content): | |||
11 | yield i[len(v) + 2:].strip(), v | 12 | yield i[len(v) + 2:].strip(), v |
12 | break | 13 | break |
13 | 14 | ||
14 | class GccSelfTestBase(OESelftestTestCase): | 15 | class GccSelfTestBase(OESelftestTestCase, OEPTestResultTestCase): |
15 | def check_skip(self, suite): | 16 | def check_skip(self, suite): |
16 | targets = get_bb_var("RUNTIMETARGET", "gcc-runtime").split() | 17 | targets = get_bb_var("RUNTIMETARGET", "gcc-runtime").split() |
17 | if suite not in targets: | 18 | if suite not in targets: |
@@ -41,20 +42,20 @@ class GccSelfTestBase(OESelftestTestCase): | |||
41 | bb_vars = get_bb_vars(["B", "TARGET_SYS"], recipe) | 42 | bb_vars = get_bb_vars(["B", "TARGET_SYS"], recipe) |
42 | builddir, target_sys = bb_vars["B"], bb_vars["TARGET_SYS"] | 43 | builddir, target_sys = bb_vars["B"], bb_vars["TARGET_SYS"] |
43 | 44 | ||
44 | self.extraresults = {"ptestresult.sections" : {}} | ||
45 | for suite in suites: | 45 | for suite in suites: |
46 | sumspath = os.path.join(builddir, "gcc", "testsuite", suite, "{0}.sum".format(suite)) | 46 | sumspath = os.path.join(builddir, "gcc", "testsuite", suite, "{0}.sum".format(suite)) |
47 | if not os.path.exists(sumspath): # check in target dirs | 47 | if not os.path.exists(sumspath): # check in target dirs |
48 | sumspath = os.path.join(builddir, target_sys, suite, "testsuite", "{0}.sum".format(suite)) | 48 | sumspath = os.path.join(builddir, target_sys, suite, "testsuite", "{0}.sum".format(suite)) |
49 | if not os.path.exists(sumspath): # handle libstdc++-v3 -> libstdc++ | 49 | if not os.path.exists(sumspath): # handle libstdc++-v3 -> libstdc++ |
50 | sumspath = os.path.join(builddir, target_sys, suite, "testsuite", "{0}.sum".format(suite.split("-")[0])) | 50 | sumspath = os.path.join(builddir, target_sys, suite, "testsuite", "{0}.sum".format(suite.split("-")[0])) |
51 | logpath = os.path.splitext(sumspath)[0] + ".log" | ||
51 | 52 | ||
52 | ptestsuite = "gcc-{}".format(suite) if suite != "gcc" else suite | 53 | ptestsuite = "gcc-{}".format(suite) if suite != "gcc" else suite |
53 | ptestsuite = ptestsuite + "-user" if ssh is None else ptestsuite | 54 | ptestsuite = ptestsuite + "-user" if ssh is None else ptestsuite |
54 | self.extraresults["ptestresult.sections"][ptestsuite] = {} | 55 | self.ptest_section(ptestsuite, logfile = logpath) |
55 | with open(sumspath, "r") as f: | 56 | with open(sumspath, "r") as f: |
56 | for test, result in parse_values(f): | 57 | for test, result in parse_values(f): |
57 | self.extraresults["ptestresult.{}.{}".format(ptestsuite, test)] = {"status" : result} | 58 | self.ptest_result(ptestsuite, test, result) |
58 | 59 | ||
59 | def run_check_emulated(self, *args, **kwargs): | 60 | def run_check_emulated(self, *args, **kwargs): |
60 | # build core-image-minimal with required packages | 61 | # build core-image-minimal with required packages |