@@ -2009,9 +2009,10 @@ def status_(ignore=False):
2009
2009
dict (name = ['-c' , '--clean' ], action = 'store_true' , help = 'Clean the build directory before compiling' ),
2010
2010
dict (name = ['-N' , '--artifact-name' ], help = 'Name of the built program or library' ),
2011
2011
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')" ),
2012
2013
help = 'Compile code using the mbed build tools' ,
2013
2014
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 ):
2015
2016
# Gather remaining arguments
2016
2017
args = remainder
2017
2018
# Find the root of the program
@@ -2032,6 +2033,7 @@ def compile_(toolchain=None, target=None, options=False, compile_library=False,
2032
2033
if supported :
2033
2034
popen (['python' , '-u' , os .path .join (tools_dir , 'make.py' )]
2034
2035
+ (['-S' ] if supported else []) + (['-v' ] if very_verbose else [])
2036
+ + (['--app-config' , app_config ] if app_config else [])
2035
2037
+ args ,
2036
2038
env = env )
2037
2039
return
@@ -2078,6 +2080,7 @@ def compile_(toolchain=None, target=None, options=False, compile_library=False,
2078
2080
+ ['--build' , build ]
2079
2081
+ (['-c' ] if clean else [])
2080
2082
+ (['--artifact-name' , artifact_name ] if artifact_name else [])
2083
+ + (['--app-config' , app_config ] if app_config else [])
2081
2084
+ (['-v' ] if verbose else [])
2082
2085
+ args ,
2083
2086
env = env )
@@ -2099,9 +2102,10 @@ def compile_(toolchain=None, target=None, options=False, compile_library=False,
2099
2102
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' ),
2100
2103
dict (name = ['-c' , '--clean' ], action = 'store_true' , help = 'Clean the build directory before compiling' ),
2101
2104
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')" ),
2102
2106
help = 'Find, build and run tests' ,
2103
2107
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 ):
2105
2109
# Gather remaining arguments
2106
2110
args = remainder
2107
2111
# Find the root of the program
@@ -2143,6 +2147,7 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
2143
2147
+ list (chain .from_iterable (izip (repeat ('--source' ), source )))
2144
2148
+ (['-n' , tests_by_name ] if tests_by_name else [])
2145
2149
+ (['-v' ] if verbose else [])
2150
+ + (['--app-config' , app_config ] if app_config else [])
2146
2151
+ args ,
2147
2152
env = env )
2148
2153
@@ -2157,20 +2162,23 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
2157
2162
+ ['--test-spec' , test_spec ]
2158
2163
+ (['-n' , tests_by_name ] if tests_by_name else [])
2159
2164
+ (['-v' ] if verbose else [])
2165
+ + (['--app-config' , app_config ] if app_config else [])
2160
2166
+ args ,
2161
2167
env = env )
2162
2168
2163
2169
if run_list :
2164
2170
popen (['mbedgt' , '--test-spec' , test_spec , '--list' ]
2165
2171
+ (['-n' , tests_by_name ] if tests_by_name else [])
2166
2172
+ (['-V' ] if verbose else [])
2173
+ + (['--app-config' , app_config ] if app_config else [])
2167
2174
+ args ,
2168
2175
env = env )
2169
2176
2170
2177
if run_only or build_and_run_tests :
2171
2178
popen (['mbedgt' , '--test-spec' , test_spec ]
2172
2179
+ (['-n' , tests_by_name ] if tests_by_name else [])
2173
2180
+ (['-V' ] if verbose else [])
2181
+ + (['--app-config' , app_config ] if app_config else [])
2174
2182
+ args ,
2175
2183
env = env )
2176
2184
0 commit comments