]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/core/context: expose results as variable
authorKonrad Weihmann <kweihmann@outlook.com>
Tue, 10 Nov 2020 19:20:14 +0000 (20:20 +0100)
committerSteve Sakoman <steve@sakoman.com>
Wed, 11 Nov 2020 14:35:09 +0000 (04:35 -1000)
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: Steve Sakoman <steve@sakoman.com>
meta/lib/oeqa/core/context.py

index 4705d608ac0d79bceeb37cd36fc6ed33bce0085e..4ce3089ad01f025571dd3825ac4335e0eb42578b 100644 (file)
@@ -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)