summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter
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/python_api/lldbutil/iter
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/python_api/lldbutil/iter')
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py19
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py29
2 files changed, 32 insertions, 16 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py
index 90f879d3761..ae7ec3dfc3c 100644
--- a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py
+++ b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py
@@ -5,14 +5,15 @@ Test the iteration protocol for some lldb container objects.
from __future__ import print_function
-
-import os, time
+import os
+import time
import re
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
+
class LLDBIteratorTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@@ -21,7 +22,8 @@ class LLDBIteratorTestCase(TestBase):
# Call super's setUp().
TestBase.setUp(self)
# Find the line numbers to break inside main().
- self.line1 = line_number('main.cpp', '// Set break point at this line.')
+ self.line1 = line_number(
+ 'main.cpp', '// Set break point at this line.')
self.line2 = line_number('main.cpp', '// And that line.')
@add_test_categories(['pyapi'])
@@ -37,7 +39,8 @@ class LLDBIteratorTestCase(TestBase):
self.assertTrue(breakpoint, VALID_BREAKPOINT)
# Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple (None, None, self.get_process_working_directory())
+ process = target.LaunchSimple(
+ None, None, self.get_process_working_directory())
if not process:
self.fail("SBTarget.LaunchProcess() failed")
@@ -55,8 +58,9 @@ class LLDBIteratorTestCase(TestBase):
if self.TraceOn():
print("yours[%d]='%s'" % (i, get_description(yours[i])))
print("mine[%d]='%s'" % (i, get_description(mine[i])))
- self.assertTrue(yours[i] == mine[i],
- "UUID+FileSpec of yours[{0}] and mine[{0}] matches".format(i))
+ self.assertTrue(
+ yours[i] == mine[i],
+ "UUID+FileSpec of yours[{0}] and mine[{0}] matches".format(i))
@add_test_categories(['pyapi'])
def test_lldb_iter_breakpoint(self):
@@ -103,7 +107,8 @@ class LLDBIteratorTestCase(TestBase):
self.assertTrue(breakpoint, VALID_BREAKPOINT)
# Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple (None, None, self.get_process_working_directory())
+ process = target.LaunchSimple(
+ None, None, self.get_process_working_directory())
if not process:
self.fail("SBTarget.LaunchProcess() failed")
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py
index 84ef44d2dd7..49a78888ad8 100644
--- a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py
+++ b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py
@@ -5,14 +5,15 @@ Test the iteration protocol for frame registers.
from __future__ import print_function
-
-import os, time
+import os
+import time
import re
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
+
class RegistersIteratorTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@@ -21,7 +22,8 @@ class RegistersIteratorTestCase(TestBase):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break inside main().
- self.line1 = line_number('main.cpp', '// Set break point at this line.')
+ self.line1 = line_number(
+ 'main.cpp', '// Set break point at this line.')
@add_test_categories(['pyapi'])
@expectedFailureAll(oslist=["windows"])
@@ -37,7 +39,8 @@ class RegistersIteratorTestCase(TestBase):
self.assertTrue(breakpoint, VALID_BREAKPOINT)
# Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple (None, None, self.get_process_working_directory())
+ process = target.LaunchSimple(
+ None, None, self.get_process_working_directory())
if not process:
self.fail("SBTarget.LaunchProcess() failed")
@@ -46,14 +49,17 @@ class RegistersIteratorTestCase(TestBase):
for thread in process:
if thread.GetStopReason() == lldb.eStopReasonBreakpoint:
for frame in thread:
- # Dump the registers of this frame using lldbutil.get_GPRs() and friends.
+ # Dump the registers of this frame using
+ # lldbutil.get_GPRs() and friends.
if self.TraceOn():
print(frame)
REGs = lldbutil.get_GPRs(frame)
num = len(REGs)
if self.TraceOn():
- print("\nNumber of general purpose registers: %d" % num)
+ print(
+ "\nNumber of general purpose registers: %d" %
+ num)
for reg in REGs:
self.assertTrue(reg)
if self.TraceOn():
@@ -72,11 +78,15 @@ class RegistersIteratorTestCase(TestBase):
if self.platformIsDarwin():
num = len(REGs)
if self.TraceOn():
- print("\nNumber of exception state registers: %d" % num)
+ print(
+ "\nNumber of exception state registers: %d" %
+ num)
for reg in REGs:
self.assertTrue(reg)
if self.TraceOn():
- print("%s => %s" % (reg.GetName(), reg.GetValue()))
+ print(
+ "%s => %s" %
+ (reg.GetName(), reg.GetValue()))
else:
self.assertIsNone(REGs)
@@ -86,7 +96,8 @@ class RegistersIteratorTestCase(TestBase):
REGs = lldbutil.get_registers(frame, kind)
self.assertTrue(REGs)
- REGs = lldbutil.get_registers(frame, "Exception State Registers")
+ REGs = lldbutil.get_registers(
+ frame, "Exception State Registers")
if self.platformIsDarwin():
self.assertIsNotNone(REGs)
else:
OpenPOWER on IntegriCloud