Differential D56233 Diff 194380 packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteKill.py
Changeset View
Changeset View
Standalone View
Standalone View
packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteKill.py
from __future__ import print_function | from __future__ import print_function | ||||
import gdbremote_testcase | import gdbremote_testcase | ||||
import lldbgdbserverutils | import lldbgdbserverutils | ||||
from lldbsuite.test.decorators import * | from lldbsuite.test.decorators import * | ||||
from lldbsuite.test.lldbtest import * | from lldbsuite.test.lldbtest import * | ||||
from lldbsuite.test import lldbutil | from lldbsuite.test import lldbutil | ||||
class TestGdbRemoteKill(gdbremote_testcase.GdbRemoteTestCaseBase): | class TestGdbRemoteKill(gdbremote_testcase.GdbRemoteTestCaseBase): | ||||
mydir = TestBase.compute_mydir(__file__) | mydir = TestBase.compute_mydir(__file__) | ||||
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet | @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet | ||||
def attach_commandline_kill_after_initial_stop(self): | def attach_commandline_kill_after_initial_stop(self): | ||||
reg_expr = r"^\$X[0-9a-fA-F]+([^#]*)#[0-9A-Fa-f]{2}" | |||||
triple = self.dbg.GetSelectedPlatform().GetTriple() | |||||
# No signal support on Windwos. Only W* response is sent. | |||||
if re.match(".*-.*-windows", triple): | |||||
reg_expr = r"^\$W[0-9a-fA-F]+([^#]*)#[0-9A-Fa-f]{2}" | |||||
procs = self.prep_debug_monitor_and_inferior() | procs = self.prep_debug_monitor_and_inferior() | ||||
self.test_sequence.add_log_lines([ | self.test_sequence.add_log_lines([ | ||||
"read packet: $k#6b", | "read packet: $k#6b", | ||||
{"direction": "send", "regex": r"^\$X[0-9a-fA-F]+([^#]*)#[0-9A-Fa-f]{2}"}, | {"direction": "send", "regex": reg_expr}, | ||||
], True) | ], True) | ||||
if self.stub_sends_two_stop_notifications_on_kill: | if self.stub_sends_two_stop_notifications_on_kill: | ||||
# Add an expectation for a second X result for stubs that send two | # Add an expectation for a second X result for stubs that send two | ||||
# of these. | # of these. | ||||
self.test_sequence.add_log_lines([ | self.test_sequence.add_log_lines([ | ||||
{"direction": "send", "regex": r"^\$X[0-9a-fA-F]+([^#]*)#[0-9A-Fa-f]{2}"}, | {"direction": "send", "regex": reg_expr}, | ||||
], True) | ], True) | ||||
self.expect_gdbremote_sequence() | self.expect_gdbremote_sequence() | ||||
# Wait a moment for completed and now-detached inferior process to | # Wait a moment for completed and now-detached inferior process to | ||||
# clear. | # clear. | ||||
time.sleep(1) | time.sleep(1) | ||||
Show All 24 Lines |