diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2017-07-26 10:04:09 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-30 08:46:19 +0100 |
commit | 2d50f153b5b76adbd4157d2f69001ed91e9148dc (patch) | |
tree | 388a4933b0232a6f35e186602a9720760bfa05fb /meta/lib/oeqa/selftest | |
parent | 4c09b7a745dbc4b9ff7dcbe4789fbb34da31b74a (diff) | |
download | poky-2d50f153b5b76adbd4157d2f69001ed91e9148dc.tar.gz |
oeqa/{core,selftest}: Add support to validate if a specified test case isn't found
If some test module/case is specified to run and isn't found the OEQA
framework didn't notice it, so complete the implementation using
modules_required and validate for the test case prescense.
Raise an exception when the test module/case required isn't found.
[YOCTO #11645]
(From OE-Core rev: e50b415aaaa1581473f85f0a8afa278b5f95129b)
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/oeqa/selftest')
-rw-r--r-- | meta/lib/oeqa/selftest/context.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py index 4575a0537f..990c761f29 100644 --- a/meta/lib/oeqa/selftest/context.py +++ b/meta/lib/oeqa/selftest/context.py | |||
@@ -13,7 +13,7 @@ from random import choice | |||
13 | import oeqa | 13 | import oeqa |
14 | 14 | ||
15 | from oeqa.core.context import OETestContext, OETestContextExecutor | 15 | from oeqa.core.context import OETestContext, OETestContextExecutor |
16 | from oeqa.core.exception import OEQAPreRun | 16 | from oeqa.core.exception import OEQAPreRun, OEQATestNotFound |
17 | 17 | ||
18 | from oeqa.utils.commands import runCmd, get_bb_vars, get_test_layer | 18 | from oeqa.utils.commands import runCmd, get_bb_vars, get_test_layer |
19 | 19 | ||
@@ -196,7 +196,11 @@ class OESelftestTestContextExecutor(OETestContextExecutor): | |||
196 | self.tc_kwargs['init']['td']['BBPATH'].split(':')) | 196 | self.tc_kwargs['init']['td']['BBPATH'].split(':')) |
197 | 197 | ||
198 | self.tc = self._context_class(**self.tc_kwargs['init']) | 198 | self.tc = self._context_class(**self.tc_kwargs['init']) |
199 | self.tc.loadTests(self.module_paths, **self.tc_kwargs['load']) | 199 | try: |
200 | self.tc.loadTests(self.module_paths, **self.tc_kwargs['load']) | ||
201 | except OEQATestNotFound as ex: | ||
202 | logger.error(ex) | ||
203 | sys.exit(1) | ||
200 | 204 | ||
201 | if args.list_tests: | 205 | if args.list_tests: |
202 | rc = self.tc.listTests(args.list_tests, **self.tc_kwargs['run']) | 206 | rc = self.tc.listTests(args.list_tests, **self.tc_kwargs['run']) |