summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-01-08 10:38:20 +0000
committerPavel Labath <labath@google.com>2016-01-08 10:38:20 +0000
commiteceec6dd011b546bbc85c5d3b84367a39d428ee4 (patch)
tree4ee1be7449d9d11c163d50ee16166441fc1de631 /lldb
parentd196abbba3ea1b6872539e628cc4fabd49e6b1ee (diff)
downloadbcm5719-llvm-eceec6dd011b546bbc85c5d3b84367a39d428ee4.tar.gz
bcm5719-llvm-eceec6dd011b546bbc85c5d3b84367a39d428ee4.zip
Fix TestBatchMode on linux
New test introduced in r257120 was failing on linux. The reason for that the regex for setting the breakpoint was being applied to the "default file", which in this case was the asm file containing the definition of the sleep() syscall (because after attach, we are stopped in the sleep function). I have changed this use the more customary way of setting the breakpoint and specifying the source file name explicitly. llvm-svn: 257160
Diffstat (limited to 'lldb')
-rw-r--r--lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py b/lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py
index 905242624e9..305d3c7471e 100644
--- a/lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py
+++ b/lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py
@@ -19,6 +19,7 @@ class DriverBatchModeTest (TestBase):
TestBase.setUp(self)
# Our simple source filename.
self.source = 'main.c'
+ self.line = line_number(self.source, 'Stop here to unset keep_waiting')
self.victim = None
def expect_string (self, string):
@@ -141,7 +142,7 @@ class DriverBatchModeTest (TestBase):
self.victim.expect("Waiting")
- run_commands = ' -b -o "process attach -p %d" -o "breakpoint set -p \'Stop here to unset keep_waiting\' -N keep_waiting" -o "continue" -o "break delete keep_waiting" -o "expr keep_waiting = 0" -o "continue" ' % (victim_pid)
+ run_commands = ' -b -o "process attach -p %d" -o "breakpoint set --file %s --line %d -N keep_waiting" -o "continue" -o "break delete keep_waiting" -o "expr keep_waiting = 0" -o "continue" ' % (victim_pid, self.source, self.line)
self.child = pexpect.spawn('%s %s %s %s' % (lldbtest_config.lldbExec, self.lldbOption, run_commands, exe))
child = self.child
OpenPOWER on IntegriCloud