Enabled example exporting Filter ides by toolchains

pull/3467/head
Jimmy Brisson 2016-11-28 14:57:22 -06:00 committed by Anna Bridge
parent 2ac3196496
commit da3ac529d5
2 changed files with 17 additions and 13 deletions

View File

@ -28,7 +28,7 @@
"toolchains" : ["GCC_ARM", "ARM"], "toolchains" : ["GCC_ARM", "ARM"],
"exporters": [], "exporters": [],
"compile" : true, "compile" : true,
"export": false, "export": true,
"auto-update" : true "auto-update" : true
}, },
{ {
@ -37,12 +37,15 @@
"mbed": [ "mbed": [
"https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-mesh-minimal" "https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-mesh-minimal"
], ],
"features" : ["IPV6"], "features" : [],
"targets" : [], "targets" : ["DISCO_F469NI", "DISCO_F746NG", "K64F", "K66F",
"NUCLEO_F429ZI", "NUCLEO_F439ZI", "NUCLEO_F746ZG",
"NUCLEO_F756ZG", "NUCLEO_F767ZI",
"NUMAKER_PFM_NUC472", "UBLOX_EVK_ODIN_W2"],
"toolchains" : [], "toolchains" : [],
"exporters": [], "exporters": [],
"compile" : true, "compile" : true,
"export": false, "export": true,
"auto-update" : true "auto-update" : true
}, },
{ {
@ -74,11 +77,11 @@
"mbed": [ "mbed": [
"https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-client" "https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-client"
], ],
"features" : ["IPV6"], "features" : ["LWIP"],
"targets" : [], "targets" : [],
"toolchains" : [], "toolchains" : [],
"exporters": [], "exporters": [],
"compile" : true, "compile" : false,
"export": false, "export": false,
"auto-update" : true "auto-update" : true
}, },
@ -87,12 +90,12 @@
"github":"https://github.com/ARMmbed/mbed-os-example-sockets", "github":"https://github.com/ARMmbed/mbed-os-example-sockets",
"mbed": [ "mbed": [
], ],
"features" : ["IPV6"], "features" : ["LWIP"],
"targets" : [], "targets" : [],
"toolchains" : [], "toolchains" : [],
"exporters": [], "exporters": [],
"compile" : true, "compile" : true,
"export": false, "export": true,
"auto-update" : true "auto-update" : true
}, },
{ {
@ -117,7 +120,7 @@
"toolchains" : ["GCC_ARM"], "toolchains" : ["GCC_ARM"],
"exporters": [], "exporters": [],
"compile" : true, "compile" : true,
"export": false, "export": true,
"auto-update" : false "auto-update" : false
}, },
{ {
@ -129,7 +132,7 @@
"toolchains" : ["GCC_ARM"], "toolchains" : ["GCC_ARM"],
"exporters": [], "exporters": [],
"compile" : true, "compile" : true,
"export": false, "export": true,
"auto-update" : false "auto-update" : false
}, },
{ {
@ -141,7 +144,7 @@
"toolchains" : ["GCC_ARM"], "toolchains" : ["GCC_ARM"],
"exporters": [], "exporters": [],
"compile" : true, "compile" : true,
"export": false, "export": true,
"auto-update" : false "auto-update" : false
} }
] ]

View File

@ -101,7 +101,7 @@ def target_cross_toolchain(allowed_targets, allowed_toolchains, features=[]):
yield target, toolchain yield target, toolchain
def target_cross_ide(allowed_targets, allowed_ides, features=[]): def target_cross_ide(allowed_targets, allowed_ides, features=[], toolchains=[]):
"""Generate pairs of target and ides """Generate pairs of target and ides
Args: Args:
@ -115,6 +115,7 @@ def target_cross_ide(allowed_targets, allowed_ides, features=[]):
for target in allowed_targets: for target in allowed_targets:
for ide in allowed_ides: for ide in allowed_ides:
if (target in EXPORTERS[ide].TARGETS and if (target in EXPORTERS[ide].TARGETS and
(not toolchains or EXPORTERS[ide].TOOLCHAIN in toolchains) and
all(feature in TARGET_MAP[target].features all(feature in TARGET_MAP[target].features
for feature in features)): for feature in features)):
yield target, ide yield target, ide
@ -268,7 +269,7 @@ def export_repos(config, ides, targets, examples):
# list of valid combinations to work through # list of valid combinations to work through
for target, ide in target_cross_ide(valid_choices(example['targets'], targets), for target, ide in target_cross_ide(valid_choices(example['targets'], targets),
valid_choices(example['exporters'], ides), valid_choices(example['exporters'], ides),
example['features']): example['features'], example['toolchains']):
example_name = "{} {} {}".format(example_project_name, target, example_name = "{} {} {}".format(example_project_name, target,
ide) ide)
def status(message): def status(message):