10
10
import sys
11
11
import subprocess
12
12
from shutil import rmtree
13
+ from sets import Set
13
14
14
15
ROOT = abspath (dirname (dirname (dirname (dirname (__file__ )))))
15
16
sys .path .insert (0 , ROOT )
@@ -250,11 +251,13 @@ def export_repos(config, ides, targets, examples):
250
251
ides - List of IDES to export to
251
252
"""
252
253
results = {}
254
+ valid_examples = Set (examples )
253
255
print ("\n Exporting example repos....\n " )
254
256
for example in config ['examples' ]:
255
- if example ['name' ] not in examples :
257
+ example_names = [basename (x ['repo' ]) for x in get_repo_list (example )]
258
+ common_examples = valid_examples .intersection (Set (example_names ))
259
+ if not common_examples :
256
260
continue
257
-
258
261
export_failures = []
259
262
build_failures = []
260
263
build_skips = []
@@ -331,9 +334,12 @@ def compile_repos(config, toolchains, targets, examples):
331
334
332
335
"""
333
336
results = {}
337
+ valid_examples = Set (examples )
334
338
print ("\n Compiling example repos....\n " )
335
339
for example in config ['examples' ]:
336
- if example ['name' ] not in examples :
340
+ example_names = [basename (x ['repo' ]) for x in get_repo_list (example )]
341
+ common_examples = valid_examples .intersection (Set (example_names ))
342
+ if not common_examples :
337
343
continue
338
344
failures = []
339
345
successes = []
@@ -349,6 +355,7 @@ def compile_repos(config, toolchains, targets, examples):
349
355
for target , toolchain in target_cross_toolchain (valid_choices (example ['targets' ], targets ),
350
356
valid_choices (example ['toolchains' ], toolchains ),
351
357
example ['features' ]):
358
+ print ("Compiling %s for %s, %s" % (name , target , toolchain ))
352
359
proc = subprocess .Popen (["mbed-cli" , "compile" , "-t" , toolchain ,
353
360
"-m" , target , "--silent" ])
354
361
proc .wait ()
0 commit comments