From: Aníbal Limón Date: Fri, 26 May 2017 20:37:39 +0000 (-0500) Subject: oeqa/core/decorator/depends: Add support for threading mode X-Git-Tag: uninative-1.7~710 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=257d9ef4531052ba8507771b58884c7d2b64143d;p=openembedded-core.git oeqa/core/decorator/depends: Add support for threading mode The _skipTestDependency needs to know if the thread mode is enabled because the _results are by thread. [YOCTO #11450] Signed-off-by: Aníbal Limón Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/core/decorator/depends.py b/meta/lib/oeqa/core/decorator/depends.py index 195711cf1e..baa04341c7 100644 --- a/meta/lib/oeqa/core/decorator/depends.py +++ b/meta/lib/oeqa/core/decorator/depends.py @@ -3,6 +3,7 @@ from unittest import SkipTest +from oeqa.core.threaded import OETestRunnerThreaded from oeqa.core.exception import OEQADependency from . import OETestDiscover, registerDecorator @@ -63,7 +64,12 @@ def _order_test_case_by_depends(cases, depends): return [cases[case_id] for case_id in cases_ordered] def _skipTestDependency(case, depends): - results = case.tc._results + if isinstance(case.tc.runner, OETestRunnerThreaded): + import threading + results = case.tc._results[threading.get_ident()] + else: + results = case.tc._results + skipReasons = ['errors', 'failures', 'skipped'] for reason in skipReasons: