@@ -2009,9 +2009,10 @@ def status_(ignore=False):
20092009 dict (name = ['-c' , '--clean' ], action = 'store_true' , help = 'Clean the build directory before compiling' ),
20102010 dict (name = ['-N' , '--artifact-name' ], help = 'Name of the built program or library' ),
20112011 dict (name = ['-S' , '--supported' ], dest = 'supported' , action = 'store_true' , help = 'Shows supported matrix of targets and toolchains' ),
2012+ dict (name = '--app-config' , dest = "app_config" , help = "Path of an app configuration file (Default is to look for 'mbed_app.json')" ),
20122013 help = 'Compile code using the mbed build tools' ,
20132014 description = ("Compile this program using the mbed build tools." ))
2014- def compile_ (toolchain = None , target = None , options = False , compile_library = False , compile_config = False , config_prefix = None , source = False , build = False , clean = False , artifact_name = None , supported = False ):
2015+ def compile_ (toolchain = None , target = None , options = False , compile_library = False , compile_config = False , config_prefix = None , source = False , build = False , clean = False , artifact_name = None , supported = False , app_config = None ):
20152016 # Gather remaining arguments
20162017 args = remainder
20172018 # Find the root of the program
@@ -2032,6 +2033,7 @@ def compile_(toolchain=None, target=None, options=False, compile_library=False,
20322033 if supported :
20332034 popen (['python' , '-u' , os .path .join (tools_dir , 'make.py' )]
20342035 + (['-S' ] if supported else []) + (['-v' ] if very_verbose else [])
2036+ + (['--app-config' , app_config ] if app_config else [])
20352037 + args ,
20362038 env = env )
20372039 return
@@ -2078,6 +2080,7 @@ def compile_(toolchain=None, target=None, options=False, compile_library=False,
20782080 + ['--build' , build ]
20792081 + (['-c' ] if clean else [])
20802082 + (['--artifact-name' , artifact_name ] if artifact_name else [])
2083+ + (['--app-config' , app_config ] if app_config else [])
20812084 + (['-v' ] if verbose else [])
20822085 + args ,
20832086 env = env )
@@ -2099,9 +2102,10 @@ def compile_(toolchain=None, target=None, options=False, compile_library=False,
20992102 dict (name = ['-o' , '--options' ], action = 'append' , help = 'Compile options. Examples: "debug-info": generate debugging information; "small-build" to use microlib/nanolib, but limit RTOS to single thread; "save-asm": save the asm generated by the compiler' ),
21002103 dict (name = ['-c' , '--clean' ], action = 'store_true' , help = 'Clean the build directory before compiling' ),
21012104 dict (name = '--test-spec' , dest = "test_spec" , help = "Path used for the test spec file used when building and running tests (the default path is the build directory)" ),
2105+ dict (name = '--app-config' , dest = "app_config" , help = "Path of an app configuration file (Default is to look for 'mbed_app.json')" ),
21022106 help = 'Find, build and run tests' ,
21032107 description = ("Find, build, and run tests in a program and libraries" ))
2104- def test_ (toolchain = None , target = None , compile_list = False , run_list = False , compile_only = False , run_only = False , tests_by_name = None , source = False , options = False , build = False , clean = False , test_spec = None ):
2108+ def test_ (toolchain = None , target = None , compile_list = False , run_list = False , compile_only = False , run_only = False , tests_by_name = None , source = False , options = False , build = False , clean = False , test_spec = None , app_config = None ):
21052109 # Gather remaining arguments
21062110 args = remainder
21072111 # Find the root of the program
@@ -2143,6 +2147,7 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
21432147 + list (chain .from_iterable (izip (repeat ('--source' ), source )))
21442148 + (['-n' , tests_by_name ] if tests_by_name else [])
21452149 + (['-v' ] if verbose else [])
2150+ + (['--app-config' , app_config ] if app_config else [])
21462151 + args ,
21472152 env = env )
21482153
@@ -2157,20 +2162,23 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
21572162 + ['--test-spec' , test_spec ]
21582163 + (['-n' , tests_by_name ] if tests_by_name else [])
21592164 + (['-v' ] if verbose else [])
2165+ + (['--app-config' , app_config ] if app_config else [])
21602166 + args ,
21612167 env = env )
21622168
21632169 if run_list :
21642170 popen (['mbedgt' , '--test-spec' , test_spec , '--list' ]
21652171 + (['-n' , tests_by_name ] if tests_by_name else [])
21662172 + (['-V' ] if verbose else [])
2173+ + (['--app-config' , app_config ] if app_config else [])
21672174 + args ,
21682175 env = env )
21692176
21702177 if run_only or build_and_run_tests :
21712178 popen (['mbedgt' , '--test-spec' , test_spec ]
21722179 + (['-n' , tests_by_name ] if tests_by_name else [])
21732180 + (['-V' ] if verbose else [])
2181+ + (['--app-config' , app_config ] if app_config else [])
21742182 + args ,
21752183 env = env )
21762184
0 commit comments