diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/binutils.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/binutils.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/meta/lib/oeqa/selftest/cases/binutils.py b/meta/lib/oeqa/selftest/cases/binutils.py index 9bc752040f..821f52f5a8 100644 --- a/meta/lib/oeqa/selftest/cases/binutils.py +++ b/meta/lib/oeqa/selftest/cases/binutils.py | |||
@@ -4,6 +4,7 @@ import sys | |||
4 | import re | 4 | import re |
5 | import logging | 5 | import logging |
6 | from oeqa.core.decorator import OETestTag | 6 | from oeqa.core.decorator import OETestTag |
7 | from oeqa.core.case import OEPTestResultTestCase | ||
7 | from oeqa.selftest.case import OESelftestTestCase | 8 | from oeqa.selftest.case import OESelftestTestCase |
8 | from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars | 9 | from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars |
9 | 10 | ||
@@ -15,7 +16,7 @@ def parse_values(content): | |||
15 | break | 16 | break |
16 | 17 | ||
17 | @OETestTag("toolchain-user", "toolchain-system") | 18 | @OETestTag("toolchain-user", "toolchain-system") |
18 | class BinutilsCrossSelfTest(OESelftestTestCase): | 19 | class BinutilsCrossSelfTest(OESelftestTestCase, OEPTestResultTestCase): |
19 | def test_binutils(self): | 20 | def test_binutils(self): |
20 | self.run_binutils("binutils") | 21 | self.run_binutils("binutils") |
21 | 22 | ||
@@ -36,14 +37,14 @@ class BinutilsCrossSelfTest(OESelftestTestCase): | |||
36 | 37 | ||
37 | bitbake("{0} -c check".format(recipe)) | 38 | bitbake("{0} -c check".format(recipe)) |
38 | 39 | ||
39 | ptestsuite = "binutils-{}".format(suite) if suite != "binutils" else suite | ||
40 | self.extraresults = {"ptestresult.sections" : {ptestsuite : {}}} | ||
41 | |||
42 | sumspath = os.path.join(builddir, suite, "{0}.sum".format(suite)) | 40 | sumspath = os.path.join(builddir, suite, "{0}.sum".format(suite)) |
43 | if not os.path.exists(sumspath): | 41 | if not os.path.exists(sumspath): |
44 | sumspath = os.path.join(builddir, suite, "testsuite", "{0}.sum".format(suite)) | 42 | sumspath = os.path.join(builddir, suite, "testsuite", "{0}.sum".format(suite)) |
43 | logpath = os.path.splitext(sumspath)[0] + ".log" | ||
45 | 44 | ||
45 | ptestsuite = "binutils-{}".format(suite) if suite != "binutils" else suite | ||
46 | self.ptest_section(ptestsuite, logfile = logpath) | ||
46 | with open(sumspath, "r") as f: | 47 | with open(sumspath, "r") as f: |
47 | for test, result in parse_values(f): | 48 | for test, result in parse_values(f): |
48 | self.extraresults["ptestresult.{}.{}".format(ptestsuite, test)] = {"status" : result} | 49 | self.ptest_result(ptestsuite, test, result) |
49 | 50 | ||