diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:26:05 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:26:05 +0000 | 
| commit | 14f1b3e8826ce43b978db93a62d1166055db5394 (patch) | |
| tree | 0a00ad8d3498783fe0193f3b656bca17c4c8697d /packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py | |
| parent | 4ee8c119c71a06dcad1e0fecc8c675e480e59337 (diff) | |
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py')
| -rw-r--r-- | packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py | 45 | 
1 files changed, 32 insertions, 13 deletions
| diff --git a/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py b/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py index 54463c56827a..b348e72606ad 100644 --- a/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py +++ b/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py @@ -5,8 +5,8 @@ Test process attach/resume.  from __future__ import print_function - -import os, time +import os +import time  import lldb  from lldbsuite.test.decorators import *  from lldbsuite.test.lldbtest import * @@ -14,6 +14,7 @@ from lldbsuite.test import lldbutil  exe_name = "AttachResume"  # Must match Makefile +  class AttachResumeTestCase(TestBase):      mydir = TestBase.compute_mydir(__file__) @@ -41,35 +42,53 @@ class AttachResumeTestCase(TestBase):          process = self.dbg.GetSelectedTarget().GetProcess()          self.runCmd("c") -        lldbutil.expect_state_changes(self, listener, process, [lldb.eStateRunning]) +        lldbutil.expect_state_changes( +            self, listener, process, [ +                lldb.eStateRunning])          self.runCmd("process interrupt") -        lldbutil.expect_state_changes(self, listener, process, [lldb.eStateStopped]) +        lldbutil.expect_state_changes( +            self, listener, process, [ +                lldb.eStateStopped])          # be sure to continue/interrupt/continue (r204504)          self.runCmd("c") -        lldbutil.expect_state_changes(self, listener, process, [lldb.eStateRunning]) +        lldbutil.expect_state_changes( +            self, listener, process, [ +                lldb.eStateRunning])          self.runCmd("process interrupt") -        lldbutil.expect_state_changes(self, listener, process, [lldb.eStateStopped]) +        lldbutil.expect_state_changes( +            self, listener, process, [ +                lldb.eStateStopped])          # Second interrupt should have no effect. -        self.expect("process interrupt", patterns=["Process is not running"], error=True) +        self.expect( +            "process interrupt", +            patterns=["Process is not running"], +            error=True)          # check that this breakpoint is auto-cleared on detach (r204752) -        self.runCmd("br set -f main.cpp -l %u" % (line_number('main.cpp', '// Set breakpoint here'))) +        self.runCmd("br set -f main.cpp -l %u" % +                    (line_number('main.cpp', '// Set breakpoint here')))          self.runCmd("c") -        lldbutil.expect_state_changes(self, listener, process, [lldb.eStateRunning, lldb.eStateStopped]) +        lldbutil.expect_state_changes( +            self, listener, process, [ +                lldb.eStateRunning, lldb.eStateStopped])          self.expect('br list', 'Breakpoint not hit', -            substrs = ['hit count = 1']) +                    substrs=['hit count = 1'])          # Make sure the breakpoint is not hit again. -        self.expect("expr debugger_flag = false", substrs=[" = false"]); +        self.expect("expr debugger_flag = false", substrs=[" = false"])          self.runCmd("c") -        lldbutil.expect_state_changes(self, listener, process, [lldb.eStateRunning]) +        lldbutil.expect_state_changes( +            self, listener, process, [ +                lldb.eStateRunning])          # make sure to detach while in running state (r204759)          self.runCmd("detach") -        lldbutil.expect_state_changes(self, listener, process, [lldb.eStateDetached]) +        lldbutil.expect_state_changes( +            self, listener, process, [ +                lldb.eStateDetached]) | 
