Skip to content

Commit 8d03fe2

Browse files
committed
Use TerminalNotifier in singletest
1 parent 74aec93 commit 8d03fe2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tools/test_api.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
from tools.utils import argparse_lowercase_type
7878
from tools.utils import argparse_many
7979
from tools.notifier.mock import MockNotifier
80+
from tools.notifier.term import TerminalNotifier
8081

8182
import tools.host_tests.host_tests_plugins as host_tests_plugins
8283

@@ -387,7 +388,8 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
387388
jobs=self.opts_jobs,
388389
report=build_report,
389390
properties=build_properties,
390-
build_profile=profile)
391+
build_profile=profile,
392+
notify=TerminalNotifier())
391393

392394
if not build_mbed_libs_result:
393395
print(self.logger.log_line(
@@ -468,7 +470,8 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
468470
jobs=self.opts_jobs,
469471
report=build_report,
470472
properties=build_properties,
471-
build_profile=profile)
473+
build_profile=profile,
474+
notify=TerminalNotifier())
472475

473476
except ToolException:
474477
print(self.logger.log_line(
@@ -507,13 +510,16 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
507510

508511
project_name = self.opts_firmware_global_name if self.opts_firmware_global_name else None
509512
try:
510-
path = build_project(test.source_dir, join(build_dir, test_id), T,
513+
path = build_project(
514+
test.source_dir, join(build_dir, test_id), T,
511515
toolchain, test.dependencies, clean=clean_project_options,
512516
verbose=self.opts_verbose, name=project_name, macros=MACROS,
513517
inc_dirs=INC_DIRS, jobs=self.opts_jobs, report=build_report,
514518
properties=build_properties, project_id=test_id,
515519
project_description=test.get_description(),
516-
build_profile=profile, stats_depth=stats_depth)
520+
build_profile=profile, stats_depth=stats_depth,
521+
notify=TerminalNotifier(),
522+
)
517523

518524
except Exception as e:
519525
project_name_str = project_name if project_name is not None else test_id

0 commit comments

Comments
 (0)