mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #10301 from alekla01/examples-verbose-patch-1
examples test compile optional verbosepull/10354/head
commit
65ada92527
|
@ -77,6 +77,12 @@ def main():
|
|||
help=("build profile file"),
|
||||
metavar="profile")
|
||||
|
||||
compile_cmd.add_argument("-v", "--verbose",
|
||||
action="store_true",
|
||||
dest="verbose",
|
||||
default=False,
|
||||
help="Verbose diagnostic output")
|
||||
|
||||
export_cmd = subparsers.add_parser("export")
|
||||
export_cmd.set_defaults(fn=do_export),
|
||||
export_cmd.add_argument(
|
||||
|
@ -131,8 +137,7 @@ def do_deploy(_, config, examples):
|
|||
def do_compile(args, config, examples):
|
||||
"""Do the compile step"""
|
||||
results = {}
|
||||
results = lib.compile_repos(config, args.toolchains, args.mcu, args.profile, examples)
|
||||
|
||||
results = lib.compile_repos(config, args.toolchains, args.mcu, args.profile, args.verbose, examples)
|
||||
lib.print_summary(results)
|
||||
failures = lib.get_num_failures(results)
|
||||
print("Number of failures = %d" % failures)
|
||||
|
|
|
@ -347,7 +347,7 @@ def export_repos(config, ides, targets, examples):
|
|||
return results
|
||||
|
||||
|
||||
def compile_repos(config, toolchains, targets, profile, examples):
|
||||
def compile_repos(config, toolchains, targets, profile, verbose, examples):
|
||||
"""Compiles combinations of example programs, targets and compile chains.
|
||||
|
||||
The results are returned in a [key: value] dictionary format:
|
||||
|
@ -391,7 +391,7 @@ def compile_repos(config, toolchains, targets, profile, examples):
|
|||
valid_choices(example['toolchains'], toolchains),
|
||||
example['features']):
|
||||
print("Compiling %s for %s, %s" % (name, target, toolchain))
|
||||
build_command = ["mbed-cli", "compile", "-t", toolchain, "-m", target, "-v"]
|
||||
build_command = ["mbed-cli", "compile", "-t", toolchain, "-m", target] + (['-v'] if verbose else [])
|
||||
|
||||
if profile:
|
||||
build_command.append("--profile")
|
||||
|
|
Loading…
Reference in New Issue