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/binutils.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/binutils.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/binutils.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/meta/lib/oeqa/selftest/cases/binutils.py b/meta/lib/oeqa/selftest/cases/binutils.py index 7f887959e4..759cd9b8ff 100644 --- a/meta/lib/oeqa/selftest/cases/binutils.py +++ b/meta/lib/oeqa/selftest/cases/binutils.py | |||
@@ -16,15 +16,6 @@ def parse_values(content): | |||
16 | 16 | ||
17 | @OETestTag("machine") | 17 | @OETestTag("machine") |
18 | class BinutilsCrossSelfTest(OESelftestTestCase): | 18 | class BinutilsCrossSelfTest(OESelftestTestCase): |
19 | @classmethod | ||
20 | def setUpClass(cls): | ||
21 | super().setUpClass() | ||
22 | if not hasattr(cls.tc, "extraresults"): | ||
23 | cls.tc.extraresults = {} | ||
24 | |||
25 | if "ptestresult.sections" not in cls.tc.extraresults: | ||
26 | cls.tc.extraresults["ptestresult.sections"] = {} | ||
27 | |||
28 | def test_binutils(self): | 19 | def test_binutils(self): |
29 | self.run_binutils("binutils") | 20 | self.run_binutils("binutils") |
30 | 21 | ||
@@ -46,7 +37,7 @@ class BinutilsCrossSelfTest(OESelftestTestCase): | |||
46 | bitbake("{0} -c check".format(recipe)) | 37 | bitbake("{0} -c check".format(recipe)) |
47 | 38 | ||
48 | ptestsuite = "binutils-{}".format(suite) if suite != "binutils" else suite | 39 | ptestsuite = "binutils-{}".format(suite) if suite != "binutils" else suite |
49 | self.tc.extraresults["ptestresult.sections"][ptestsuite] = {} | 40 | self.extraresults = {"ptestresult.sections" : {ptestsuite : {}}} |
50 | 41 | ||
51 | sumspath = os.path.join(builddir, suite, "{0}.sum".format(suite)) | 42 | sumspath = os.path.join(builddir, suite, "{0}.sum".format(suite)) |
52 | if not os.path.exists(sumspath): | 43 | if not os.path.exists(sumspath): |
@@ -54,5 +45,5 @@ class BinutilsCrossSelfTest(OESelftestTestCase): | |||
54 | 45 | ||
55 | with open(sumspath, "r") as f: | 46 | with open(sumspath, "r") as f: |
56 | for test, result in parse_values(f): | 47 | for test, result in parse_values(f): |
57 | self.tc.extraresults["ptestresult.{}.{}".format(ptestsuite, test)] = {"status" : result} | 48 | self.extraresults["ptestresult.{}.{}".format(ptestsuite, test)] = {"status" : result} |
58 | 49 | ||