summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump
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/functionalities/thread/jump
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/functionalities/thread/jump')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py54
1 files changed, 37 insertions, 17 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py
index 4c55bcd982a..26ee5d4084e 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py
@@ -5,13 +5,14 @@ Test jumping to different places.
from __future__ import print_function
-
-import os, time
+import os
+import time
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
+
class ThreadJumpTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@@ -29,31 +30,50 @@ class ThreadJumpTestCase(TestBase):
self.mark4 = line_number('main.cpp', '// 4th marker')
self.mark5 = line_number('other.cpp', '// other marker')
- lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.mark3, num_expected_locations=1)
+ lldbutil.run_break_set_by_file_and_line(
+ self, "main.cpp", self.mark3, num_expected_locations=1)
self.runCmd("run", RUN_SUCCEEDED)
# The stop reason of the thread should be breakpoint 1.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT + " 1",
- substrs=['stopped', 'main.cpp:{}'.format(self.mark3), 'stop reason = breakpoint 1'])
+ self.expect(
+ "thread list",
+ STOPPED_DUE_TO_BREAKPOINT + " 1",
+ substrs=[
+ 'stopped',
+ 'main.cpp:{}'.format(
+ self.mark3),
+ 'stop reason = breakpoint 1'])
- self.do_min_test(self.mark3, self.mark1, "i", "4"); # Try the int path, force it to return 'a'
- self.do_min_test(self.mark3, self.mark2, "i", "5"); # Try the int path, force it to return 'b'
- self.do_min_test(self.mark4, self.mark1, "j", "7"); # Try the double path, force it to return 'a'
- self.do_min_test(self.mark4, self.mark2, "j", "8"); # Try the double path, force it to return 'b'
+ # Try the int path, force it to return 'a'
+ self.do_min_test(self.mark3, self.mark1, "i", "4")
+ # Try the int path, force it to return 'b'
+ self.do_min_test(self.mark3, self.mark2, "i", "5")
+ # Try the double path, force it to return 'a'
+ self.do_min_test(self.mark4, self.mark1, "j", "7")
+ # Try the double path, force it to return 'b'
+ self.do_min_test(self.mark4, self.mark2, "j", "8")
# Try jumping to another function in a different file.
- self.runCmd("thread jump --file other.cpp --line %i --force" % self.mark5)
+ self.runCmd(
+ "thread jump --file other.cpp --line %i --force" %
+ self.mark5)
self.expect("process status",
- substrs = ["at other.cpp:%i" % self.mark5])
+ substrs=["at other.cpp:%i" % self.mark5])
# Try jumping to another function (without forcing)
- self.expect("j main.cpp:%i" % self.mark1, COMMAND_FAILED_AS_EXPECTED, error = True,
- substrs = ["error"])
-
+ self.expect(
+ "j main.cpp:%i" %
+ self.mark1,
+ COMMAND_FAILED_AS_EXPECTED,
+ error=True,
+ substrs=["error"])
+
def do_min_test(self, start, jump, var, value):
- self.runCmd("j %i" % start) # jump to the start marker
+ # jump to the start marker
+ self.runCmd("j %i" % start)
self.runCmd("thread step-in") # step into the min fn
- self.runCmd("j %i" % jump) # jump to the branch we're interested in
+ # jump to the branch we're interested in
+ self.runCmd("j %i" % jump)
self.runCmd("thread step-out") # return out
self.runCmd("thread step-over") # assign to the global
- self.expect("expr %s" % var, substrs = [value]) # check it
+ self.expect("expr %s" % var, substrs=[value]) # check it
OpenPOWER on IntegriCloud