Skip to content

Commit 9da9166

Browse files
authored
Merge pull request #3331 from theotherjimmy/enable-exporters-examples
Enabled example export building for more examples
2 parents 04f940d + 5698085 commit 9da9166

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

tools/test/examples/examples.json

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"toolchains" : ["GCC_ARM", "ARM"],
2929
"exporters": [],
3030
"compile" : true,
31-
"export": false,
31+
"export": true,
3232
"auto-update" : true
3333
},
3434
{
@@ -37,12 +37,15 @@
3737
"mbed": [
3838
"https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-mesh-minimal"
3939
],
40-
"features" : ["IPV6"],
41-
"targets" : [],
40+
"features" : [],
41+
"targets" : ["DISCO_F469NI", "DISCO_F746NG", "K64F", "K66F",
42+
"NUCLEO_F429ZI", "NUCLEO_F439ZI", "NUCLEO_F746ZG",
43+
"NUCLEO_F756ZG", "NUCLEO_F767ZI",
44+
"NUMAKER_PFM_NUC472", "UBLOX_EVK_ODIN_W2"],
4245
"toolchains" : [],
4346
"exporters": [],
4447
"compile" : true,
45-
"export": false,
48+
"export": true,
4649
"auto-update" : true
4750
},
4851
{
@@ -74,11 +77,11 @@
7477
"mbed": [
7578
"https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-client"
7679
],
77-
"features" : ["IPV6"],
80+
"features" : ["LWIP"],
7881
"targets" : [],
7982
"toolchains" : [],
8083
"exporters": [],
81-
"compile" : true,
84+
"compile" : false,
8285
"export": false,
8386
"auto-update" : true
8487
},
@@ -87,12 +90,12 @@
8790
"github":"https://github.com/ARMmbed/mbed-os-example-sockets",
8891
"mbed": [
8992
],
90-
"features" : ["IPV6"],
93+
"features" : ["LWIP"],
9194
"targets" : [],
9295
"toolchains" : [],
9396
"exporters": [],
9497
"compile" : true,
95-
"export": false,
98+
"export": true,
9699
"auto-update" : true
97100
},
98101
{
@@ -117,7 +120,7 @@
117120
"toolchains" : ["GCC_ARM"],
118121
"exporters": [],
119122
"compile" : true,
120-
"export": false,
123+
"export": true,
121124
"auto-update" : false
122125
},
123126
{
@@ -129,7 +132,7 @@
129132
"toolchains" : ["GCC_ARM"],
130133
"exporters": [],
131134
"compile" : true,
132-
"export": false,
135+
"export": true,
133136
"auto-update" : false
134137
},
135138
{
@@ -141,7 +144,7 @@
141144
"toolchains" : ["GCC_ARM"],
142145
"exporters": [],
143146
"compile" : true,
144-
"export": false,
147+
"export": true,
145148
"auto-update" : false
146149
}
147150
]

tools/test/examples/examples_lib.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def target_cross_toolchain(allowed_targets, allowed_toolchains, features=[]):
101101
yield target, toolchain
102102

103103

104-
def target_cross_ide(allowed_targets, allowed_ides, features=[]):
104+
def target_cross_ide(allowed_targets, allowed_ides, features=[], toolchains=[]):
105105
"""Generate pairs of target and ides
106106
107107
Args:
@@ -115,6 +115,7 @@ def target_cross_ide(allowed_targets, allowed_ides, features=[]):
115115
for target in allowed_targets:
116116
for ide in allowed_ides:
117117
if (target in EXPORTERS[ide].TARGETS and
118+
(not toolchains or EXPORTERS[ide].TOOLCHAIN in toolchains) and
118119
all(feature in TARGET_MAP[target].features
119120
for feature in features)):
120121
yield target, ide
@@ -268,7 +269,7 @@ def export_repos(config, ides, targets, examples):
268269
# list of valid combinations to work through
269270
for target, ide in target_cross_ide(valid_choices(example['targets'], targets),
270271
valid_choices(example['exporters'], ides),
271-
example['features']):
272+
example['features'], example['toolchains']):
272273
example_name = "{} {} {}".format(example_project_name, target,
273274
ide)
274275
def status(message):

0 commit comments

Comments
 (0)