From 14f1b3e8826ce43b978db93a62d1166055db5394 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 2 Jan 2017 19:26:05 +0000 Subject: Vendor import of lldb trunk r290819: https://llvm.org/svn/llvm-project/lldb/trunk@290819 --- .../attach_resume/TestAttachResume.py | 45 +++++++++++++++------- 1 file changed, 32 insertions(+), 13 deletions(-) (limited to 'packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py') diff --git a/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py b/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py index 54463c56827ae..b348e72606ade 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]) -- cgit v1.2.3