summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/reproducible.py
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2019-09-07 12:55:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-07 21:52:27 +0100
commit6a1b0c2003a0b4a1983f9494440e6ea02dc25585 (patch)
tree34329aa16f5aa02c2a154a674a1d23d75290b8b1 /meta/lib/oeqa/selftest/cases/reproducible.py
parent0becf9c1fabb080a2481ebdacef6221f52301621 (diff)
downloadopenembedded-core-contrib-6a1b0c2003a0b4a1983f9494440e6ea02dc25585.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. 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/reproducible.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/reproducible.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index ffb405af20..eee09d3fb2 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -82,15 +82,12 @@ class ReproducibleTests(OESelftestTestCase):
for v in needed_vars:
setattr(self, v.lower(), bb_vars[v])
- if not hasattr(self.tc, "extraresults"):
- self.tc.extraresults = {}
- self.extras = self.tc.extraresults
-
- self.extras.setdefault('reproducible.rawlogs', {})['log'] = ''
- self.extras.setdefault('reproducible', {}).setdefault('files', {})
+ self.extrasresults = {}
+ self.extrasresults.setdefault('reproducible.rawlogs', {})['log'] = ''
+ self.extrasresults.setdefault('reproducible', {}).setdefault('files', {})
def append_to_log(self, msg):
- self.extras['reproducible.rawlogs']['log'] += msg
+ self.extrasresults['reproducible.rawlogs']['log'] += msg
def compare_packages(self, reference_dir, test_dir, diffutils_sysroot):
result = PackageCompareResults()
@@ -117,7 +114,7 @@ class ReproducibleTests(OESelftestTestCase):
return result
def write_package_list(self, package_class, name, packages):
- self.extras['reproducible']['files'].setdefault(package_class, {})[name] = [
+ self.extrasresults['reproducible']['files'].setdefault(package_class, {})[name] = [
{'reference': p.reference, 'test': p.test} for p in packages]
def test_reproducible_builds(self):