[gatesgarth,09/19] oeqa/core/context: expose results as variable

Submitted by Anuj Mittal on Nov. 17, 2020, 3:35 p.m. | Patch ID: 178010

Details

Message ID ba41688f7f0cb44293321df6c69fe47ac1804d63.1605626675.git.anuj.mittal@intel.com
State New
Headers show

Commit Message

Anuj Mittal Nov. 17, 2020, 3:35 p.m.
From: Konrad Weihmann <kweihmann@outlook.com>


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 <kweihmann@outlook.com>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

(cherry picked from commit a97ae47525157871b6c098ffc352293e365a4335)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>

---
 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]
-=-=-=-=-=-=-=-=-=-=-=-

Patch hide | download patch | download mbox

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)