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 |
מרחיב את התנהגות RemoteAndroidDevice
עבור מכשיר אנדרואיד מלא שפועל ב-Google Compute Engine (Gce). נניח שסדרת המכשיר תהיה בפורמט
סיכום
בנאים ציבוריים | |
---|---|
RemoteAndroidVirtualDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor) יוצר |
שיטות ציבוריות | |
---|---|
GceAvdInfo | getAvdInfo () מחזיר את ה- |
DeviceDescriptor | getDeviceDescriptor () |
getTombstones () לדיונון יש תכונה מיוחדת שמביאה את המצבות למארח המרוחק שם נוכל להשיג אותן ישירות. | |
void | postBootSetup () {@inherit } |
void | postInvocationTearDown (Throwable exception) |
boolean | powerwashGce () נסה לבצע powerwash מופע GCE |
void | preInvocationSetup (IBuildInfo info, MultiMap<String, String> attributes) |
void | recoverDevice () ניסיונות לשחזר את התקשורת במכשיר. |
void | setGceSshMonitor ( GceSshTunnelMonitor gceSshMonitor) עוקף את |
void | setTestLogger (ITestLogger testLogger) |
שיטות מוגנות | |
---|---|
void | doAdbReboot ( NativeDevice.RebootMode rebootMode, String reason) בצע אתחול של adb. |
long | getCurrentTime () מחזירה את זמן המערכת הנוכחי. |
GceSshTunnelMonitor | getGceSshMonitor () מחזיר את ה- |
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 ()
מחזיר את ה- GceAvdInfo
מה-VM המרוחק שנוצר. מחזירה null אם ההעלאה לא הצליחה.
החזרות | |
---|---|
GceAvdInfo |
getDeviceDescriptor
public DeviceDescriptor getDeviceDescriptor ()
החזרות | |
---|---|
DeviceDescriptor |
קבל מצבות
publicgetTombstones ()
לדיונון יש תכונה מיוחדת שמביאה את המצבות למארח המרוחק שם נוכל להשיג אותן ישירות.
החזרות | |
---|---|
זורק | |
---|---|
DeviceNotAvailableException |
postBootSetup
public void postBootSetup ()
{@inherit }
זורק | |
---|---|
DeviceNotAvailableException |
postInvocationTearDown
public void postInvocationTearDown (Throwable exception)
פרמטרים | |
---|---|
exception | Throwable |
powerwashGce
public boolean powerwashGce ()
נסה לבצע powerwash מופע GCE
החזרות | |
---|---|
boolean | מחזיר אמת אם powerwash Gce הצלחה. |
זורק | |
---|---|
| 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 |