@@ -75,7 +75,13 @@ def print_summary(results, export=False):
75
75
76
76
print ("#" )
77
77
print ("#" * 80 )
78
-
78
+
79
+ def valid_targets (allowed_targets , targets ):
80
+ if len (allowed_targets ) > 0 :
81
+ return [t for t in targets if t in allowed_targets ]
82
+ else :
83
+ return targets
84
+
79
85
80
86
def target_cross_toolchain (allowed_toolchains ,
81
87
features = [], targets = []):
@@ -272,7 +278,7 @@ def export_repos(config, ides, targets, examples):
272
278
# list of valid combinations to work through
273
279
for target , ide in target_cross_ide (ides ,
274
280
example ['features' ],
275
- example ['targets' ] or targets ):
281
+ valid_targets ( example ['targets' ], targets ) ):
276
282
example_name = "{} {} {}" .format (example_project_name , target ,
277
283
ide )
278
284
def status (message ):
@@ -354,7 +360,7 @@ def compile_repos(config, toolchains, targets, examples):
354
360
# list of valid combinations to work through
355
361
for target , toolchain in target_cross_toolchain (toolchains ,
356
362
example ['features' ],
357
- example ['targets' ] or targets ):
363
+ valid_targets ( example ['targets' ], targets ) ):
358
364
proc = subprocess .Popen (["mbed-cli" , "compile" , "-t" , toolchain ,
359
365
"-m" , target , "--silent" ])
360
366
proc .wait ()
0 commit comments