Merge pull request #11457 from OPpuolitaival/py_params

tools: add silent option to build
pull/11727/head
Martin Kojtal 2019-10-21 09:19:12 +02:00 committed by GitHub
commit 1dac871523
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 20 deletions

View File

@ -126,12 +126,6 @@ def main():
default=False,
help="Silent diagnostic output (no copy, compile notification)")
parser.add_argument("-x", "--extra-verbose-notifications",
action="store_true",
dest="extra_verbose_notify",
default=False,
help="Makes compiler more verbose, CI friendly.")
parser.add_argument("--ignore", dest="ignore", type=argparse_many(str),
default=None, help="Comma separated list of patterns to add to mbedignore (eg. ./main.cpp)")

View File

@ -110,13 +110,21 @@ def main():
default=False,
help="Verbose diagnostic output")
parser.add_argument("--silent",
action="store_true",
dest="silent",
default=False,
help="Silent diagnostic output (no copy, compile notification)")
parser.add_argument("--stats-depth",
type=int,
dest="stats_depth",
default=2,
help="Depth level for static memory report")
parser.add_argument("--ignore", dest="ignore", type=argparse_many(str),
default=None, help="Comma separated list of patterns to add to mbedignore (eg. ./main.cpp)")
parser.add_argument("--icetea",
action="store_true",
dest="icetea",
@ -243,7 +251,7 @@ def main():
)
# Build sources
notify = TerminalNotifier(options.verbose)
notify = TerminalNotifier(options.verbose, options.silent)
build_library(base_source_paths, options.build_dir, mcu,
toolchain_name, jobs=options.jobs,
clean=options.clean, report=build_report,
@ -279,7 +287,7 @@ def main():
resource_filter = None
# Build all the tests
notify = TerminalNotifier(options.verbose)
notify = TerminalNotifier(options.verbose, options.silent)
test_build_success, test_build = build_tests(
tests,
[os.path.relpath(options.build_dir)],

View File

@ -53,18 +53,11 @@ from tools.paths import HOST_TESTS
from tools.utils import ToolException
from tools.utils import NotSupportedException
from tools.utils import construct_enum
from tools.memap import MemapParser
from tools.targets import TARGET_MAP, Target
from tools.config import Config
import tools.test_configs as TestConfig
from tools.build_api import build_project, build_mbed_libs, build_lib
from tools.build_api import get_target_supported_toolchains
from tools.build_api import write_build_report
from tools.build_api import prep_report
from tools.build_api import prep_properties
from tools.build_api import create_result
from tools.build_api import add_result_to_report
from tools.build_api import prepare_toolchain
from tools.build_api import get_config
from tools.resources import Resources, MbedIgnoreSet, IGNORE_FILENAME
from tools.libraries import LIBRARIES, LIBRARY_MAP
@ -1498,7 +1491,6 @@ def singletest_in_cli_mode(single_test):
shuffle_seed))
print("Completed in %.2f sec" % elapsed_time)
print
# Write summary of the builds
print_report_exporter = ReportExporter(ResultExporterType.PRINT, package="build")
@ -2083,7 +2075,6 @@ def build_test_worker(*args, **kwargs):
This includes arguments that were modified (ex. report)
}
"""
bin_file = None
ret = {
'result': False,
'args': args,
@ -2152,8 +2143,6 @@ def build_tests(tests, base_source_paths, build_path, target, toolchain_name,
"test_apps": {}
}
result = True
jobs_count = int(jobs if jobs else cpu_count())
p = Pool(processes=jobs_count)
results = []
@ -2163,7 +2152,6 @@ def build_tests(tests, base_source_paths, build_path, target, toolchain_name,
test_build_path = os.path.join(build_path, test_paths[0])
src_paths = base_source_paths + test_paths
bin_file = None
test_case_folder_name = os.path.basename(test_paths[0])
args = (src_paths, test_build_path, deepcopy(target), toolchain_name)