[oe-commits] [openembedded-core] 07/07: oeqa/decorator: Improve reliability
git at git.openembedded.org
git at git.openembedded.org
Mon Jul 16 15:12:47 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 9d7dc7a0b05f2c0a22ca6dc6ed91bd84832e5c06
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Sun Jul 15 12:02:50 2018 +0000
oeqa/decorator: Improve reliability
Checking if the dependency had any failure is unreliable, for example
if the underlying data doesn't get transferred and the list is empty,
success of the dependency is assumed.
Since we now have success data available, change the code to use it.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/core/decorator/depends.py | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/meta/lib/oeqa/core/decorator/depends.py b/meta/lib/oeqa/core/decorator/depends.py
index 69c604d..109cc88 100644
--- a/meta/lib/oeqa/core/decorator/depends.py
+++ b/meta/lib/oeqa/core/decorator/depends.py
@@ -63,13 +63,15 @@ def _order_test_case_by_depends(cases, depends):
return [cases[case_id] for case_id in cases_ordered]
def _skipTestDependency(case, depends):
- skipReasons = ['errors', 'failures', 'skipped']
-
- for reason in skipReasons:
- for test, _ in getattr(case.tc.results, reason):
- if test.id() in depends:
- raise SkipTest("Test case %s depends on %s and was in %s." \
- % (case.id(), test.id(), reason))
+ for dep in depends:
+ found = False
+ for test, _ in case.tc.results.successes:
+ if test.id() == dep:
+ found = True
+ break
+ if not found:
+ raise SkipTest("Test case %s depends on %s but it didn't pass/run." \
+ % (case.id(), test.id()))
@registerDecorator
class OETestDepends(OETestDiscover):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list