リモートAndroid仮想デバイス

public class RemoteAndroidVirtualDevice
extends RemoteAndroidDevice implements ITestLoggerReceiver

java.lang.オブジェクト
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 には、墓石をリモート ホストに運び、直接取得できる特別な機能があります。

void postBootSetup ()

{@継承 }

void postInvocationTearDown (Throwable exception)

boolean powerwashGce ()

GCE インスタンスをパワーウォッシュしようとします

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)

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

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

リモートAndroid仮想デバイス

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

墓石を取得する

public  getTombstones ()

Cuttlefish には、墓石をリモート ホストに運び、直接取得できる特別な機能があります。

戻り値

投げる
DeviceNotAvailableException

ブートセットアップ後

public void postBootSetup ()

{@継承 }

投げる
DeviceNotAvailableException

post呼び出しTearDown

public void postInvocationTearDown (Throwable exception)

パラメーター
exception Throwable

パワーウォッシュGce

public boolean powerwashGce ()

GCE インスタンスをパワーウォッシュしようとします

戻り値
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

デバイスを回復する

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

現在の時刻を取得する

protected long getCurrentTime ()

現在のシステム時間を返します。テストのために露出しました。

戻り値
long

getGceSshMonitor

protected GceSshTunnelMonitor getGceSshMonitor ()

デバイスのGceSshTunnelMonitorを返します。テストのために露出しました。

戻り値
GceSshTunnelMonitor

起動Gce

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

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

パラメーター
buildInfo IBuildInfo

attributes MultiMap

投げる
TargetSetupError

トンネルオンラインを待つ

protected void waitForTunnelOnline (long waitTime)

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

パラメーター
waitTime long

投げる
DeviceNotAvailableException