TestDeviceOptions
public class TestDeviceOptions
extends Object
java.lang.Object | |
↳ | com.android.tradefed.device.TestDeviceOptions |
概要
嵌套类 | |
---|---|
enum | TestDeviceOptions.InstanceType
|
常数 | |
---|---|
int | DEFAULT_ADB_PORT
|
领域 | |
---|---|
public static final String | INSTANCE_TYPE_OPTION
|
公共建设者 | |
---|---|
TestDeviceOptions () |
公开方法 | |
---|---|
int | getAdbRecoveryTimeout () |
long | getAvailableTimeout () |
File | getAvdConfigFile () 返回Gce Avd配置文件以启动实例。 |
String | getAvdConfigTestResourceName () 返回Gce Avd配置测试资源名称以启动实例。 |
File | getAvdDriverBinary () 返回二进制文件的路径以启动Gce Avd实例。 |
String | getBaseImage () 返回用于当前实例的基本图像名称 |
String | getConnCheckUrl () |
static String | getCreateCommandByInstanceType ( TestDeviceOptions.InstanceType type) |
Integer | getCutoffBattery () |
static | getExtraParamsByInstanceType ( TestDeviceOptions.InstanceType type, String baseImage) |
int | getFastbootTimeout () |
String | getGceAccount () 返回gce电子邮件帐户以与驱动程序一起使用 |
long | getGceCmdTimeout () 返回实例的Gce Avd超时以使其联机。 |
String | getGceDriverBuildIdParam () 从构建信息中返回应与构建ID配对的GCE驱动程序参数 |
Log.LogLevel | getGceDriverLogLevel () 返回Gce Avd驱动程序的日志级别。 |
getGceDriverParams () 返回通过选件提供的其他GCE驱动程序参数 | |
int | getGceMaxAttempt () 返回启动GCE设备的最大尝试次数 |
TestDeviceOptions.InstanceType | getInstanceType () 返回应创建的虚拟设备的实例类型 |
String | getInstanceUser () 返回应创建的GCE虚拟设备的实例类型 |
String | getLogcatOptions () |
long | getMaxLogcatDataSize () 获取要保留的tmp logcat数据的近似最大大小(以字节为单位)。 |
long | getMaxWifiConnectTime () |
long | getOnlineTimeout () |
getPostBootCommands () | |
int | getRebootTimeout () |
int | getRemoteAdbPort () 返回adb服务器侦听的远程端口 |
getRemoteFetchFilePattern () 返回模式列表,尝试通过scp获取。 | |
File | getSerivceAccountJsonKeyFile () |
File | getSshPrivateKeyPath () 返回用于对Gce Avd实例进行操作的ssh密钥的路径。 |
int | getUnencryptRebootTimeout () |
boolean | getUseFastbootErase () |
int | getWifiAttempts () |
int | getWifiRetryWaitTime () |
String | getWifiUtilAPKPath () |
boolean | isDisableKeyguard () 检查启动完成后是否应该尝试禁用键盘锁 |
boolean | isEnableAdbRoot () 检查是否应在启动时为此设备启用adb root |
boolean | isLogcatCaptureEnabled () |
boolean | isWifiExpoRetryEnabled () |
void | setAdbRecoveryTimeout (int adbRecoveryTimeout) |
void | setAvdConfigFile (File avdConfigFile) 设置Gce Avd配置文件以启动实例。 |
void | setAvdDriverBinary (File avdDriverBinary) 将路径设置为二进制文件以启动Gce Avd实例。 |
void | setConnCheckUrl (String url) |
void | setCutoffBattery (int cutoffBattery) 设置最低电池电量以继续调用。 |
void | setDisableKeyguard (boolean disableKeyguard) 设置一旦启动完成我们是否应该尝试禁用键盘锁 |
void | setFastbootTimeout (int fastbootTimeout) |
void | setGceCmdTimeout (long gceCmdTimeout) 设置实例的Gce Avd超时以使其联机。 |
void | setGceDriverBuildIdParam (String gceDriverBuildIdParam) 设置应与构建信息中的构建ID配对的GCE驱动程序参数 |
void | setGceDriverLogLevel (Log.LogLevel mGceDriverLogLevel) 设置Gce Avd驱动程序的日志级别。 |
void | setGceMaxAttempt (int gceMaxAttempt) 设置启动GCE设备的最大尝试次数 |
void | setLogcatOptions (String logcatOptions) 设置要传递给logcat的选项 |
void | setMaxLogcatDataSize (long maxLogcatDataSize) 设置要保留的tmp logcat的近似最大大小(以字节为单位) |
void | setOnlineTimeout (long onlineTimeout) |
void | setRebootTimeout (int rebootTimeout) |
void | setServiceAccountJsonKeyFile (File jsonKeyFile) 设置服务帐户json密钥文件。 |
void | setSshPrivateKeyPath (File sshPrivateKeyPath) 设置ssh密钥的路径,以用于Gce Avd实例的操作。 |
void | setUnencryptRebootTimeout (int unencryptRebootTimeout) |
void | setUseFastbootErase (boolean useFastbootErase) |
void | setWifiAttempts (int wifiAttempts) |
boolean | shouldDisableReboot () |
boolean | shouldSkipTearDown () 如果应跳过GCE拆卸,则返回true。 |
boolean | shouldUseContentProvider () 返回是否可以使用Tradefed内容提供程序来推/拉文件。 |
boolean | waitForGceTearDown () 如果我们在继续之前阻止GCE拆卸完成,则返回true。 |
常数
DEFAULT_ADB_PORT
public static final int DEFAULT_ADB_PORT
常数值:5555(0x000015b3)
领域
INSTANCE_TYPE_OPTION
public static final String INSTANCE_TYPE_OPTION
公共建设者
TestDeviceOptions
public TestDeviceOptions ()
公开方法
getAdbRecoveryTimeout
public int getAdbRecoveryTimeout ()
退货 | |
---|---|
int | 超时(以毫秒为单位)以启动进入恢复模式。 |
getAvailableTimeout
public long getAvailableTimeout ()
退货 | |
---|---|
long | 等待设备可用的默认时间(以毫秒为单位)。 |
getAvdConfigFile
public File getAvdConfigFile ()
返回Gce Avd配置文件以启动实例。
退货 | |
---|---|
File |
getAvdConfigTestResourceName
public String getAvdConfigTestResourceName ()
返回Gce Avd配置测试资源名称以启动实例。
退货 | |
---|---|
String |
getAvdDriverBinary
public File getAvdDriverBinary ()
返回二进制文件的路径以启动Gce Avd实例。
退货 | |
---|---|
File |
getBaseImage
public String getBaseImage ()
返回用于当前实例的基本图像名称
退货 | |
---|---|
String |
getConnCheckUrl
public String getConnCheckUrl ()
退货 | |
---|---|
String | 用于连接测试的默认URL。 |
getCreateCommandByInstanceType
public static String getCreateCommandByInstanceType (TestDeviceOptions.InstanceType type)
参量 | |
---|---|
type | TestDeviceOptions.InstanceType |
退货 | |
---|---|
String |
getCutoffBattery
public Integer getCutoffBattery ()
退货 | |
---|---|
Integer | 继续调用的最小电池电量。 |
getExtraParamsByInstanceType
public staticgetExtraParamsByInstanceType (TestDeviceOptions.InstanceType type, String baseImage)
参量 | |
---|---|
type | TestDeviceOptions.InstanceType |
baseImage | String |
退货 | |
---|---|
getFastbootTimeout
public int getFastbootTimeout ()
退货 | |
---|---|
int | 引导进入快速引导模式的超时时间(以毫秒为单位)。 |
getGceAccount
public String getGceAccount ()
返回gce电子邮件帐户以与驱动程序一起使用
退货 | |
---|---|
String |
getGceCmdTimeout
public long getGceCmdTimeout ()
返回实例的Gce Avd超时以使其联机。
退货 | |
---|---|
long |
getGceDriverBuildIdParam
public String getGceDriverBuildIdParam ()
从构建信息中返回应与构建ID配对的GCE驱动程序参数
退货 | |
---|---|
String |
getGceDriverLogLevel
public Log.LogLevel getGceDriverLogLevel ()
返回Gce Avd驱动程序的日志级别。
退货 | |
---|---|
Log.LogLevel |
getGceDriverParams
publicgetGceDriverParams ()
返回通过选件提供的其他GCE驱动程序参数
退货 | |
---|---|
getGceMaxAttempt
public int getGceMaxAttempt ()
返回启动GCE设备的最大尝试次数
退货 | |
---|---|
int |
getInstanceType
public TestDeviceOptions.InstanceType getInstanceType ()
返回应创建的虚拟设备的实例类型
退货 | |
---|---|
TestDeviceOptions.InstanceType |
getInstanceUser
public String getInstanceUser ()
返回应创建的GCE虚拟设备的实例类型
退货 | |
---|---|
String |
getLogcatOptions
public String getLogcatOptions ()
退货 | |
---|---|
String | 配置的logcat选项 |
getMaxLogcatDataSize
public long getMaxLogcatDataSize ()
获取要保留的tmp logcat数据的近似最大大小(以字节为单位)。
退货 | |
---|---|
long |
getMaxWifiConnectTime
public long getMaxWifiConnectTime ()
退货 | |
---|---|
long | 尝试连接wifi的最长时间。 |
getOnlineTimeout
public long getOnlineTimeout ()
退货 | |
---|---|
long | 等待设备在线的默认时间(毫秒)。 |
getPostBootCommands
publicgetPostBootCommands ()
退货 | |
---|---|
重启后要运行的Shell命令列表。 |
getRebootTimeout
public int getRebootTimeout ()
退货 | |
---|---|
int | 完整系统引导的超时时间(以毫秒为单位)。 |
getRemoteAdbPort
public int getRemoteAdbPort ()
返回adb服务器侦听的远程端口
退货 | |
---|---|
int |
getRemoteFetchFilePattern
publicgetRemoteFetchFilePattern ()
返回要通过scp提取的模式列表。
退货 | |
---|---|
getSerivceAccountJsonKeyFile
public File getSerivceAccountJsonKeyFile ()
退货 | |
---|---|
File | 服务帐户json密钥文件。 |
getSshPrivateKeyPath
public File getSshPrivateKeyPath ()
返回用于对Gce Avd实例进行操作的ssh密钥的路径。
退货 | |
---|---|
File |
getUnencryptRebootTimeout
public int getUnencryptRebootTimeout ()
退货 | |
---|---|
int | 解密文件后,格式化文件系统和重新引导设备的超时(以毫秒为单位)。 |
getUseFastbootErase
public boolean getUseFastbootErase ()
退货 | |
---|---|
boolean | 是否使用fastboot擦除而不是fastboot格式来擦除分区。 |
getWifiAttempts
public int getWifiAttempts ()
退货 | |
---|---|
int | 连接到wifi网络的默认尝试次数。 |
getWifiRetryWaitTime
public int getWifiRetryWaitTime ()
退货 | |
---|---|
int | wifi连接重试之间的基本等待时间。 |
getWifiUtilAPKPath
public String getWifiUtilAPKPath ()
退货 | |
---|---|
String | wifiutil apk路径 |
isDisableKeyguard
public boolean isDisableKeyguard ()
检查启动完成后是否应该尝试禁用键盘锁
退货 | |
---|---|
boolean |
isEnableAdbRoot
public boolean isEnableAdbRoot ()
检查是否应在启动时为此设备启用adb root
退货 | |
---|---|
boolean |
isLogcatCaptureEnabled
public boolean isLogcatCaptureEnabled ()
退货 | |
---|---|
boolean | 如果启用了后台logcat捕获,则为true |
isWifiExpoRetryEnabled
public boolean isWifiExpoRetryEnabled ()
退货 | |
---|---|
boolean | 是否应使用指数重试策略。 |
setAdbRecoveryTimeout
public void setAdbRecoveryTimeout (int adbRecoveryTimeout)
参量 | |
---|---|
adbRecoveryTimeout | int :进入恢复模式的超时时间(以毫秒为单位)。 |
setAvdConfigFile
public void setAvdConfigFile (File avdConfigFile)
设置Gce Avd配置文件以启动实例。
参量 | |
---|---|
avdConfigFile | File |
setAvdDriverBinary
public void setAvdDriverBinary (File avdDriverBinary)
将二进制文件的路径设置为启动Gce Avd实例。
参量 | |
---|---|
avdDriverBinary | File |
setConnCheckUrl
public void setConnCheckUrl (String url)
参量 | |
---|---|
url | String |
setCutoffBattery
public void setCutoffBattery (int cutoffBattery)
设置最低电池电量以继续调用。
参量 | |
---|---|
cutoffBattery | int |
setDisableKeyguard
public void setDisableKeyguard (boolean disableKeyguard)
设置一旦启动完成我们是否应该尝试禁用键盘锁
参量 | |
---|---|
disableKeyguard | boolean |
setFastbootTimeout
public void setFastbootTimeout (int fastbootTimeout)
参量 | |
---|---|
fastbootTimeout | int :以毫秒为单位的timout引导进入快速引导模式。 |
setGceCmdTimeout
public void setGceCmdTimeout (long gceCmdTimeout)
设置实例的Gce Avd超时以使其联机。
参量 | |
---|---|
gceCmdTimeout | long |
setGceDriverBuildIdParam
public void setGceDriverBuildIdParam (String gceDriverBuildIdParam)
设置应与构建信息中的构建ID配对的GCE驱动程序参数
参量 | |
---|---|
gceDriverBuildIdParam | String |
setGceDriverLogLevel
public void setGceDriverLogLevel (Log.LogLevel mGceDriverLogLevel)
设置Gce Avd驱动程序的日志级别。
参量 | |
---|---|
mGceDriverLogLevel | Log.LogLevel |
setGceMaxAttempt
public void setGceMaxAttempt (int gceMaxAttempt)
设置启动GCE设备的最大尝试次数
参量 | |
---|---|
gceMaxAttempt | int |
setLogcatOptions
public void setLogcatOptions (String logcatOptions)
设置要传递给logcat的选项
参量 | |
---|---|
logcatOptions | String |
setMaxLogcatDataSize
public void setMaxLogcatDataSize (long maxLogcatDataSize)
设置要保留的tmp logcat的近似最大大小(以字节为单位)
参量 | |
---|---|
maxLogcatDataSize | long |
setOnlineTimeout
public void setOnlineTimeout (long onlineTimeout)
参量 | |
---|---|
onlineTimeout | long |
setRebootTimeout
public void setRebootTimeout (int rebootTimeout)
参量 | |
---|---|
rebootTimeout | int :系统完全启动的超时(以毫秒为单位)。 |
setServiceAccountJsonKeyFile
public void setServiceAccountJsonKeyFile (File jsonKeyFile)
设置服务帐户json密钥文件。
参量 | |
---|---|
jsonKeyFile | File :密钥文件。 |
setSshPrivateKeyPath
public void setSshPrivateKeyPath (File sshPrivateKeyPath)
设置ssh密钥的路径,以用于Gce Avd实例的操作。
参量 | |
---|---|
sshPrivateKeyPath | File |
setUnencryptRebootTimeout
public void setUnencryptRebootTimeout (int unencryptRebootTimeout)
参量 | |
---|---|
unencryptRebootTimeout | int :解密文件后,要格式化的文件系统和要重新引导的设备的超时(以毫秒为单位)。 |
setUseFastbootErase
public void setUseFastbootErase (boolean useFastbootErase)
参量 | |
---|---|
useFastbootErase | boolean :是否使用快速启动擦除而不是快速启动格式来擦除分区。 |
setWifiAttempts
public void setWifiAttempts (int wifiAttempts)
参量 | |
---|---|
wifiAttempts | int |
应该禁用重新启动
public boolean shouldDisableReboot ()
退货 | |
---|---|
boolean | 是否应禁用设备重启 |
shouldSkipTearDown
public boolean shouldSkipTearDown ()
如果应跳过GCE拆卸,则返回true。否则为假。
退货 | |
---|---|
boolean |
shouldUseContentProvider
public boolean shouldUseContentProvider ()
返回是否可以使用Tradefed内容提供程序来推/拉文件。
退货 | |
---|---|
boolean |
waitForGceTearDown
public boolean waitForGceTearDown ()
如果我们在继续之前阻止GCE拆卸完成,则返回true。
退货 | |
---|---|
boolean |
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2019-10-02 UTC.