summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2017-05-26 15:37:39 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-02 13:36:14 +0100
commit008cc04790845721bea649e9a9ff84f0d466f771 (patch)
tree7b29a6e82556ba78c2d4a7ba0cc19b42feceabac /meta/lib
parent9ea42734c03377c5cff157b23938f5120a5d21ed (diff)
downloadpoky-008cc04790845721bea649e9a9ff84f0d466f771.tar.gz
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] (From OE-Core rev: 257d9ef4531052ba8507771b58884c7d2b64143d) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/core/decorator/depends.py8
1 files changed, 7 insertions, 1 deletions
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 @@
3 3
4from unittest import SkipTest 4from unittest import SkipTest
5 5
6from oeqa.core.threaded import OETestRunnerThreaded
6from oeqa.core.exception import OEQADependency 7from oeqa.core.exception import OEQADependency
7 8
8from . import OETestDiscover, registerDecorator 9from . import OETestDiscover, registerDecorator
@@ -63,7 +64,12 @@ def _order_test_case_by_depends(cases, depends):
63 return [cases[case_id] for case_id in cases_ordered] 64 return [cases[case_id] for case_id in cases_ordered]
64 65
65def _skipTestDependency(case, depends): 66def _skipTestDependency(case, depends):
66 results = case.tc._results 67 if isinstance(case.tc.runner, OETestRunnerThreaded):
68 import threading
69 results = case.tc._results[threading.get_ident()]
70 else:
71 results = case.tc._results
72
67 skipReasons = ['errors', 'failures', 'skipped'] 73 skipReasons = ['errors', 'failures', 'skipped']
68 74
69 for reason in skipReasons: 75 for reason in skipReasons: