summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/context.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/context.py')
-rw-r--r--meta/lib/oeqa/selftest/context.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py
index 9e90d3c256..c937b8171c 100644
--- a/meta/lib/oeqa/selftest/context.py
+++ b/meta/lib/oeqa/selftest/context.py
@@ -25,14 +25,14 @@ class OESelftestTestContext(OETestContext):
25 self.custommachine = None 25 self.custommachine = None
26 self.config_paths = config_paths 26 self.config_paths = config_paths
27 27
28 def runTests(self, machine=None, skips=[]): 28 def runTests(self, processes=None, machine=None, skips=[]):
29 if machine: 29 if machine:
30 self.custommachine = machine 30 self.custommachine = machine
31 if machine == 'random': 31 if machine == 'random':
32 self.custommachine = choice(self.machines) 32 self.custommachine = choice(self.machines)
33 self.logger.info('Run tests with custom MACHINE set to: %s' % \ 33 self.logger.info('Run tests with custom MACHINE set to: %s' % \
34 self.custommachine) 34 self.custommachine)
35 return super(OESelftestTestContext, self).runTests(skips) 35 return super(OESelftestTestContext, self).runTests(processes, skips)
36 36
37 def listTests(self, display_type, machine=None): 37 def listTests(self, display_type, machine=None):
38 return super(OESelftestTestContext, self).listTests(display_type) 38 return super(OESelftestTestContext, self).listTests(display_type)
@@ -68,6 +68,9 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
68 action="store_true", default=False, 68 action="store_true", default=False,
69 help='List all available tests.') 69 help='List all available tests.')
70 70
71 parser.add_argument('-j', '--num-processes', dest='processes', action='store',
72 type=int, help="number of processes to execute in parallel with")
73
71 parser.add_argument('--machine', required=False, choices=['random', 'all'], 74 parser.add_argument('--machine', required=False, choices=['random', 'all'],
72 help='Run tests on different machines (random/all).') 75 help='Run tests on different machines (random/all).')
73 76
@@ -137,6 +140,7 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
137 self.tc_kwargs['init']['config_paths']['bblayers_backup']) 140 self.tc_kwargs['init']['config_paths']['bblayers_backup'])
138 141
139 self.tc_kwargs['run']['skips'] = args.skips 142 self.tc_kwargs['run']['skips'] = args.skips
143 self.tc_kwargs['run']['processes'] = args.processes
140 144
141 def _pre_run(self): 145 def _pre_run(self):
142 def _check_required_env_variables(vars): 146 def _check_required_env_variables(vars):