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 5252
5353if __name__ == '__main__' :
5454 # Parse Options
55- parser = get_default_options_parser ()
55+ parser = get_default_options_parser (add_app_config = True )
5656 group = parser .add_mutually_exclusive_group (required = False )
5757 group .add_argument ("-p" ,
5858 type = argparse_many (test_known ),
274274 silent = options .silent ,
275275 macros = options .macros ,
276276 jobs = options .jobs ,
277- name = options .artifact_name )
277+ name = options .artifact_name ,
278+ app_config = options .app_config )
278279 print 'Image: %s' % bin_file
279280
280281 if options .disk :
Original file line number Diff line number Diff line change 1818from tools .toolchains import TOOLCHAINS
1919from tools .targets import TARGET_NAMES
2020from 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
2223
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 ):
2426 """Create a new options parser with the default compiler options added
2527
2628 Keyword arguments:
@@ -80,4 +82,9 @@ def get_default_options_parser(add_clean=True, add_options=True):
8082 'std-lib' ],
8183 "build option" ))
8284
85+ if add_app_config :
86+ parser .add_argument ("--app-config" , default = None , dest = "app_config" ,
87+ type = argparse_filestring_type ,
88+ help = "Path of an app configuration file (Default is to look for 'mbed_app.json')" )
89+
8390 return parser
Original file line number Diff line number Diff line change 4141if __name__ == '__main__' :
4242 try :
4343 # Parse Options
44- parser = get_default_options_parser ()
44+ parser = get_default_options_parser (add_app_config = True )
4545
4646 parser .add_argument ("-D" ,
4747 action = "append" ,
9494 default = False ,
9595 help = "Verbose diagnostic output" )
9696
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-
10197 options = parser .parse_args ()
10298
10399 # Filter tests by path if specified
You can’t perform that action at this time.
0 commit comments