summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/knotty.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui/knotty.py')
-rw-r--r--bitbake/lib/bb/ui/knotty.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index f86999bb09..5956ab177c 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -640,7 +640,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
640 return_value = 0 640 return_value = 0
641 errors = 0 641 errors = 0
642 warnings = 0 642 warnings = 0
643 taskfailures = [] 643 taskfailures = {}
644 644
645 printintervaldelta = 10 * 60 # 10 minutes 645 printintervaldelta = 10 * 60 # 10 minutes
646 printinterval = printintervaldelta 646 printinterval = printintervaldelta
@@ -726,6 +726,8 @@ def main(server, eventHandler, params, tf = TerminalFilter):
726 if isinstance(event, bb.build.TaskFailed): 726 if isinstance(event, bb.build.TaskFailed):
727 return_value = 1 727 return_value = 1
728 print_event_log(event, includelogs, loglines, termfilter) 728 print_event_log(event, includelogs, loglines, termfilter)
729 k = "{}:{}".format(event._fn, event._task)
730 taskfailures[k] = event.logfile
729 if isinstance(event, bb.build.TaskBase): 731 if isinstance(event, bb.build.TaskBase):
730 logger.info(event._message) 732 logger.info(event._message)
731 continue 733 continue
@@ -821,7 +823,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
821 823
822 if isinstance(event, bb.runqueue.runQueueTaskFailed): 824 if isinstance(event, bb.runqueue.runQueueTaskFailed):
823 return_value = 1 825 return_value = 1
824 taskfailures.append(event.taskstring) 826 taskfailures.setdefault(event.taskstring)
825 logger.error(str(event)) 827 logger.error(str(event))
826 continue 828 continue
827 829
@@ -942,11 +944,19 @@ def main(server, eventHandler, params, tf = TerminalFilter):
942 try: 944 try:
943 termfilter.clearFooter() 945 termfilter.clearFooter()
944 summary = "" 946 summary = ""
947 def print_hyperlink(url, link_text):
948 start = f'\033]8;;{url}\033\\'
949 end = '\033]8;;\033\\'
950 return f'{start}{link_text}{end}'
951
945 if taskfailures: 952 if taskfailures:
946 summary += pluralise("\nSummary: %s task failed:", 953 summary += pluralise("\nSummary: %s task failed:",
947 "\nSummary: %s tasks failed:", len(taskfailures)) 954 "\nSummary: %s tasks failed:", len(taskfailures))
948 for failure in taskfailures: 955 for (failure, log_file) in taskfailures.items():
949 summary += "\n %s" % failure 956 summary += "\n %s" % failure
957 if log_file:
958 hyperlink = print_hyperlink(f"file://{log_file}", log_file)
959 summary += "\n log: {}".format(hyperlink)
950 if warnings: 960 if warnings:
951 summary += pluralise("\nSummary: There was %s WARNING message.", 961 summary += pluralise("\nSummary: There was %s WARNING message.",
952 "\nSummary: There were %s WARNING messages.", warnings) 962 "\nSummary: There were %s WARNING messages.", warnings)