托管远程设备
public class ManagedRemoteDevice
extends TestDevice
implements ITestLoggerReceiver
对象 | |||
↳ | com.android.tradefed.device.NativeDevice | ||
↳ | com.android.tradefed.device.TestDevice | ||
↳ | com.android.tradefed.device.cloud.ManagedRemoteDevice |
在我们通过虚拟机内的 Tradefed 实例远程管理的虚拟机内运行的设备。
概括
公共构造函数 | |
---|---|
ManagedRemoteDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor) |
公共方法 | |
---|---|
TestDeviceOptions | getOptions () 在尝试进行远程设置之前,覆盖基本 getter 以能够解析动态选项。 |
GceAvdInfo | getRemoteAvdInfo () 返回 |
void | postInvocationTearDown (Throwable exception) |
void | preInvocationSetup (IBuildInfo info, MultiMap<String, String> attributes) |
void | setTestLogger (ITestLogger testLogger) |
受保护的方法 | |
---|---|
long | getCurrentTime () 返回当前系统时间。 |
void | launchGce () 根据构建信息启动实际的 gce 设备。 |
公共构造函数
托管远程设备
public ManagedRemoteDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)
参数 | |
---|---|
device | IDevice :相关IDevice |
stateMonitor | IDeviceStateMonitor :在IDeviceStateMonitor 机制使用 |
allocationMonitor | IDeviceMonitor :在IDeviceMonitor 通知的分配状态的变化。 |
公共方法
获取选项
public TestDeviceOptions getOptions ()
在尝试进行远程设置之前,覆盖基本 getter 以能够解析动态选项。
退货 | |
---|---|
TestDeviceOptions |
调用后拆解
public void postInvocationTearDown (Throwable exception)
参数 | |
---|---|
exception | Throwable |
调用前设置
public void preInvocationSetup (IBuildInfo info, MultiMap<String, String> attributes)
参数 | |
---|---|
info | IBuildInfo |
attributes | MultiMap |
投掷 | |
---|---|
DeviceNotAvailableException | |
TargetSetupError |
设置测试记录器
public void setTestLogger (ITestLogger testLogger)
参数 | |
---|---|
testLogger | ITestLogger |
受保护的方法
获取当前时间
protected long getCurrentTime ()
返回当前系统时间。暴露用于测试。
退货 | |
---|---|
long |
启动Gce
protected void launchGce ()
根据构建信息启动实际的 gce 设备。
投掷 | |
---|---|
TargetSetupError |