From: Konrad Weihmann Date: Tue, 10 Nov 2020 19:20:14 +0000 (+0100) Subject: oeqa/core/context: expose results as variable X-Git-Tag: 2020-04.4-dunfell~20 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=07a3ea1aece5c67d75b60417ee0978cc0e15719a;p=openembedded-core.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 (cherry picked from commit a97ae47525157871b6c098ffc352293e365a4335) Signed-off-by: Steve Sakoman --- diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py index 4705d608ac..4ce3089ad0 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)