Android: Explicit report failed run if connection fails

This used to be implicit in the following attach attempt but
apparently isn't anymore.

Change-Id: I0d8ff3db9c38fc24aed55f1f3b6514cd6315bd4c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
hjk
2024-11-06 09:05:10 +01:00
parent 9c012b0640
commit e726a768be

View File

@@ -986,17 +986,25 @@ class Dumper(DumperBase):
and self.platform_ == 'remote-android'): and self.platform_ == 'remote-android'):
connect_options = lldb.SBPlatformConnectOptions(self.remoteChannel_) connect_options = lldb.SBPlatformConnectOptions(self.remoteChannel_)
res = self.target.GetPlatform().ConnectRemote(connect_options) target_platform = self.target.GetPlatform()
res = target_platform.ConnectRemote(connect_options)
is_connected = target_platform.IsConnected()
DumperBase.warn("CONNECT: %s %s target platform: %s connected: %s"
% (res, self.remoteChannel_, target_platform.GetName(), is_connected))
DumperBase.warn("CONNECT: %s %s platform: %s connected: %s" % (res,
self.remoteChannel_,
self.target.GetPlatform().GetName(),
self.target.GetPlatform().IsConnected()))
if not res.Success(): if not res.Success():
self.report(self.describeError(res)) self.report(self.describeError(res))
self.reportState('enginerunfailed') self.reportState('enginerunfailed')
return return
if not is_connected:
self.report('Could not connect to debug server')
self.reportState('enginerunfailed')
return
attach_info = lldb.SBAttachInfo(self.attachPid_) attach_info = lldb.SBAttachInfo(self.attachPid_)
self.process = self.target.Attach(attach_info, error) self.process = self.target.Attach(attach_info, error)
if not error.Success(): if not error.Success():