aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2017-05-26 15:37:38 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-05-30 10:15:22 +0100
commit3ec0d3825aa31219e0ccabc1f158d3a2f8adbda2 (patch)
tree90c0ea55b1930dc29e468f6b75240122246f0f53
parent48b7a407d692e6c49c41b16f2bd11e8c3f47a421 (diff)
downloadopenembedded-core-contrib-3ec0d3825aa31219e0ccabc1f158d3a2f8adbda2.tar.gz
oeqa/core/threaded: Add OETestContextThreaded class
This class sets the {loader,runner}Class to the threaded versions and overrides loadTests method to be able specify the process_num. [YOCTO #11450] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/core/threaded.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/threaded.py b/meta/lib/oeqa/core/threaded.py
index 81df340366..c6058a3e52 100644
--- a/meta/lib/oeqa/core/threaded.py
+++ b/meta/lib/oeqa/core/threaded.py
@@ -10,6 +10,7 @@ from unittest.suite import TestSuite
from oeqa.core.loader import OETestLoader
from oeqa.core.runner import OEStreamLogger, OETestResult, OETestRunner
+from oeqa.core.context import OETestContext
class OETestLoaderThreaded(OETestLoader):
def __init__(self, tc, module_paths, modules, tests, modules_required,
@@ -258,3 +259,16 @@ class OETestRunnerThreaded(OETestRunner):
result._fill_tc_results()
return result
+
+class OETestContextThreaded(OETestContext):
+ loaderClass = OETestLoaderThreaded
+ runnerClass = OETestRunnerThreaded
+
+ def loadTests(self, module_paths, modules=[], tests=[],
+ modules_manifest="", modules_required=[], filters={}, process_num=0):
+ if modules_manifest:
+ modules = self._read_modules_from_manifest(modules_manifest)
+
+ self.loader = self.loaderClass(self, module_paths, modules, tests,
+ modules_required, filters, process_num)
+ self.suites = self.loader.discover()