mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
oeqa/core/context: Add option to select tests to run
This add the option to select what tests to run in the <module>[.<class>[.<test>]] format. Currently it just support modules (From OE-Core rev: 0050565d71cee5a0cc22660b2398e4334d4b6719) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
41b0b31a84
commit
32a3f4d6ab
@@ -157,6 +157,7 @@ class OETestContextExecutor(object):
|
|||||||
default_cases = [os.path.join(os.path.abspath(os.path.dirname(__file__)),
|
default_cases = [os.path.join(os.path.abspath(os.path.dirname(__file__)),
|
||||||
'cases/example')]
|
'cases/example')]
|
||||||
default_test_data = os.path.join(default_cases[0], 'data.json')
|
default_test_data = os.path.join(default_cases[0], 'data.json')
|
||||||
|
default_tests = None
|
||||||
|
|
||||||
def register_commands(self, logger, subparsers):
|
def register_commands(self, logger, subparsers):
|
||||||
self.parser = subparsers.add_parser(self.name, help=self.help,
|
self.parser = subparsers.add_parser(self.name, help=self.help,
|
||||||
@@ -167,6 +168,9 @@ class OETestContextExecutor(object):
|
|||||||
self.parser.add_argument('--output-log', action='store',
|
self.parser.add_argument('--output-log', action='store',
|
||||||
default=self.default_output_log,
|
default=self.default_output_log,
|
||||||
help="results output log, default: %s" % self.default_output_log)
|
help="results output log, default: %s" % self.default_output_log)
|
||||||
|
self.parser.add_argument('--run-tests', action='store',
|
||||||
|
default=self.default_tests,
|
||||||
|
help="tests to run in <module>[.<class>[.<name>]] format. Just works for modules now")
|
||||||
|
|
||||||
if self.default_test_data:
|
if self.default_test_data:
|
||||||
self.parser.add_argument('--test-data-file', action='store',
|
self.parser.add_argument('--test-data-file', action='store',
|
||||||
@@ -211,6 +215,8 @@ class OETestContextExecutor(object):
|
|||||||
else:
|
else:
|
||||||
self.tc_kwargs['init']['td'] = {}
|
self.tc_kwargs['init']['td'] = {}
|
||||||
|
|
||||||
|
self.tc_kwargs['load']['modules'] = args.run_tests.split()
|
||||||
|
|
||||||
self.module_paths = args.CASES_PATHS
|
self.module_paths = args.CASES_PATHS
|
||||||
|
|
||||||
def run(self, logger, args):
|
def run(self, logger, args):
|
||||||
|
|||||||
Reference in New Issue
Block a user