def test_with_process_launch_api(self):
"""Create target, breakpoint, launch a process, and then kill it."""
# Get the full path to our executable to be attached/debugged.
- exe = self.getBuildArtifact(self.testMethodName)
+ exe = '%s_%d'%(self.getBuildArtifact(self.testMethodName), os.getpid())
d = {'EXE': exe}
self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
@expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails
def test_with_attach_to_process_with_id_api(self):
"""Create target, spawn a process, and attach to it with process id."""
- exe = self.getBuildArtifact(self.testMethodName)
+ exe = '%s_%d'%(self.getBuildArtifact(self.testMethodName), os.getpid())
d = {'EXE': exe}
self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
popen = self.spawnSubprocess(exe, ["abc", "xyz"])
self.addTearDownHook(self.cleanupSubprocesses)
- # Give the subprocess time to start and wait for user input
- time.sleep(0.25)
-
listener = lldb.SBListener("my.attach.listener")
error = lldb.SBError()
process = target.AttachToProcessWithID(listener, popen.pid, error)
@expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails
def test_with_attach_to_process_with_name_api(self):
"""Create target, spawn a process, and attach to it with process name."""
- exe = self.getBuildArtifact(self.testMethodName)
+ exe = '%s_%d'%(self.getBuildArtifact(self.testMethodName), os.getpid())
d = {'EXE': exe}
self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
popen = self.spawnSubprocess(exe, ["abc", "xyz"])
self.addTearDownHook(self.cleanupSubprocesses)
- # Give the subprocess time to start and wait for user input
- time.sleep(0.25)
-
listener = lldb.SBListener("my.attach.listener")
error = lldb.SBError()
# Pass 'False' since we don't want to wait for new instance of