[Lldb-commits] [lldb] r255705 - test infra: support test reruns in xunit formatter.
Todd Fiala via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 15 15:25:56 PST 2015
Author: tfiala
Date: Tue Dec 15 17:25:56 2015
New Revision: 255705
URL: http://llvm.org/viewvc/llvm-project?rev=255705&view=rev
Log:
test infra: support test reruns in xunit formatter.
Modified:
lldb/trunk/packages/Python/lldbsuite/test/xunit_formatter.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/xunit_formatter.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/xunit_formatter.py?rev=255705&r1=255704&r2=255705&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/xunit_formatter.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/xunit_formatter.py Tue Dec 15 17:25:56 2015
@@ -188,6 +188,8 @@ class XunitFormatter(ResultsFormatter):
EventBuilder.STATUS_SKIP: self._handle_skip,
EventBuilder.STATUS_EXPECTED_FAILURE:
self._handle_expected_failure,
+ EventBuilder.STATUS_EXPECTED_TIMEOUT:
+ self._handle_expected_timeout,
EventBuilder.STATUS_UNEXPECTED_SUCCESS:
self._handle_unexpected_success,
EventBuilder.STATUS_EXCEPTIONAL_EXIT:
@@ -208,14 +210,11 @@ class XunitFormatter(ResultsFormatter):
return
if event_type == "terminate":
+ # Process all the final result events into their
+ # XML counterparts.
+ for result_event in self.result_events.values():
+ self._process_test_result(result_event)
self._finish_output()
- elif event_type == "test_start":
- self.track_start_time(
- test_event["test_class"],
- test_event["test_name"],
- test_event["event_time"])
- elif event_type in self.RESULT_TYPES:
- self._process_test_result(test_event)
else:
# This is an unknown event.
if self.options.assert_on_unknown_events:
@@ -402,6 +401,13 @@ class XunitFormatter(ResultsFormatter):
raise Exception(
"unknown xfail option: {}".format(self.options.xfail))
+ def _handle_expected_timeout(self, test_event):
+ """Handles expected_timeout.
+ @param test_event the test event to handle.
+ """
+ # We don't do anything with expected timeouts, not even report.
+ pass
+
def _handle_unexpected_success(self, test_event):
"""Handles a test that passed but was expected to fail.
@param test_event the test event to handle.
More information about the lldb-commits
mailing list