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 למכשיר Android עם סטאק מלא שפועל ב-Google Compute Engine (GCE). נניח שהמספר הסידורי של המכשיר יהיה בפורמט
סיכום
קונסטרוקטורים גלויים לכולם | |
|---|---|
RemoteAndroidVirtualDevice(IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)
יצירת |
|
שיטות ציבוריות | |
|---|---|
GceAvdInfo
|
getAvdInfo()
הפונקציה מחזירה את |
DeviceDescriptor
|
getDeviceDescriptor()
|
|
getTombstones()
ל-Cuttlefish יש תכונה מיוחדת שמעבירה את קבצי ה-tombstone למארח המרוחק, שבו אנחנו יכולים לקבל אותם ישירות. |
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 בפועל על סמך פרטי ה-build. |
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 מהמכונה הווירטואלית המרוחקת שנוצרה. הפונקציה מחזירה ערך null אם הפעלת המכונה לא הצליחה.
| החזרות | |
|---|---|
GceAvdInfo |
|
getDeviceDescriptor
public DeviceDescriptor getDeviceDescriptor ()
| החזרות | |
|---|---|
DeviceDescriptor |
|
getTombstones
publicgetTombstones ()
ל-Cuttlefish יש תכונה מיוחדת שמעבירה את קבצי ה-tombstone למארח המרוחק, שבו אנחנו יכולים לקבל אותם ישירות.
| החזרות | |
|---|---|
|
|
| זריקות | |
|---|---|
DeviceNotAvailableException |
|
postBootSetup
public void postBootSetup ()
{@inherit }
| זריקות | |
|---|---|
DeviceNotAvailableException |
|
postInvocationTearDown
public void postInvocationTearDown (Throwable exception)
| פרמטרים | |
|---|---|
exception |
Throwable |
powerwashGce
public boolean powerwashGce ()
ניסיון לבצע Powerwash של מכונה ב-GCE
| החזרות | |
|---|---|
boolean |
הפונקציה מחזירה את הערך True אם הפעולה 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 בפועל על סמך פרטי ה-build.
| פרמטרים | |
|---|---|
buildInfo |
IBuildInfo |
attributes |
MultiMap |
| זריקות | |
|---|---|
TargetSetupError |
|
waitForTunnelOnline
protected void waitForTunnelOnline (long waitTime)
בודקים אם מנטר המנהרה פועל.
| פרמטרים | |
|---|---|
waitTime |
long |
| זריקות | |
|---|---|
DeviceNotAvailableException |
|