diff options
author | Tom Pollard <tom.pollard@codethink.co.uk> | 2018-07-19 18:03:40 +0100 |
---|---|---|
committer | Tom <tom.pollard@codethink.co.uk> | 2018-07-30 11:57:49 +0100 |
commit | c313ad179b9c3ed0c99c70d20056359c44a131d7 (patch) | |
tree | 05932a5ac7d799b3cc24b4e1f1aca70f3aef7df3 /buildstream | |
parent | aff76ae9a952a4491215c88edf7b9c19f9db0cd0 (diff) | |
download | buildstream-c313ad179b9c3ed0c99c70d20056359c44a131d7.tar.gz |
widget.py: Limit failure summary to currently failing elementstpollard/386
Change widget.py print_summary() to only print the failure
messages of elements in the Failure Summary that failed on the
current try.
Diffstat (limited to 'buildstream')
-rw-r--r-- | buildstream/_frontend/widget.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/buildstream/_frontend/widget.py b/buildstream/_frontend/widget.py index dab8cab56..1bae73ca0 100644 --- a/buildstream/_frontend/widget.py +++ b/buildstream/_frontend/widget.py @@ -522,12 +522,15 @@ class LogLine(Widget): text += "\n\n" if self._failure_messages: - text += self.content_profile.fmt("Failure Summary\n", bold=True) values = OrderedDict() for element, messages in sorted(self._failure_messages.items(), key=lambda x: x[0].name): - values[element.name] = ''.join(self._render(v) for v in messages) - text += self._format_values(values, style_value=False) + for queue in stream.queues: + if any(el.name == element.name for el in queue.failed_elements): + values[element.name] = ''.join(self._render(v) for v in messages) + if values: + text += self.content_profile.fmt("Failure Summary\n", bold=True) + text += self._format_values(values, style_value=False) text += self.content_profile.fmt("Pipeline Summary\n", bold=True) values = OrderedDict() |