[gnome-continuous-yocto/gnomeostree-3.28-rocko: 6048/8267] oeqa/core/decorator/depends: Add support for threading mode
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 6048/8267] oeqa/core/decorator/depends: Add support for threading mode
- Date: Sun, 17 Dec 2017 04:17:45 +0000 (UTC)
commit 008cc04790845721bea649e9a9ff84f0d466f771
Author: Aníbal Limón <anibal limon linux intel com>
Date: Fri May 26 15:37:39 2017 -0500
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>
meta/lib/oeqa/core/decorator/depends.py | 8 +++++++-
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 195711c..baa0434 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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]