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 |
Élargit le comportement de RemoteAndroidDevice
pour un appareil Android à pile complète exécuté dans Google Compute Engine (GCE). Supposons que le numéro de série de l'appareil soit au format
Résumé
Constructeurs publics | |
---|---|
RemoteAndroidVirtualDevice(IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)
Crée un objet |
Méthodes publiques | |
---|---|
GceAvdInfo
|
getAvdInfo()
Renvoie l' |
DeviceDescriptor
|
getDeviceDescriptor()
|
|
getTombstones()
Cuttlefish dispose d'une fonctionnalité spéciale qui transfère les tombstones vers l'hôte distant, où nous pouvons les obtenir directement. |
void
|
postBootSetup()
{@inherit } |
void
|
postInvocationTearDown(Throwable exception)
|
boolean
|
powerwashGce()
Tentative de nettoyage d'une instance GCE |
void
|
preInvocationSetup(IBuildInfo info, MultiMap<String, String> attributes)
|
void
|
recoverDevice()
Tentative de récupération de la communication de l'appareil. |
void
|
setGceSshMonitor(GceSshTunnelMonitor gceSshMonitor)
Remplacer l' |
void
|
setTestLogger(ITestLogger testLogger)
|
Méthodes protégées | |
---|---|
void
|
doAdbReboot(NativeDevice.RebootMode rebootMode, String reason)
Effectuez un redémarrage ADB. |
long
|
getCurrentTime()
Renvoie l'heure système actuelle. |
GceSshTunnelMonitor
|
getGceSshMonitor()
Renvoie l' |
void
|
launchGce(IBuildInfo buildInfo, MultiMap<String, String> attributes)
Lancez l'appareil gce réel en fonction des informations de compilation. |
void
|
waitForTunnelOnline(long waitTime)
Vérifiez si le moniteur de tunnel est en cours d'exécution. |
Constructeurs publics
RemoteAndroidVirtualDevice
public RemoteAndroidVirtualDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)
Crée un objet RemoteAndroidVirtualDevice
.
Paramètres | |
---|---|
device |
IDevice : IDevice associé |
stateMonitor |
IDeviceStateMonitor : mécanisme IDeviceStateMonitor à utiliser |
allocationMonitor |
IDeviceMonitor : IDeviceMonitor pour informer des changements d'état d'allocation.
|
Méthodes publiques
getAvdInfo
public GceAvdInfo getAvdInfo ()
Renvoie l'GceAvdInfo
de la VM distante créée. Renvoie la valeur "null" si l'affichage échoue.
Renvoie | |
---|---|
GceAvdInfo |
getDeviceDescriptor
public DeviceDescriptor getDeviceDescriptor ()
Renvoie | |
---|---|
DeviceDescriptor |
getTombstones
publicgetTombstones ()
Cuttlefish dispose d'une fonctionnalité spéciale qui transfère les tombstones vers l'hôte distant, où nous pouvons les obtenir directement.
Renvoie | |
---|---|
|
Génère | |
---|---|
DeviceNotAvailableException |
postBootSetup
public void postBootSetup ()
{@inherit }
Génère | |
---|---|
DeviceNotAvailableException |
postInvocationTearDown
public void postInvocationTearDown (Throwable exception)
Paramètres | |
---|---|
exception |
Throwable |
powerwashGce
public boolean powerwashGce ()
Tentative de nettoyage d'une instance GCE
Renvoie | |
---|---|
boolean |
Renvoie "true" si la suppression GCE a réussi. |
Génère | |
---|---|
|
com.android.tradefed.targetprep.TargetSetupError |
DeviceNotAvailableException |
|
TargetSetupError |
preInvocationSetup
public void preInvocationSetup (IBuildInfo info, MultiMap<String, String> attributes)
Paramètres | |
---|---|
info |
IBuildInfo |
attributes |
MultiMap |
Génère | |
---|---|
DeviceNotAvailableException |
|
TargetSetupError |
recoverDevice
public void recoverDevice ()
Tentative de récupération de la communication de l'appareil.
Génère | |
---|---|
DeviceNotAvailableException |
setGceSshMonitor
public void setGceSshMonitor (GceSshTunnelMonitor gceSshMonitor)
Remplacer l'GceSshTunnelMonitor
interne de l'appareil.
Paramètres | |
---|---|
gceSshMonitor |
GceSshTunnelMonitor |
setTestLogger
public void setTestLogger (ITestLogger testLogger)
Paramètres | |
---|---|
testLogger |
ITestLogger |
Méthodes protégées
doAdbReboot
protected void doAdbReboot (NativeDevice.RebootMode rebootMode, String reason)
Effectuez un redémarrage ADB.
Paramètres | |
---|---|
rebootMode |
NativeDevice.RebootMode : mode de ce redémarrage. |
reason |
String : pour ce redémarrage. |
Génère | |
---|---|
DeviceNotAvailableException |
getCurrentTime
protected long getCurrentTime ()
Renvoie l'heure système actuelle. Exposé à des fins de test.
Renvoie | |
---|---|
long |
getGceSshMonitor
protected GceSshTunnelMonitor getGceSshMonitor ()
Renvoie l'GceSshTunnelMonitor
de l'appareil.
Exposé à des fins de test.
Renvoie | |
---|---|
GceSshTunnelMonitor |
launchGce
protected void launchGce (IBuildInfo buildInfo, MultiMap<String, String> attributes)
Lancez l'appareil gce réel en fonction des informations de compilation.
Paramètres | |
---|---|
buildInfo |
IBuildInfo |
attributes |
MultiMap |
Génère | |
---|---|
TargetSetupError |
waitForTunnelOnline
protected void waitForTunnelOnline (long waitTime)
Vérifiez si le moniteur de tunnel est en cours d'exécution.
Paramètres | |
---|---|
waitTime |
long |
Génère | |
---|---|
DeviceNotAvailableException |