mirror of https://github.com/ARMmbed/mbed-os.git
Add app config switch to options.py and make.py
parent
7c72a22508
commit
aafcf55407
|
@ -52,7 +52,7 @@ from tools.settings import CLI_COLOR_MAP
|
|||
|
||||
if __name__ == '__main__':
|
||||
# Parse Options
|
||||
parser = get_default_options_parser()
|
||||
parser = get_default_options_parser(add_app_config=True)
|
||||
group = parser.add_mutually_exclusive_group(required=False)
|
||||
group.add_argument("-p",
|
||||
type=argparse_many(test_known),
|
||||
|
@ -274,7 +274,8 @@ if __name__ == '__main__':
|
|||
silent=options.silent,
|
||||
macros=options.macros,
|
||||
jobs=options.jobs,
|
||||
name=options.artifact_name)
|
||||
name=options.artifact_name,
|
||||
app_config=options.app_config)
|
||||
print 'Image: %s'% bin_file
|
||||
|
||||
if options.disk:
|
||||
|
|
|
@ -18,9 +18,11 @@ from argparse import ArgumentParser
|
|||
from tools.toolchains import TOOLCHAINS
|
||||
from tools.targets import TARGET_NAMES
|
||||
from tools.utils import argparse_force_uppercase_type, \
|
||||
argparse_lowercase_hyphen_type, argparse_many
|
||||
argparse_lowercase_hyphen_type, argparse_many, \
|
||||
argparse_filestring_type
|
||||
|
||||
def get_default_options_parser(add_clean=True, add_options=True):
|
||||
def get_default_options_parser(add_clean=True, add_options=True,
|
||||
add_app_config=False):
|
||||
"""Create a new options parser with the default compiler options added
|
||||
|
||||
Keyword arguments:
|
||||
|
@ -80,4 +82,9 @@ def get_default_options_parser(add_clean=True, add_options=True):
|
|||
'std-lib'],
|
||||
"build option"))
|
||||
|
||||
if add_app_config:
|
||||
parser.add_argument("--app-config", default=None, dest="app_config",
|
||||
type=argparse_filestring_type,
|
||||
help="Path of an app configuration file (Default is to look for 'mbed_app.json')")
|
||||
|
||||
return parser
|
||||
|
|
|
@ -41,7 +41,7 @@ from tools.settings import CLI_COLOR_MAP
|
|||
if __name__ == '__main__':
|
||||
try:
|
||||
# Parse Options
|
||||
parser = get_default_options_parser()
|
||||
parser = get_default_options_parser(add_app_config=True)
|
||||
|
||||
parser.add_argument("-D",
|
||||
action="append",
|
||||
|
@ -94,10 +94,6 @@ if __name__ == '__main__':
|
|||
default=False,
|
||||
help="Verbose diagnostic output")
|
||||
|
||||
parser.add_argument("--app-config", default=None, dest="app_config",
|
||||
type=argparse_filestring_type,
|
||||
help="Path of an app configuration file (Default is to look for 'mbed_app.json')")
|
||||
|
||||
options = parser.parse_args()
|
||||
|
||||
# Filter tests by path if specified
|
||||
|
|
Loading…
Reference in New Issue