summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py
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/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py
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/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py39
1 files changed, 26 insertions, 13 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py
index 7daae871caf..dc2b99f54bd 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py
@@ -1,13 +1,14 @@
from __future__ import print_function
-
import gdbremote_testcase
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
-class TestGdbRemoteExpeditedRegisters(gdbremote_testcase.GdbRemoteTestCaseBase):
+
+class TestGdbRemoteExpeditedRegisters(
+ gdbremote_testcase.GdbRemoteTestCaseBase):
mydir = TestBase.compute_mydir(__file__)
@@ -19,8 +20,11 @@ class TestGdbRemoteExpeditedRegisters(gdbremote_testcase.GdbRemoteTestCaseBase):
"read packet: $c#63",
# Immediately tell it to stop. We want to see what it reports.
"read packet: {}".format(chr(3)),
- {"direction":"send", "regex":r"^\$T([0-9a-fA-F]+)([^#]+)#[0-9a-fA-F]{2}$", "capture":{1:"stop_result", 2:"key_vals_text"} },
- ], True)
+ {"direction": "send",
+ "regex": r"^\$T([0-9a-fA-F]+)([^#]+)#[0-9a-fA-F]{2}$",
+ "capture": {1: "stop_result",
+ 2: "key_vals_text"}},
+ ], True)
# Run the gdb remote command stream.
context = self.expect_gdbremote_sequence()
@@ -30,13 +34,16 @@ class TestGdbRemoteExpeditedRegisters(gdbremote_testcase.GdbRemoteTestCaseBase):
key_vals_text = context.get("key_vals_text")
self.assertIsNotNone(key_vals_text)
- expedited_registers = self.extract_registers_from_stop_notification(key_vals_text)
+ expedited_registers = self.extract_registers_from_stop_notification(
+ key_vals_text)
self.assertIsNotNone(expedited_registers)
return expedited_registers
- def stop_notification_contains_generic_register(self, generic_register_name):
- # Generate a stop reply, parse out expedited registers from stop notification.
+ def stop_notification_contains_generic_register(
+ self, generic_register_name):
+ # Generate a stop reply, parse out expedited registers from stop
+ # notification.
expedited_registers = self.gather_expedited_registers()
self.assertIsNotNone(expedited_registers)
self.assertTrue(len(expedited_registers) > 0)
@@ -45,7 +52,8 @@ class TestGdbRemoteExpeditedRegisters(gdbremote_testcase.GdbRemoteTestCaseBase):
reg_infos = self.gather_register_infos()
# Find the generic register.
- reg_info = self.find_generic_register_with_name(reg_infos, generic_register_name)
+ reg_info = self.find_generic_register_with_name(
+ reg_infos, generic_register_name)
self.assertIsNotNone(reg_info)
# Ensure the expedited registers contained it.
@@ -53,7 +61,8 @@ class TestGdbRemoteExpeditedRegisters(gdbremote_testcase.GdbRemoteTestCaseBase):
# print("{} reg_info:{}".format(generic_register_name, reg_info))
def stop_notification_contains_any_registers(self):
- # Generate a stop reply, parse out expedited registers from stop notification.
+ # Generate a stop reply, parse out expedited registers from stop
+ # notification.
expedited_registers = self.gather_expedited_registers()
# Verify we have at least one expedited register.
self.assertTrue(len(expedited_registers) > 0)
@@ -73,15 +82,19 @@ class TestGdbRemoteExpeditedRegisters(gdbremote_testcase.GdbRemoteTestCaseBase):
self.stop_notification_contains_any_registers()
def stop_notification_contains_no_duplicate_registers(self):
- # Generate a stop reply, parse out expedited registers from stop notification.
+ # Generate a stop reply, parse out expedited registers from stop
+ # notification.
expedited_registers = self.gather_expedited_registers()
# Verify no expedited register was specified multiple times.
for (reg_num, value) in list(expedited_registers.items()):
- if (type(value) == list) and (len(value) > 0):
- self.fail("expedited register number {} specified more than once ({} times)".format(reg_num, len(value)))
+ if (isinstance(value, list)) and (len(value) > 0):
+ self.fail(
+ "expedited register number {} specified more than once ({} times)".format(
+ reg_num, len(value)))
@debugserver_test
- def test_stop_notification_contains_no_duplicate_registers_debugserver(self):
+ def test_stop_notification_contains_no_duplicate_registers_debugserver(
+ self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
OpenPOWER on IntegriCloud