@@ -228,35 +228,36 @@ def get_num_failures(results, export=False):
228
228
229
229
return num_failures
230
230
231
-
232
- def export_repos (config , ides ):
231
+ def export_repos (config , ides , targets , examples ):
233
232
"""Exports and builds combinations of example programs, targets and IDEs.
234
233
235
- The results are returned in a [key: value] dictionary format:
236
- Where key = The example name from the json config file
237
- value = a list containing: pass_status, successes, export failures, build_failures,
238
- and build_skips
239
-
240
- where pass_status = The overall pass status for the export of the full
241
- set of example programs comprising the example suite.
242
- (IE they must build and export)
243
- True if all examples pass, false otherwise
244
- successes = list of examples that exported and built (if possible)
245
- If the exporter has no build functionality, then it is a pass
246
- if exported
247
- export_failures = list of examples that failed to export.
248
- build_failures = list of examples that failed to build
249
- build_skips = list of examples that cannot build
250
-
251
- Both successes and failures contain the example name, target and IDE
252
-
253
- Args:
254
- config - the json object imported from the file.
255
- ides - List of IDES to export to
256
- """
234
+ The results are returned in a [key: value] dictionary format:
235
+ Where key = The example name from the json config file
236
+ value = a list containing: pass_status, successes, export failures, build_failures,
237
+ and build_skips
238
+
239
+ where pass_status = The overall pass status for the export of the full
240
+ set of example programs comprising the example suite.
241
+ IE they must build and export) True if all examples pass, false otherwise
242
+ successes = list of examples that exported and built (if possible)
243
+ If the exporter has no build functionality, then it is a pass
244
+ if exported
245
+ export_failures = list of examples that failed to export.
246
+ build_failures = list of examples that failed to build
247
+ build_skips = list of examples that cannot build
248
+
249
+ Both successes and failures contain the example name, target and IDE
250
+
251
+ Args:
252
+ config - the json object imported from the file.
253
+ ides - List of IDES to export to
254
+ """
257
255
results = {}
258
256
print ("\n Exporting example repos....\n " )
259
257
for example in config ['examples' ]:
258
+ if example ['name' ] not in examples :
259
+ continue
260
+
260
261
export_failures = []
261
262
build_failures = []
262
263
build_skips = []
@@ -271,7 +272,7 @@ def export_repos(config, ides):
271
272
# list of valid combinations to work through
272
273
for target , ide in target_cross_ide (ides ,
273
274
example ['features' ],
274
- example ['targets' ]):
275
+ example ['targets' ] or targets ):
275
276
example_name = "{} {} {}" .format (example_project_name , target ,
276
277
ide )
277
278
def status (message ):
@@ -311,7 +312,7 @@ def status(message):
311
312
return results
312
313
313
314
314
- def compile_repos (config , toolchains ):
315
+ def compile_repos (config , toolchains , targets , examples ):
315
316
"""Compiles combinations of example programs, targets and compile chains.
316
317
317
318
The results are returned in a [key: value] dictionary format:
@@ -334,7 +335,9 @@ def compile_repos(config, toolchains):
334
335
"""
335
336
results = {}
336
337
print ("\n Compiling example repos....\n " )
337
- for example in config ['examples' ]:
338
+ for example in config ['examples' ]:
339
+ if example ['name' ] not in examples :
340
+ continue
338
341
failures = []
339
342
successes = []
340
343
compiled = True
@@ -350,7 +353,8 @@ def compile_repos(config, toolchains):
350
353
# Check that the target, toolchain and features combinations are valid and return a
351
354
# list of valid combinations to work through
352
355
for target , toolchain in target_cross_toolchain (toolchains ,
353
- example ['features' ], example ['targets' ]):
356
+ example ['features' ],
357
+ example ['targets' ] or targets ):
354
358
proc = subprocess .Popen (["mbed-cli" , "compile" , "-t" , toolchain ,
355
359
"-m" , target , "--silent" ])
356
360
proc .wait ()
@@ -372,7 +376,7 @@ def compile_repos(config, toolchains):
372
376
return results
373
377
374
378
375
- def update_mbedos_version (config , tag ):
379
+ def update_mbedos_version (config , tag , example ):
376
380
""" For each example repo identified in the config json object, update the version of
377
381
mbed-os to that specified by the supplied GitHub tag. This function assumes that each
378
382
example repo has already been cloned.
0 commit comments