forked from OSchip/llvm-project
Fix cleanup error in TestVSCode_disconnect.test_launch
TestVSCode_disconnect.test_launch fails with clean up error because disconnect gets called twice once from the test case and once from the tear down hook. This patch disables disconnect after its been called from test_launch Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D99491
This commit is contained in:
parent
243fe0da99
commit
42c3b5e5b6
|
@ -340,7 +340,8 @@ class VSCodeTestCaseBase(TestBase):
|
|||
trace=False, initCommands=None, preRunCommands=None,
|
||||
stopCommands=None, exitCommands=None,
|
||||
terminateCommands=None, sourcePath=None,
|
||||
debuggerRoot=None, runInTerminal=False):
|
||||
debuggerRoot=None, runInTerminal=False,
|
||||
disconnectAutomatically=True):
|
||||
'''Build the default Makefile target, create the VSCode debug adaptor,
|
||||
and launch the process.
|
||||
'''
|
||||
|
@ -350,4 +351,5 @@ class VSCodeTestCaseBase(TestBase):
|
|||
return self.launch(program, args, cwd, env, stopOnEntry, disableASLR,
|
||||
disableSTDIO, shellExpandArguments, trace,
|
||||
initCommands, preRunCommands, stopCommands, exitCommands,
|
||||
terminateCommands, sourcePath, debuggerRoot, runInTerminal=runInTerminal)
|
||||
terminateCommands, sourcePath, debuggerRoot, runInTerminal=runInTerminal,
|
||||
disconnectAutomatically=disconnectAutomatically)
|
||||
|
|
|
@ -37,7 +37,7 @@ class TestVSCode_launch(lldbvscode_testcase.VSCodeTestCaseBase):
|
|||
created.
|
||||
"""
|
||||
program = self.getBuildArtifact("a.out")
|
||||
self.build_and_launch(program)
|
||||
self.build_and_launch(program, disconnectAutomatically=False)
|
||||
|
||||
# We set a breakpoint right before the side effect file is created
|
||||
self.set_source_breakpoints(self.source, [line_number(self.source, '// breakpoint')])
|
||||
|
|
Loading…
Reference in New Issue