diff options
author | Kate Stone <katherine.stone@apple.com> | 2016-09-06 20:57:50 +0000 |
---|---|---|
committer | Kate Stone <katherine.stone@apple.com> | 2016-09-06 20:57:50 +0000 |
commit | b9c1b51e45b845debb76d8658edabca70ca56079 (patch) | |
tree | dfcb5a13ef2b014202340f47036da383eaee74aa /lldb/packages/Python/lldbsuite/test_event/event_builder.py | |
parent | d5aa73376966339caad04013510626ec2e42c760 (diff) | |
download | bcm5719-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/event_builder.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test_event/event_builder.py | 19 |
1 files changed, 13 insertions, 6 deletions
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 |