summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/core
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2016-12-13 12:27:52 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 12:05:20 +0000
commit32a3f4d6abb79ba93b215d7b9fafbc84900bdae1 (patch)
treeac90fc95d9d968d1a1b08e1fae6aad815aae913d /meta/lib/oeqa/core
parent41b0b31a84254d75b4cca8d5f61c680bda5dd926 (diff)
downloadpoky-32a3f4d6abb79ba93b215d7b9fafbc84900bdae1.tar.gz
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>
Diffstat (limited to 'meta/lib/oeqa/core')
-rw-r--r--meta/lib/oeqa/core/context.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
index ba6ccf8e79..efed4e6b04 100644
--- a/meta/lib/oeqa/core/context.py
+++ b/meta/lib/oeqa/core/context.py
@@ -157,6 +157,7 @@ class OETestContextExecutor(object):
157 default_cases = [os.path.join(os.path.abspath(os.path.dirname(__file__)), 157 default_cases = [os.path.join(os.path.abspath(os.path.dirname(__file__)),
158 'cases/example')] 158 'cases/example')]
159 default_test_data = os.path.join(default_cases[0], 'data.json') 159 default_test_data = os.path.join(default_cases[0], 'data.json')
160 default_tests = None
160 161
161 def register_commands(self, logger, subparsers): 162 def register_commands(self, logger, subparsers):
162 self.parser = subparsers.add_parser(self.name, help=self.help, 163 self.parser = subparsers.add_parser(self.name, help=self.help,
@@ -167,6 +168,9 @@ class OETestContextExecutor(object):
167 self.parser.add_argument('--output-log', action='store', 168 self.parser.add_argument('--output-log', action='store',
168 default=self.default_output_log, 169 default=self.default_output_log,
169 help="results output log, default: %s" % self.default_output_log) 170 help="results output log, default: %s" % self.default_output_log)
171 self.parser.add_argument('--run-tests', action='store',
172 default=self.default_tests,
173 help="tests to run in <module>[.<class>[.<name>]] format. Just works for modules now")
170 174
171 if self.default_test_data: 175 if self.default_test_data:
172 self.parser.add_argument('--test-data-file', action='store', 176 self.parser.add_argument('--test-data-file', action='store',
@@ -211,6 +215,8 @@ class OETestContextExecutor(object):
211 else: 215 else:
212 self.tc_kwargs['init']['td'] = {} 216 self.tc_kwargs['init']['td'] = {}
213 217
218 self.tc_kwargs['load']['modules'] = args.run_tests.split()
219
214 self.module_paths = args.CASES_PATHS 220 self.module_paths = args.CASES_PATHS
215 221
216 def run(self, logger, args): 222 def run(self, logger, args):