File tree Expand file tree Collapse file tree 3 files changed +13
-9
lines changed Expand file tree Collapse file tree 3 files changed +13
-9
lines changed Original file line number Diff line number Diff line change 52
52
53
53
if __name__ == '__main__' :
54
54
# Parse Options
55
- parser = get_default_options_parser ()
55
+ parser = get_default_options_parser (add_app_config = True )
56
56
group = parser .add_mutually_exclusive_group (required = False )
57
57
group .add_argument ("-p" ,
58
58
type = argparse_many (test_known ),
274
274
silent = options .silent ,
275
275
macros = options .macros ,
276
276
jobs = options .jobs ,
277
- name = options .artifact_name )
277
+ name = options .artifact_name ,
278
+ app_config = options .app_config )
278
279
print 'Image: %s' % bin_file
279
280
280
281
if options .disk :
Original file line number Diff line number Diff line change 18
18
from tools .toolchains import TOOLCHAINS
19
19
from tools .targets import TARGET_NAMES
20
20
from tools .utils import argparse_force_uppercase_type , \
21
- argparse_lowercase_hyphen_type , argparse_many
21
+ argparse_lowercase_hyphen_type , argparse_many , \
22
+ argparse_filestring_type
22
23
23
- def get_default_options_parser (add_clean = True , add_options = True ):
24
+ def get_default_options_parser (add_clean = True , add_options = True ,
25
+ add_app_config = False ):
24
26
"""Create a new options parser with the default compiler options added
25
27
26
28
Keyword arguments:
@@ -78,4 +80,9 @@ def get_default_options_parser(add_clean=True, add_options=True):
78
80
'analyze' ],
79
81
"build option" ))
80
82
83
+ if add_app_config :
84
+ parser .add_argument ("--app-config" , default = None , dest = "app_config" ,
85
+ type = argparse_filestring_type ,
86
+ help = "Path of an app configuration file (Default is to look for 'mbed_app.json')" )
87
+
81
88
return parser
Original file line number Diff line number Diff line change 41
41
if __name__ == '__main__' :
42
42
try :
43
43
# Parse Options
44
- parser = get_default_options_parser ()
44
+ parser = get_default_options_parser (add_app_config = True )
45
45
46
46
parser .add_argument ("-D" ,
47
47
action = "append" ,
94
94
default = False ,
95
95
help = "Verbose diagnostic output" )
96
96
97
- parser .add_argument ("--app-config" , default = None , dest = "app_config" ,
98
- type = argparse_filestring_type ,
99
- help = "Path of an app configuration file (Default is to look for 'mbed_app.json')" )
100
-
101
97
options = parser .parse_args ()
102
98
103
99
# Filter tests by path if specified
You can’t perform that action at this time.
0 commit comments