diff options
author | Todd Fiala <todd.fiala@gmail.com> | 2016-05-14 00:42:30 +0000 |
---|---|---|
committer | Todd Fiala <todd.fiala@gmail.com> | 2016-05-14 00:42:30 +0000 |
commit | 4728cf7e852a4378a1b26508d5881ff2137bb3a3 (patch) | |
tree | e23b9d4078a045664eb57ed4ed2b87caf020f84a /lldb/packages/Python/lldbsuite/test_event/formatter/curses.py | |
parent | 0c020d11afaf188e5ecf6da20a37f29beb82223d (diff) | |
download | bcm5719-llvm-4728cf7e852a4378a1b26508d5881ff2137bb3a3.tar.gz bcm5719-llvm-4728cf7e852a4378a1b26508d5881ff2137bb3a3.zip |
surface build error content through test event system
Summary:
print build errors nicely in test output
This test infrastructure change adds a new Python exception
for test subject builds that fail. The output of the build
command is captured and propagated to both the textual test
output display code and to the test event system.
The ResultsFormatter objects have been modified to do something
more useful with this information. The xUnit formatter
now replaces the non-informative Python build error stacktrace
with the build error content. The curses ResultsFormatter
prints a 'B' for build errors rather than 'E'.
The xUnit output, in particular, makes it much easier for
developers to track down test subject build errors that cause
test failures when reports come in from CI.
Reviewers: granata.enrico
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D20252
llvm-svn: 269525
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test_event/formatter/curses.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test_event/formatter/curses.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lldb/packages/Python/lldbsuite/test_event/formatter/curses.py b/lldb/packages/Python/lldbsuite/test_event/formatter/curses.py index 07b33860974..4e89fa9bf01 100644 --- a/lldb/packages/Python/lldbsuite/test_event/formatter/curses.py +++ b/lldb/packages/Python/lldbsuite/test_event/formatter/curses.py @@ -59,7 +59,7 @@ class Curses(results_formatter.ResultsFormatter): # if tee_results_formatter: # self.formatters.append(tee_results_formatter) - def status_to_short_str(self, status): + def status_to_short_str(self, status, test_event): if status == EventBuilder.STATUS_SUCCESS: return '.' elif status == EventBuilder.STATUS_FAILURE: @@ -71,7 +71,11 @@ class Curses(results_formatter.ResultsFormatter): elif status == EventBuilder.STATUS_SKIP: return 'S' elif status == EventBuilder.STATUS_ERROR: - return 'E' + if test_event.get("issue_phase", None) == "build": + # Build failure + return 'B' + else: + return 'E' elif status == EventBuilder.STATUS_TIMEOUT: return 'T' elif status == EventBuilder.STATUS_EXPECTED_TIMEOUT: @@ -123,7 +127,7 @@ class Curses(results_formatter.ResultsFormatter): if status in self.hide_status_list: continue name = test_result['test_class'] + '.' + test_result['test_name'] - self.results_panel.append_line('%s (%6.2f sec) %s' % (self.status_to_short_str(status), test_result['elapsed_time'], name)) + self.results_panel.append_line('%s (%6.2f sec) %s' % (self.status_to_short_str(status, test_result), test_result['elapsed_time'], name)) if update: self.main_window.refresh() @@ -162,7 +166,7 @@ class Curses(results_formatter.ResultsFormatter): name = test_event['test_class'] + '.' + test_event['test_name'] elapsed_time = test_event['event_time'] - self.job_tests[worker_index]['event_time'] if not status in self.hide_status_list: - self.results_panel.append_line('%s (%6.2f sec) %s' % (self.status_to_short_str(status), elapsed_time, name)) + self.results_panel.append_line('%s (%6.2f sec) %s' % (self.status_to_short_str(status, test_event), elapsed_time, name)) self.main_window.refresh() # Append the result pairs test_event['elapsed_time'] = elapsed_time |