summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
diff options
context:
space:
mode:
authorTodd Fiala <todd.fiala@gmail.com>2015-12-15 23:25:56 +0000
committerTodd Fiala <todd.fiala@gmail.com>2015-12-15 23:25:56 +0000
commit3a7fcbb4415f10f20e415c112cf212d1dfde24c7 (patch)
tree7fcc8971026160f4a731a17f49f5d95209479a01 /lldb/packages/Python/lldbsuite
parentfc69e7d65b51bbaf17d7a0330beec08d19123ead (diff)
downloadbcm5719-llvm-3a7fcbb4415f10f20e415c112cf212d1dfde24c7.tar.gz
bcm5719-llvm-3a7fcbb4415f10f20e415c112cf212d1dfde24c7.zip
test infra: support test reruns in xunit formatter.
llvm-svn: 255705
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r--lldb/packages/Python/lldbsuite/test/xunit_formatter.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/xunit_formatter.py b/lldb/packages/Python/lldbsuite/test/xunit_formatter.py
index d792c1ff2d7..35fdba449a0 100644
--- a/lldb/packages/Python/lldbsuite/test/xunit_formatter.py
+++ b/lldb/packages/Python/lldbsuite/test/xunit_formatter.py
@@ -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.
OpenPOWER on IntegriCloud