@@ -437,7 +437,7 @@ def target_supports_toolchain(target, toolchain_name):
437
437
def prepare_toolchain (src_paths , build_dir , target , toolchain_name ,
438
438
macros = None , clean = False , jobs = 1 ,
439
439
notify = None , config = None , app_config = None ,
440
- build_profile = None , ignore = None ):
440
+ build_profile = None , ignore = None , coverage_patterns = None ):
441
441
""" Prepares resource related objects - toolchain, target, config
442
442
443
443
Positional arguments:
@@ -477,6 +477,9 @@ def prepare_toolchain(src_paths, build_dir, target, toolchain_name,
477
477
target .default_toolchain = "uARM"
478
478
toolchain_name = selected_toolchain_name
479
479
480
+ if coverage_patterns :
481
+ target .extra_labels .append (u'COVERAGE' )
482
+
480
483
try :
481
484
cur_tc = TOOLCHAIN_CLASSES [toolchain_name ]
482
485
except KeyError :
@@ -488,7 +491,7 @@ def prepare_toolchain(src_paths, build_dir, target, toolchain_name,
488
491
profile [key ].extend (contents [toolchain_name ].get (key , []))
489
492
490
493
toolchain = cur_tc (
491
- target , notify , macros , build_dir = build_dir , build_profile = profile )
494
+ target , notify , macros , build_dir = build_dir , build_profile = profile , coverage_patterns = coverage_patterns )
492
495
493
496
toolchain .config = config
494
497
toolchain .jobs = jobs
@@ -511,7 +514,7 @@ def build_project(src_paths, build_path, target, toolchain_name,
511
514
report = None , properties = None , project_id = None ,
512
515
project_description = None , config = None ,
513
516
app_config = None , build_profile = None , stats_depth = None ,
514
- ignore = None , resource_filter = None ):
517
+ ignore = None , resource_filter = None , coverage_patterns = None ):
515
518
""" Build a project. A project may be a test or a user program.
516
519
517
520
Positional arguments:
@@ -556,7 +559,7 @@ def build_project(src_paths, build_path, target, toolchain_name,
556
559
toolchain = prepare_toolchain (
557
560
src_paths , build_path , target , toolchain_name , macros = macros ,
558
561
clean = clean , jobs = jobs , notify = notify , config = config ,
559
- app_config = app_config , build_profile = build_profile , ignore = ignore )
562
+ app_config = app_config , build_profile = build_profile , ignore = ignore , coverage_patterns = coverage_patterns )
560
563
toolchain .version_check ()
561
564
562
565
# The first path will give the name to the library
@@ -662,7 +665,7 @@ def build_library(src_paths, build_path, target, toolchain_name,
662
665
archive = True , notify = None , macros = None , inc_dirs = None , jobs = 1 ,
663
666
report = None , properties = None , project_id = None ,
664
667
remove_config_header_file = False , app_config = None ,
665
- build_profile = None , ignore = None , resource_filter = None ):
668
+ build_profile = None , ignore = None , resource_filter = None , coverage_patterns = None ):
666
669
""" Build a library
667
670
668
671
Positional arguments:
@@ -713,7 +716,7 @@ def build_library(src_paths, build_path, target, toolchain_name,
713
716
toolchain = prepare_toolchain (
714
717
src_paths , build_path , target , toolchain_name , macros = macros ,
715
718
clean = clean , jobs = jobs , notify = notify , app_config = app_config ,
716
- build_profile = build_profile , ignore = ignore )
719
+ build_profile = build_profile , ignore = ignore , coverage_patterns = coverage_patterns )
717
720
toolchain .version_check ()
718
721
719
722
# The first path will give the name to the library
0 commit comments