管理远程设备

public class ManagedRemoteDevice
extends TestDevice implements ITestLoggerReceiver

java.lang.Object
com.android.tradefed.device.NativeDevice
com.android.tradefed.device.TestDevice
com.android.tradefed.device.cloud.ManagedRemoteDevice


在虚拟机内运行的设备,我们通过虚拟机内的 Tradefed 实例进行远程管理。

概括

公共构造函数

ManagedRemoteDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

创建一个ManagedRemoteDevice

公共方法

TestDeviceOptions getOptions ()

在尝试进行远程设置之前,覆盖基本 getter 以便能够解析动态选项。

GceAvdInfo getRemoteAvdInfo ()

返回描述远程实例的GceAvdInfo

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)

创建一个ManagedRemoteDevice

参数
device IDevice :关联的IDevice

stateMonitor IDeviceStateMonitor :要使用的IDeviceStateMonitor机制

allocationMonitor IDeviceMonitor :通知分配状态更改的IDeviceMonitor

公共方法

获取选项

public TestDeviceOptions getOptions ()

在尝试进行远程设置之前,覆盖基本 getter 以便能够解析动态选项。

退货
TestDeviceOptions

获取远程AVD信息

public GceAvdInfo getRemoteAvdInfo ()

返回描述远程实例的GceAvdInfo

退货
GceAvdInfo

调用后拆卸

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