RemoteAndroidVirtualDevice

public class RemoteAndroidVirtualDevice
extends RemoteAndroidDevice implements ITestLoggerReceiver

java.lang.Object
   ↳ com.android.tradefed.device.NativeDevice
     ↳ com.android.tradefed.device.TestDevice
       ↳ com.android.tradefed.device.RemoteAndroidDevice
         ↳ com.android.tradefed.device.cloud.RemoteAndroidVirtualDevice


Google Compute Engine(Gce)で実行されているフルスタック Android デバイスの RemoteAndroidDevice 動作を拡張します。デバイスのシリアル番号が : の形式であることを前提としています。adb

概要

パブリック コンストラクタ

RemoteAndroidVirtualDevice(IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

RemoteAndroidVirtualDevice を作成します。

パブリック メソッド

GceAvdInfo getAvdInfo()

作成されたリモート VM から GceAvdInfo を返します。

DeviceDescriptor getDeviceDescriptor()

getTombstones()

Cuttlefish には、Tombstone をリモートホストに転送し、直接取得できる特別な機能があります。

void postBootSetup()

{@inherit }

void postInvocationTearDown(Throwable exception)

boolean powerwashGce()

GCE インスタンスの Powerwash を試行する

void preInvocationSetup(IBuildInfo info, MultiMap<String, String> attributes)

void recoverDevice()

デバイスの通信を復元しようとします。

void setGceSshMonitor(GceSshTunnelMonitor gceSshMonitor)

デバイスの内部 GceSshTunnelMonitor をオーバーライドします。

void setTestLogger(ITestLogger testLogger)

保護されたメソッド

void doAdbReboot(NativeDevice.RebootMode rebootMode, String reason)

adb で再起動します。

long getCurrentTime()

現在のシステム時刻を返します。

GceSshTunnelMonitor getGceSshMonitor()

デバイスの GceSshTunnelMonitor を返します。

void launchGce(IBuildInfo buildInfo, MultiMap<String, String> attributes)

ビルド情報に基づいて実際の gce デバイスを起動します。

void waitForTunnelOnline(long waitTime)

トンネル モニターが実行されているかどうかを確認します。

パブリック コンストラクタ

RemoteAndroidVirtualDevice

public RemoteAndroidVirtualDevice (IDevice device, 
                IDeviceStateMonitor stateMonitor, 
                IDeviceMonitor allocationMonitor)

RemoteAndroidVirtualDevice を作成します。

パラメータ
device IDevice: 関連付けられた IDevice

stateMonitor IDeviceStateMonitor: 使用する IDeviceStateMonitor メカニズム

allocationMonitor IDeviceMonitor: 割り当て状態の変更を通知する IDeviceMonitor

パブリック メソッド

getAvdInfo

public GceAvdInfo getAvdInfo ()

作成されたリモート VM から GceAvdInfo を返します。起動に失敗した場合は null を返します。

戻り値
GceAvdInfo

getDeviceDescriptor

public DeviceDescriptor getDeviceDescriptor ()

戻り値
DeviceDescriptor

getTombstones

public  getTombstones ()

Cuttlefish には、Tombstone をリモートホストに転送して直接取得できる特別な機能があります。

戻り値

例外
DeviceNotAvailableException

postBootSetup

public void postBootSetup ()

{@inherit }

例外
DeviceNotAvailableException

postInvocationTearDown

public void postInvocationTearDown (Throwable exception)

パラメータ
exception Throwable

powerwashGce

public boolean powerwashGce ()

GCE インスタンスの Powerwash を試行する

戻り値
boolean Powerwash Gce が成功した場合は true を返します。

例外
com.android.tradefed.targetprep.TargetSetupError
DeviceNotAvailableException
TargetSetupError

preInvocationSetup

public void preInvocationSetup (IBuildInfo info, 
                MultiMap<String, String> attributes)

パラメータ
info IBuildInfo

attributes MultiMap

例外
DeviceNotAvailableException
TargetSetupError

recoverDevice

public void recoverDevice ()

デバイスの通信を復元しようとします。

例外
DeviceNotAvailableException

setGceSshMonitor

public void setGceSshMonitor (GceSshTunnelMonitor gceSshMonitor)

デバイスの内部 GceSshTunnelMonitor をオーバーライドします。

パラメータ
gceSshMonitor GceSshTunnelMonitor

setTestLogger

public void setTestLogger (ITestLogger testLogger)

パラメータ
testLogger ITestLogger

保護されたメソッド

doAdbReboot

protected void doAdbReboot (NativeDevice.RebootMode rebootMode, 
                String reason)

adb で再起動します。

パラメータ
rebootMode NativeDevice.RebootMode: この再起動のモード。

reason String: この再起動用。

例外
DeviceNotAvailableException

getCurrentTime

protected long getCurrentTime ()

現在のシステム時刻を返します。テスト用に公開されています。

戻り値
long

getGceSshMonitor

protected GceSshTunnelMonitor getGceSshMonitor ()

デバイスの GceSshTunnelMonitor を返します。テスト用に公開されています。

戻り値
GceSshTunnelMonitor

launchGce

protected void launchGce (IBuildInfo buildInfo, 
                MultiMap<String, String> attributes)

ビルド情報に基づいて実際の gce デバイスを起動します。

パラメータ
buildInfo IBuildInfo

attributes MultiMap

例外
TargetSetupError

waitForTunnelOnline

protected void waitForTunnelOnline (long waitTime)

トンネル モニターが実行されているかどうかを確認します。

パラメータ
waitTime long

例外
DeviceNotAvailableException