@@ -143,7 +143,8 @@ def __init__(self,
143
143
_opts_suppress_summary = False ,
144
144
_opts_test_x_toolchain_summary = False ,
145
145
_opts_copy_method = None ,
146
- _opts_mut_reset_type = None
146
+ _opts_mut_reset_type = None ,
147
+ _opts_jobs = None
147
148
):
148
149
""" Let's try hard to init this object """
149
150
PATTERN = "\\ {(" + "|" .join (self .TEST_RESULT_MAPPING .keys ()) + ")\\ }"
@@ -183,6 +184,7 @@ def __init__(self,
183
184
self .opts_test_x_toolchain_summary = _opts_test_x_toolchain_summary
184
185
self .opts_copy_method = _opts_copy_method
185
186
self .opts_mut_reset_type = _opts_mut_reset_type
187
+ self .opts_jobs = _opts_jobs
186
188
187
189
def shuffle_random_func (self ):
188
190
return self .shuffle_random_seed
@@ -222,7 +224,8 @@ def execute(self):
222
224
build_mbed_libs_result = build_mbed_libs (T ,
223
225
toolchain ,
224
226
options = build_mbed_libs_options ,
225
- clean = clean_mbed_libs_options )
227
+ clean = clean_mbed_libs_options ,
228
+ jobs = self .opts_jobs )
226
229
if not build_mbed_libs_result :
227
230
print 'Skipped tests for %s target. Toolchain %s is not yet supported for this target' % (T .name , toolchain )
228
231
continue
@@ -275,7 +278,8 @@ def execute(self):
275
278
toolchain ,
276
279
options = build_project_options ,
277
280
verbose = self .opts_verbose ,
278
- clean = clean_mbed_libs_options )
281
+ clean = clean_mbed_libs_options ,
282
+ jobs = self .opts_jobs )
279
283
280
284
# TODO: move this 2 below loops to separate function
281
285
INC_DIRS = []
@@ -299,7 +303,8 @@ def execute(self):
299
303
verbose = self .opts_verbose ,
300
304
name = project_name ,
301
305
macros = MACROS ,
302
- inc_dirs = INC_DIRS )
306
+ inc_dirs = INC_DIRS ,
307
+ jobs = self .opts_jobs )
303
308
304
309
if self .opts_only_build_tests :
305
310
# With this option we are skipping testing phase
@@ -966,6 +971,12 @@ def get_default_test_options_parser():
966
971
metavar = "FILE" ,
967
972
help = 'Points to file with MUTs specification (overwrites settings.py and private_settings.py)' )
968
973
974
+ parser .add_option ("-j" , "--jobs" ,
975
+ dest = 'jobs' ,
976
+ metavar = "NUMBER" ,
977
+ type = "int" ,
978
+ help = "Define number of compilation jobs. Default value is 1" )
979
+
969
980
parser .add_option ('-g' , '--goanna-for-tests' ,
970
981
dest = 'goanna_for_tests' ,
971
982
metavar = False ,
0 commit comments