Skip to content

Commit 7dc4848

Browse files
author
Cruz Monrreal
authored
Merge pull request #7124 from theotherjimmy/term-notify-singletest
Tool: Use TerminalNotifier in singletest
2 parents 277d5d6 + 8d03fe2 commit 7dc4848

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

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

391393
if not build_mbed_libs_result:
392394
print(self.logger.log_line(
@@ -466,7 +468,8 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
466468
jobs=self.opts_jobs,
467469
report=build_report,
468470
properties=build_properties,
469-
build_profile=profile)
471+
build_profile=profile,
472+
notify=TerminalNotifier())
470473

471474
except ToolException:
472475
print(self.logger.log_line(
@@ -505,13 +508,16 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
505508

506509
project_name = self.opts_firmware_global_name if self.opts_firmware_global_name else None
507510
try:
508-
path = build_project(test.source_dir, join(build_dir, test_id), T,
511+
path = build_project(
512+
test.source_dir, join(build_dir, test_id), T,
509513
toolchain, test.dependencies, clean=clean_project_options,
510514
name=project_name, macros=MACROS,
511515
inc_dirs=INC_DIRS, jobs=self.opts_jobs, report=build_report,
512516
properties=build_properties, project_id=test_id,
513517
project_description=test.get_description(),
514-
build_profile=profile, stats_depth=stats_depth)
518+
build_profile=profile, stats_depth=stats_depth,
519+
notify=TerminalNotifier(),
520+
)
515521

516522
except Exception as e:
517523
project_name_str = project_name if project_name is not None else test_id

0 commit comments

Comments
 (0)