From patchwork Tue Nov 17 15:35:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [gatesgarth,09/19] oeqa/core/context: expose results as variable From: Anuj Mittal X-Patchwork-Id: 178010 Message-Id: To: openembedded-core@lists.openembedded.org Date: Tue, 17 Nov 2020 23:35:58 +0800 From: Konrad Weihmann 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: Anuj Mittal --- meta/lib/oeqa/core/context.py | 3 +++ 1 file changed, 3 insertions(+) -- 2.28.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#144718): https://lists.openembedded.org/g/openembedded-core/message/144718 Mute This Topic: https://lists.openembedded.org/mt/78318288/3616849 Group Owner: openembedded-core+owner@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [michael@yoctoproject.org] -=-=-=-=-=-=-=-=-=-=-=- diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py index 7d3fa3b84a..84b43a93e1 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)