From: Konrad Weihmann Date: Tue, 10 Nov 2020 19:20:14 +0000 (+0100) Subject: oeqa/core/context: expose results as variable X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~9612 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a97ae47525157871b6c098ffc352293e365a4335;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oeqa/core/context: expose results as variable register an unittest handler for testresults and expose it as variable result. With this even partial results from an interrupted test suite run can be made available Signed-off-by: Konrad Weihmann Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py index 7d3fa3b84a5..84b43a93e19 100644 --- a/meta/lib/oeqa/core/context.py +++ b/meta/lib/oeqa/core/context.py @@ -31,6 +31,9 @@ class OETestContext(object): self._registry = {} self._registry['cases'] = collections.OrderedDict() + self.results = unittest.TestResult() + unittest.registerResult(self.results) + def _read_modules_from_manifest(self, manifest): if not os.path.exists(manifest): raise OEQAMissingManifest("Manifest does not exist on %s" % manifest)