summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test_event
diff options
context:
space:
mode:
authorKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
committerKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
commitb9c1b51e45b845debb76d8658edabca70ca56079 (patch)
treedfcb5a13ef2b014202340f47036da383eaee74aa /lldb/packages/Python/lldbsuite/test_event
parentd5aa73376966339caad04013510626ec2e42c760 (diff)
downloadbcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.tar.gz
bcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.zip
*** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test_event')
-rw-r--r--lldb/packages/Python/lldbsuite/test_event/build_exception.py10
-rw-r--r--lldb/packages/Python/lldbsuite/test_event/dotest_channels.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test_event/event_builder.py19
-rw-r--r--lldb/packages/Python/lldbsuite/test_event/formatter/__init__.py3
-rw-r--r--lldb/packages/Python/lldbsuite/test_event/formatter/curses.py203
-rw-r--r--lldb/packages/Python/lldbsuite/test_event/formatter/pickled.py12
-rw-r--r--lldb/packages/Python/lldbsuite/test_event/formatter/results_formatter.py5
-rw-r--r--lldb/packages/Python/lldbsuite/test_event/formatter/xunit.py8
-rw-r--r--lldb/packages/Python/lldbsuite/test_event/test/src/TestCatchInvalidDecorator.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test_event/test/src/event_collector.py12
10 files changed, 206 insertions, 70 deletions
diff --git a/lldb/packages/Python/lldbsuite/test_event/build_exception.py b/lldb/packages/Python/lldbsuite/test_event/build_exception.py
index 4a7c5f4a9d3..5b00b92d473 100644
--- a/lldb/packages/Python/lldbsuite/test_event/build_exception.py
+++ b/lldb/packages/Python/lldbsuite/test_event/build_exception.py
@@ -1,8 +1,11 @@
class BuildError(Exception):
+
def __init__(self, called_process_error):
super(BuildError, self).__init__("Error when building test subject")
- self.command = called_process_error.lldb_extensions.get("command", "<command unavailable>")
- self.build_error = called_process_error.lldb_extensions.get("stderr_content", "<error output unavailable>")
+ self.command = called_process_error.lldb_extensions.get(
+ "command", "<command unavailable>")
+ self.build_error = called_process_error.lldb_extensions.get(
+ "stderr_content", "<error output unavailable>")
def __str__(self):
return self.format_build_error(self.command, self.build_error)
@@ -10,5 +13,4 @@ class BuildError(Exception):
@staticmethod
def format_build_error(command, command_output):
return "Error when building test subject.\n\nBuild Command:\n{}\n\nBuild Command Output:\n{}".format(
- command,
- command_output)
+ command, command_output)
diff --git a/lldb/packages/Python/lldbsuite/test_event/dotest_channels.py b/lldb/packages/Python/lldbsuite/test_event/dotest_channels.py
index d69720e4f66..4f79193514b 100644
--- a/lldb/packages/Python/lldbsuite/test_event/dotest_channels.py
+++ b/lldb/packages/Python/lldbsuite/test_event/dotest_channels.py
@@ -42,6 +42,7 @@ class UnpicklingForwardingReaderChannel(asyncore.dispatcher):
The bulk of this class is devoted to reading and parsing out
the payload bytes.
"""
+
def __init__(self, file_object, async_map, forwarding_func):
asyncore.dispatcher.__init__(self, sock=file_object, map=async_map)
@@ -181,6 +182,7 @@ class UnpicklingForwardingListenerChannel(asyncore.dispatcher):
one of the reasons for implementing with asyncore. This listener shuts
down once a single connection is made to it.
"""
+
def __init__(self, async_map, host, port, backlog_count, forwarding_func):
asyncore.dispatcher.__init__(self, map=async_map)
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
diff --git a/lldb/packages/Python/lldbsuite/test_event/event_builder.py b/lldb/packages/Python/lldbsuite/test_event/event_builder.py
index aabbd986bd7..a7cb57c7f9c 100644
--- a/lldb/packages/Python/lldbsuite/test_event/event_builder.py
+++ b/lldb/packages/Python/lldbsuite/test_event/event_builder.py
@@ -20,6 +20,7 @@ import traceback
# LLDB modules
from . import build_exception
+
class EventBuilder(object):
"""Helper class to build test result event dictionaries."""
@@ -95,7 +96,8 @@ class EventBuilder(object):
def _assert_is_python_sourcefile(test_filename):
if test_filename is not None:
if not test_filename.endswith(".py"):
- raise Exception("source python filename has unexpected extension: {}".format(test_filename))
+ raise Exception(
+ "source python filename has unexpected extension: {}".format(test_filename))
return test_filename
@staticmethod
@@ -113,9 +115,11 @@ class EventBuilder(object):
# Determine the filename for the test case. If there is an attribute
# for it, use it. Otherwise, determine from the TestCase class path.
if hasattr(test, "test_filename"):
- test_filename = EventBuilder._assert_is_python_sourcefile(test.test_filename)
+ test_filename = EventBuilder._assert_is_python_sourcefile(
+ test.test_filename)
else:
- test_filename = EventBuilder._assert_is_python_sourcefile(inspect.getsourcefile(test.__class__))
+ test_filename = EventBuilder._assert_is_python_sourcefile(
+ inspect.getsourcefile(test.__class__))
event = EventBuilder.bare_event(event_type)
event.update({
@@ -352,7 +356,8 @@ class EventBuilder(object):
event = EventBuilder.bare_event(EventBuilder.TYPE_JOB_RESULT)
event["status"] = EventBuilder.STATUS_ERROR
if test_filename is not None:
- event["test_filename"] = EventBuilder._assert_is_python_sourcefile(test_filename)
+ event["test_filename"] = EventBuilder._assert_is_python_sourcefile(
+ test_filename)
if exception is not None and "__class__" in dir(exception):
event["issue_class"] = exception.__class__
event["issue_message"] = exception
@@ -390,7 +395,8 @@ class EventBuilder(object):
if exception_description is not None:
event["exception_description"] = exception_description
if test_filename is not None:
- event["test_filename"] = EventBuilder._assert_is_python_sourcefile(test_filename)
+ event["test_filename"] = EventBuilder._assert_is_python_sourcefile(
+ test_filename)
if command_line is not None:
event["command_line"] = command_line
return event
@@ -414,7 +420,8 @@ class EventBuilder(object):
if worker_index is not None:
event["worker_index"] = int(worker_index)
if test_filename is not None:
- event["test_filename"] = EventBuilder._assert_is_python_sourcefile(test_filename)
+ event["test_filename"] = EventBuilder._assert_is_python_sourcefile(
+ test_filename)
if command_line is not None:
event["command_line"] = command_line
return event
diff --git a/lldb/packages/Python/lldbsuite/test_event/formatter/__init__.py b/lldb/packages/Python/lldbsuite/test_event/formatter/__init__.py
index 556370ebb9d..2481e326e94 100644
--- a/lldb/packages/Python/lldbsuite/test_event/formatter/__init__.py
+++ b/lldb/packages/Python/lldbsuite/test_event/formatter/__init__.py
@@ -76,7 +76,8 @@ def create_results_formatter(config):
# we lose the test result info.
read_bytes = sock.recv(1)
if read_bytes is None or (len(read_bytes) < 1) or (read_bytes != b'*'):
- raise Exception("listening socket did not respond with ack byte: response={}".format(read_bytes))
+ raise Exception(
+ "listening socket did not respond with ack byte: response={}".format(read_bytes))
return sock, lambda: socket_closer(sock)
diff --git a/lldb/packages/Python/lldbsuite/test_event/formatter/curses.py b/lldb/packages/Python/lldbsuite/test_event/formatter/curses.py
index 4e89fa9bf01..f415575ded8 100644
--- a/lldb/packages/Python/lldbsuite/test_event/formatter/curses.py
+++ b/lldb/packages/Python/lldbsuite/test_event/formatter/curses.py
@@ -38,7 +38,10 @@ class Curses(results_formatter.ResultsFormatter):
self.results = list()
try:
self.main_window = lldbcurses.intialize_curses()
- self.main_window.add_key_action('\t', self.main_window.select_next_first_responder, "Switch between views that can respond to keyboard input")
+ self.main_window.add_key_action(
+ '\t',
+ self.main_window.select_next_first_responder,
+ "Switch between views that can respond to keyboard input")
self.main_window.refresh()
self.job_panel = None
self.results_panel = None
@@ -87,10 +90,15 @@ class Curses(results_formatter.ResultsFormatter):
selected_idx = self.results_panel.get_selected_idx()
if selected_idx >= 0 and selected_idx < len(self.results):
if self.info_panel is None:
- info_frame = self.results_panel.get_contained_rect(top_inset=10, left_inset=10, right_inset=10, height=30)
- self.info_panel = lldbcurses.BoxedPanel(info_frame, "Result Details")
- # Add a key action for any key that will hide this panel when any key is pressed
- self.info_panel.add_key_action(-1, self.hide_info_panel, 'Hide the info panel')
+ info_frame = self.results_panel.get_contained_rect(
+ top_inset=10, left_inset=10, right_inset=10, height=30)
+ self.info_panel = lldbcurses.BoxedPanel(
+ info_frame, "Result Details")
+ # Add a key action for any key that will hide this panel when
+ # any key is pressed
+ self.info_panel.add_key_action(-1,
+ self.hide_info_panel,
+ 'Hide the info panel')
self.info_panel.top()
else:
self.info_panel.show()
@@ -98,9 +106,15 @@ class Curses(results_formatter.ResultsFormatter):
self.main_window.push_first_responder(self.info_panel)
test_start = self.results[selected_idx][0]
test_result = self.results[selected_idx][1]
- self.info_panel.set_line(0, "File: %s" % (test_start['test_filename']))
- self.info_panel.set_line(1, "Test: %s.%s" % (test_start['test_class'], test_start['test_name']))
- self.info_panel.set_line(2, "Time: %s" % (test_result['elapsed_time']))
+ self.info_panel.set_line(
+ 0, "File: %s" %
+ (test_start['test_filename']))
+ self.info_panel.set_line(
+ 1, "Test: %s.%s" %
+ (test_start['test_class'], test_start['test_name']))
+ self.info_panel.set_line(
+ 2, "Time: %s" %
+ (test_result['elapsed_time']))
self.info_panel.set_line(3, "Status: %s" % (test_result['status']))
def hide_info_panel(self):
@@ -110,7 +124,8 @@ class Curses(results_formatter.ResultsFormatter):
def toggle_status(self, status):
if status:
- # Toggle showing and hiding results whose status matches "status" in "Results" window
+ # Toggle showing and hiding results whose status matches "status"
+ # in "Results" window
if status in self.hide_status_list:
self.hide_status_list.remove(status)
else:
@@ -127,7 +142,13 @@ 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), 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()
@@ -145,9 +166,14 @@ class Curses(results_formatter.ResultsFormatter):
#print(str(test_event), file=self.events_file)
event = test_event['event']
if self.status_panel:
- self.status_panel.update_status('time', str(datetime.timedelta(seconds=math.floor(time.time() - self.start_time))))
+ self.status_panel.update_status(
+ 'time', str(
+ datetime.timedelta(
+ seconds=math.floor(
+ time.time() - self.start_time))))
if event == 'test_start':
- name = test_event['test_class'] + '.' + test_event['test_name']
+ name = test_event['test_class'] + \
+ '.' + test_event['test_name']
self.job_tests[worker_index] = test_event
if 'pid' in test_event:
line = 'pid: %5d ' % (test_event['pid']) + name
@@ -163,14 +189,20 @@ class Curses(results_formatter.ResultsFormatter):
else:
line = ''
self.job_panel.set_line(worker_index, line)
- 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, test_event), elapsed_time, name))
+ name = test_event['test_class'] + \
+ '.' + test_event['test_name']
+ elapsed_time = test_event[
+ 'event_time'] - self.job_tests[worker_index]['event_time']
+ if status not in self.hide_status_list:
+ 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
- self.results.append([self.job_tests[worker_index], test_event])
+ self.results.append(
+ [self.job_tests[worker_index], test_event])
self.job_tests[worker_index] = ''
elif event == 'job_begin':
self.jobs[worker_index] = test_event
@@ -185,40 +217,121 @@ class Curses(results_formatter.ResultsFormatter):
elif event == 'initialize':
self.initialize_event = test_event
num_jobs = test_event['worker_count']
- job_frame = self.main_window.get_contained_rect(height=num_jobs+2)
- results_frame = self.main_window.get_contained_rect(top_inset=num_jobs+2, bottom_inset=1)
- status_frame = self.main_window.get_contained_rect(height=1, top_inset=self.main_window.get_size().h-1)
- self.job_panel = lldbcurses.BoxedPanel(frame=job_frame, title="Jobs")
- self.results_panel = lldbcurses.BoxedPanel(frame=results_frame, title="Results")
-
- self.results_panel.add_key_action(curses.KEY_UP, self.results_panel.select_prev , "Select the previous list entry")
- self.results_panel.add_key_action(curses.KEY_DOWN, self.results_panel.select_next , "Select the next list entry")
- self.results_panel.add_key_action(curses.KEY_HOME, self.results_panel.scroll_begin , "Scroll to the start of the list")
- self.results_panel.add_key_action(curses.KEY_END, self.results_panel.scroll_end , "Scroll to the end of the list")
- self.results_panel.add_key_action(curses.KEY_ENTER, self.show_info_panel , "Display info for the selected result item")
- self.results_panel.add_key_action('.', lambda : self.toggle_status(EventBuilder.STATUS_SUCCESS) , "Toggle showing/hiding tests whose status is 'success'")
- self.results_panel.add_key_action('e', lambda : self.toggle_status(EventBuilder.STATUS_ERROR) , "Toggle showing/hiding tests whose status is 'error'")
- self.results_panel.add_key_action('f', lambda : self.toggle_status(EventBuilder.STATUS_FAILURE) , "Toggle showing/hiding tests whose status is 'failure'")
- self.results_panel.add_key_action('s', lambda : self.toggle_status(EventBuilder.STATUS_SKIP) , "Toggle showing/hiding tests whose status is 'skip'")
- self.results_panel.add_key_action('x', lambda : self.toggle_status(EventBuilder.STATUS_EXPECTED_FAILURE) , "Toggle showing/hiding tests whose status is 'expected_failure'")
- self.results_panel.add_key_action('?', lambda : self.toggle_status(EventBuilder.STATUS_UNEXPECTED_SUCCESS), "Toggle showing/hiding tests whose status is 'unexpected_success'")
- self.status_panel = lldbcurses.StatusPanel(frame=status_frame)
+ job_frame = self.main_window.get_contained_rect(
+ height=num_jobs + 2)
+ results_frame = self.main_window.get_contained_rect(
+ top_inset=num_jobs + 2, bottom_inset=1)
+ status_frame = self.main_window.get_contained_rect(
+ height=1, top_inset=self.main_window.get_size().h - 1)
+ self.job_panel = lldbcurses.BoxedPanel(
+ frame=job_frame, title="Jobs")
+ self.results_panel = lldbcurses.BoxedPanel(
+ frame=results_frame, title="Results")
+
+ self.results_panel.add_key_action(
+ curses.KEY_UP,
+ self.results_panel.select_prev,
+ "Select the previous list entry")
+ self.results_panel.add_key_action(
+ curses.KEY_DOWN, self.results_panel.select_next, "Select the next list entry")
+ self.results_panel.add_key_action(
+ curses.KEY_HOME,
+ self.results_panel.scroll_begin,
+ "Scroll to the start of the list")
+ self.results_panel.add_key_action(
+ curses.KEY_END, self.results_panel.scroll_end, "Scroll to the end of the list")
+ self.results_panel.add_key_action(
+ curses.KEY_ENTER,
+ self.show_info_panel,
+ "Display info for the selected result item")
+ self.results_panel.add_key_action(
+ '.',
+ lambda: self.toggle_status(
+ EventBuilder.STATUS_SUCCESS),
+ "Toggle showing/hiding tests whose status is 'success'")
+ self.results_panel.add_key_action(
+ 'e',
+ lambda: self.toggle_status(
+ EventBuilder.STATUS_ERROR),
+ "Toggle showing/hiding tests whose status is 'error'")
+ self.results_panel.add_key_action(
+ 'f',
+ lambda: self.toggle_status(
+ EventBuilder.STATUS_FAILURE),
+ "Toggle showing/hiding tests whose status is 'failure'")
+ self.results_panel.add_key_action('s', lambda: self.toggle_status(
+ EventBuilder.STATUS_SKIP), "Toggle showing/hiding tests whose status is 'skip'")
+ self.results_panel.add_key_action(
+ 'x',
+ lambda: self.toggle_status(
+ EventBuilder.STATUS_EXPECTED_FAILURE),
+ "Toggle showing/hiding tests whose status is 'expected_failure'")
+ self.results_panel.add_key_action(
+ '?',
+ lambda: self.toggle_status(
+ EventBuilder.STATUS_UNEXPECTED_SUCCESS),
+ "Toggle showing/hiding tests whose status is 'unexpected_success'")
+ self.status_panel = lldbcurses.StatusPanel(
+ frame=status_frame)
self.main_window.add_child(self.job_panel)
self.main_window.add_child(self.results_panel)
self.main_window.add_child(self.status_panel)
- self.main_window.set_first_responder(self.results_panel)
-
- self.status_panel.add_status_item(name="time", title="Elapsed", format="%s", width=20, value="0:00:00", update=False)
- self.status_panel.add_status_item(name=EventBuilder.STATUS_SUCCESS, title="Success", format="%u", width=20, value=0, update=False)
- self.status_panel.add_status_item(name=EventBuilder.STATUS_FAILURE, title="Failure", format="%u", width=20, value=0, update=False)
- self.status_panel.add_status_item(name=EventBuilder.STATUS_ERROR, title="Error", format="%u", width=20, value=0, update=False)
- self.status_panel.add_status_item(name=EventBuilder.STATUS_SKIP, title="Skipped", format="%u", width=20, value=0, update=True)
- self.status_panel.add_status_item(name=EventBuilder.STATUS_EXPECTED_FAILURE, title="Expected Failure", format="%u", width=30, value=0, update=False)
- self.status_panel.add_status_item(name=EventBuilder.STATUS_UNEXPECTED_SUCCESS, title="Unexpected Success", format="%u", width=30, value=0, update=False)
+ self.main_window.set_first_responder(
+ self.results_panel)
+
+ self.status_panel.add_status_item(
+ name="time",
+ title="Elapsed",
+ format="%s",
+ width=20,
+ value="0:00:00",
+ update=False)
+ self.status_panel.add_status_item(
+ name=EventBuilder.STATUS_SUCCESS,
+ title="Success",
+ format="%u",
+ width=20,
+ value=0,
+ update=False)
+ self.status_panel.add_status_item(
+ name=EventBuilder.STATUS_FAILURE,
+ title="Failure",
+ format="%u",
+ width=20,
+ value=0,
+ update=False)
+ self.status_panel.add_status_item(
+ name=EventBuilder.STATUS_ERROR,
+ title="Error",
+ format="%u",
+ width=20,
+ value=0,
+ update=False)
+ self.status_panel.add_status_item(
+ name=EventBuilder.STATUS_SKIP,
+ title="Skipped",
+ format="%u",
+ width=20,
+ value=0,
+ update=True)
+ self.status_panel.add_status_item(
+ name=EventBuilder.STATUS_EXPECTED_FAILURE,
+ title="Expected Failure",
+ format="%u",
+ width=30,
+ value=0,
+ update=False)
+ self.status_panel.add_status_item(
+ name=EventBuilder.STATUS_UNEXPECTED_SUCCESS,
+ title="Unexpected Success",
+ format="%u",
+ width=30,
+ value=0,
+ update=False)
self.main_window.refresh()
elif event == 'terminate':
- #self.main_window.key_event_loop()
+ # self.main_window.key_event_loop()
lldbcurses.terminate_curses()
check_for_one_key = False
self.using_terminal = False
diff --git a/lldb/packages/Python/lldbsuite/test_event/formatter/pickled.py b/lldb/packages/Python/lldbsuite/test_event/formatter/pickled.py
index 6d800f6c8ba..588614e2f7b 100644
--- a/lldb/packages/Python/lldbsuite/test_event/formatter/pickled.py
+++ b/lldb/packages/Python/lldbsuite/test_event/formatter/pickled.py
@@ -31,21 +31,29 @@ class RawPickledFormatter(ResultsFormatter):
return parser
class StreamSerializer(object):
+
@staticmethod
def serialize(test_event, out_file):
- # Send it as {serialized_length_of_serialized_bytes}{serialized_bytes}
+ # Send it as
+ # {serialized_length_of_serialized_bytes}{serialized_bytes}
import struct
msg = cPickle.dumps(test_event)
packet = struct.pack("!I%ds" % len(msg), len(msg), msg)
out_file.send(packet)
class BlockSerializer(object):
+
@staticmethod
def serialize(test_event, out_file):
cPickle.dump(test_event, out_file)
def __init__(self, out_file, options, file_is_stream):
- super(RawPickledFormatter, self).__init__(out_file, options, file_is_stream)
+ super(
+ RawPickledFormatter,
+ self).__init__(
+ out_file,
+ options,
+ file_is_stream)
self.pid = os.getpid()
if file_is_stream:
self.serializer = self.StreamSerializer()
diff --git a/lldb/packages/Python/lldbsuite/test_event/formatter/results_formatter.py b/lldb/packages/Python/lldbsuite/test_event/formatter/results_formatter.py
index 3bf389b9726..e2c1d8ce396 100644
--- a/lldb/packages/Python/lldbsuite/test_event/formatter/results_formatter.py
+++ b/lldb/packages/Python/lldbsuite/test_event/formatter/results_formatter.py
@@ -341,7 +341,8 @@ class ResultsFormatter(object):
# started test for the given worker index.
status = test_event["status"]
self.result_status_counts[status] += 1
- # Clear the most recently started test for the related worker.
+ # Clear the most recently started test for the related
+ # worker.
worker_index = test_event.get("worker_index", None)
if worker_index is not None:
self.started_tests_by_worker.pop(worker_index, None)
@@ -688,7 +689,7 @@ class ResultsFormatter(object):
# prevent buildbots from thinking it is an issue when scanning
# for TIMEOUT.
"Expected Timeout", True, "EXPECTED TIME-OUT"]
- ]
+ ]
# Partition all the events by test result status
result_events_by_status = self._partition_results_by_status(
diff --git a/lldb/packages/Python/lldbsuite/test_event/formatter/xunit.py b/lldb/packages/Python/lldbsuite/test_event/formatter/xunit.py
index b3682f8fb10..d3ea8677f0a 100644
--- a/lldb/packages/Python/lldbsuite/test_event/formatter/xunit.py
+++ b/lldb/packages/Python/lldbsuite/test_event/formatter/xunit.py
@@ -180,7 +180,7 @@ class XunitFormatter(ResultsFormatter):
"unexpected_successes": [],
"expected_failures": [],
"all": []
- }
+ }
self.status_handlers = {
EventBuilder.STATUS_SUCCESS: self._handle_success,
@@ -197,9 +197,11 @@ class XunitFormatter(ResultsFormatter):
self._handle_exceptional_exit,
EventBuilder.STATUS_TIMEOUT:
self._handle_timeout
- }
+ }
- RESULT_TYPES = {EventBuilder.TYPE_TEST_RESULT, EventBuilder.TYPE_JOB_RESULT}
+ RESULT_TYPES = {
+ EventBuilder.TYPE_TEST_RESULT,
+ EventBuilder.TYPE_JOB_RESULT}
def handle_event(self, test_event):
super(XunitFormatter, self).handle_event(test_event)
diff --git a/lldb/packages/Python/lldbsuite/test_event/test/src/TestCatchInvalidDecorator.py b/lldb/packages/Python/lldbsuite/test_event/test/src/TestCatchInvalidDecorator.py
index 56814416c33..5b199defc5d 100644
--- a/lldb/packages/Python/lldbsuite/test_event/test/src/TestCatchInvalidDecorator.py
+++ b/lldb/packages/Python/lldbsuite/test_event/test/src/TestCatchInvalidDecorator.py
@@ -63,7 +63,7 @@ def _filter_error_results(events):
for event in events
if event.get("event", None) in ["job_result", "test_result"] and
event.get("status", None) == "error"
- ]
+ ]
if __name__ == "__main__":
diff --git a/lldb/packages/Python/lldbsuite/test_event/test/src/event_collector.py b/lldb/packages/Python/lldbsuite/test_event/test/src/event_collector.py
index 35d13206689..6b64cc71ac6 100644
--- a/lldb/packages/Python/lldbsuite/test_event/test/src/event_collector.py
+++ b/lldb/packages/Python/lldbsuite/test_event/test/src/event_collector.py
@@ -65,9 +65,9 @@ def collect_events_whole_file(test_filename):
"--inferior",
"--results-formatter=lldbsuite.test_event.formatter.pickled.RawPickledFormatter",
"--results-file={}".format(events_filename),
- "-p", os.path.basename(test_filename),
- os.path.dirname(test_filename)
- ]
+ "-p",
+ os.path.basename(test_filename),
+ os.path.dirname(test_filename)]
return _collect_events_with_command(command, events_filename)
@@ -79,7 +79,7 @@ def collect_events_for_directory_with_filter(test_filename, filter_desc):
"--inferior",
"--results-formatter=lldbsuite.test_event.formatter.pickled.RawPickledFormatter",
"--results-file={}".format(events_filename),
- "-f", filter_desc,
- os.path.dirname(test_filename)
- ]
+ "-f",
+ filter_desc,
+ os.path.dirname(test_filename)]
return _collect_events_with_command(command, events_filename)
OpenPOWER on IntegriCloud