Skip to content

Commit 1dac871

Browse files
authored
Merge pull request #11457 from OPpuolitaival/py_params
tools: add silent option to build
2 parents 70f3cf8 + a53cdcd commit 1dac871

File tree

3 files changed

+10
-20
lines changed

3 files changed

+10
-20
lines changed

tools/build.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,6 @@ def main():
126126
default=False,
127127
help="Silent diagnostic output (no copy, compile notification)")
128128

129-
parser.add_argument("-x", "--extra-verbose-notifications",
130-
action="store_true",
131-
dest="extra_verbose_notify",
132-
default=False,
133-
help="Makes compiler more verbose, CI friendly.")
134-
135129
parser.add_argument("--ignore", dest="ignore", type=argparse_many(str),
136130
default=None, help="Comma separated list of patterns to add to mbedignore (eg. ./main.cpp)")
137131

tools/test.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,21 @@ def main():
110110
default=False,
111111
help="Verbose diagnostic output")
112112

113+
parser.add_argument("--silent",
114+
action="store_true",
115+
dest="silent",
116+
default=False,
117+
help="Silent diagnostic output (no copy, compile notification)")
118+
113119
parser.add_argument("--stats-depth",
114120
type=int,
115121
dest="stats_depth",
116122
default=2,
117123
help="Depth level for static memory report")
124+
118125
parser.add_argument("--ignore", dest="ignore", type=argparse_many(str),
119126
default=None, help="Comma separated list of patterns to add to mbedignore (eg. ./main.cpp)")
127+
120128
parser.add_argument("--icetea",
121129
action="store_true",
122130
dest="icetea",
@@ -243,7 +251,7 @@ def main():
243251
)
244252

245253
# Build sources
246-
notify = TerminalNotifier(options.verbose)
254+
notify = TerminalNotifier(options.verbose, options.silent)
247255
build_library(base_source_paths, options.build_dir, mcu,
248256
toolchain_name, jobs=options.jobs,
249257
clean=options.clean, report=build_report,
@@ -279,7 +287,7 @@ def main():
279287
resource_filter = None
280288

281289
# Build all the tests
282-
notify = TerminalNotifier(options.verbose)
290+
notify = TerminalNotifier(options.verbose, options.silent)
283291
test_build_success, test_build = build_tests(
284292
tests,
285293
[os.path.relpath(options.build_dir)],

tools/test_api.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,11 @@
5353
from tools.utils import ToolException
5454
from tools.utils import NotSupportedException
5555
from tools.utils import construct_enum
56-
from tools.memap import MemapParser
5756
from tools.targets import TARGET_MAP, Target
5857
from tools.config import Config
5958
import tools.test_configs as TestConfig
6059
from tools.build_api import build_project, build_mbed_libs, build_lib
6160
from tools.build_api import get_target_supported_toolchains
62-
from tools.build_api import write_build_report
63-
from tools.build_api import prep_report
64-
from tools.build_api import prep_properties
65-
from tools.build_api import create_result
66-
from tools.build_api import add_result_to_report
67-
from tools.build_api import prepare_toolchain
6861
from tools.build_api import get_config
6962
from tools.resources import Resources, MbedIgnoreSet, IGNORE_FILENAME
7063
from tools.libraries import LIBRARIES, LIBRARY_MAP
@@ -1498,7 +1491,6 @@ def singletest_in_cli_mode(single_test):
14981491
shuffle_seed))
14991492

15001493
print("Completed in %.2f sec" % elapsed_time)
1501-
print
15021494
# Write summary of the builds
15031495

15041496
print_report_exporter = ReportExporter(ResultExporterType.PRINT, package="build")
@@ -2083,7 +2075,6 @@ def build_test_worker(*args, **kwargs):
20832075
This includes arguments that were modified (ex. report)
20842076
}
20852077
"""
2086-
bin_file = None
20872078
ret = {
20882079
'result': False,
20892080
'args': args,
@@ -2152,8 +2143,6 @@ def build_tests(tests, base_source_paths, build_path, target, toolchain_name,
21522143
"test_apps": {}
21532144
}
21542145

2155-
result = True
2156-
21572146
jobs_count = int(jobs if jobs else cpu_count())
21582147
p = Pool(processes=jobs_count)
21592148
results = []
@@ -2163,7 +2152,6 @@ def build_tests(tests, base_source_paths, build_path, target, toolchain_name,
21632152

21642153
test_build_path = os.path.join(build_path, test_paths[0])
21652154
src_paths = base_source_paths + test_paths
2166-
bin_file = None
21672155
test_case_folder_name = os.path.basename(test_paths[0])
21682156

21692157
args = (src_paths, test_build_path, deepcopy(target), toolchain_name)

0 commit comments

Comments
 (0)