60
60
from tools .build_api import prepare_toolchain
61
61
from tools .build_api import scan_resources
62
62
from tools .libraries import LIBRARIES , LIBRARY_MAP
63
+ from tools .options import extract_profile
63
64
from tools .toolchains import TOOLCHAIN_PATHS
64
65
from tools .toolchains import TOOLCHAINS
65
66
from tools .test_exporters import ReportExporter , ResultExporterType
@@ -170,6 +171,8 @@ def __init__(self,
170
171
_test_loops_list = None ,
171
172
_muts = {},
172
173
_clean = False ,
174
+ _parser = None ,
175
+ _opts = None ,
173
176
_opts_db_url = None ,
174
177
_opts_log_file_name = None ,
175
178
_opts_report_html_file_name = None ,
@@ -258,6 +261,8 @@ def __init__(self,
258
261
self .opts_consolidate_waterfall_test = _opts_consolidate_waterfall_test
259
262
self .opts_extend_test_timeout = _opts_extend_test_timeout
260
263
self .opts_clean = _clean
264
+ self .opts_parser = _parser
265
+ self .opts = _opts
261
266
self .opts_auto_detect = _opts_auto_detect
262
267
self .opts_include_non_automated = _opts_include_non_automated
263
268
@@ -357,6 +362,8 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
357
362
358
363
clean_mbed_libs_options = True if self .opts_goanna_for_mbed_sdk or clean or self .opts_clean else None
359
364
365
+ profile = extract_profile (self .opts_parser , self .opts , toolchain )
366
+
360
367
361
368
try :
362
369
build_mbed_libs_result = build_mbed_libs (T ,
@@ -365,7 +372,8 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
365
372
verbose = self .opts_verbose ,
366
373
jobs = self .opts_jobs ,
367
374
report = build_report ,
368
- properties = build_properties )
375
+ properties = build_properties ,
376
+ build_profile = profile )
369
377
370
378
if not build_mbed_libs_result :
371
379
print self .logger .log_line (self .logger .LogType .NOTIF , 'Skipped tests for %s target. Toolchain %s is not yet supported for this target' % (T .name , toolchain ))
@@ -433,7 +441,8 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
433
441
clean = clean_mbed_libs_options ,
434
442
jobs = self .opts_jobs ,
435
443
report = build_report ,
436
- properties = build_properties )
444
+ properties = build_properties ,
445
+ build_profile = profile )
437
446
438
447
except ToolException :
439
448
print self .logger .log_line (self .logger .LogType .ERROR , 'There were errors while building library %s' % (lib_id ))
@@ -484,7 +493,8 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
484
493
report = build_report ,
485
494
properties = build_properties ,
486
495
project_id = test_id ,
487
- project_description = test .get_description ())
496
+ project_description = test .get_description (),
497
+ build_profile = profile )
488
498
489
499
except Exception , e :
490
500
project_name_str = project_name if project_name is not None else test_id
@@ -1784,6 +1794,10 @@ def get_default_test_options_parser():
1784
1794
action = "store_true" ,
1785
1795
help = 'Test only peripheral declared for MUT and skip common tests' )
1786
1796
1797
+ parser .add_argument ("--profile" , dest = "profile" , action = "append" ,
1798
+ type = argparse_filestring_type ,
1799
+ default = [])
1800
+
1787
1801
parser .add_argument ('-C' , '--only-commons' ,
1788
1802
dest = 'test_only_common' ,
1789
1803
default = False ,
0 commit comments