系统实用程序
public class SystemUtil
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.SystemUtil |
进行系统调用的实用程序类。
概括
嵌套类 | |
---|---|
enum | SystemUtil.EnvVariable
|
领域 | |
---|---|
public static final | ENV_VARIABLE_PATHS_IN_TESTS_DIR 跟踪变量到测试目录中需要的子路径的映射。 |
public static final String | REMOTE_VM_VARIABLE
|
公共建设者 | |
---|---|
SystemUtil () |
公开方法 | |
---|---|
static File | getExternalTestCasesDir ( SystemUtil.EnvVariable envVariable) 获取与环境关联的文件。 |
static | getExternalTestCasesDirs () 获取 |
static File | getProductOutputDir () 从Android构建树获取产品特定的输出目录。 |
static File | getRunningJavaBinaryPath () 返回当前测试工具在其中运行的Java二进制文件的路径 |
static | getTestCasesDirs (IBuildInfo buildInfo) 获取测试用例目录的 |
static boolean | isRemoteEnvironment () 如果我们当前在远程环境中运行,则返回true。 |
领域
ENV_VARIABLE_PATHS_IN_TESTS_DIR
public static finalENV_VARIABLE_PATHS_IN_TESTS_DIR
跟踪变量到测试目录中需要的子路径的映射。
REMOTE_VM_VARIABLE
public static final String REMOTE_VM_VARIABLE
公共建设者
系统实用程序
public SystemUtil ()
公开方法
getExternalTestCasesDir
public static File getExternalTestCasesDir (SystemUtil.EnvVariable envVariable)
获取与环境关联的文件。多变的。
参数 | |
---|---|
envVariable | SystemUtil.EnvVariable :ANDROID_TARGET_OUT_TESTCASES或ANDROID_HOST_OUT_TESTCASES |
退货 | |
---|---|
File | 关联的目录。 |
getExternalTestCasesDirs
public staticgetExternalTestCasesDirs ()
获取ERROR(/File)
的列表,这些列表指向Tradefed外部的测试目录。
退货 | |
---|---|
getProductOutputDir
public static File getProductOutputDir ()
从Android构建树获取产品特定的输出目录。通常,此位置包含各种设备分区,引导加载程序,无线电等的映像。
注意:该方法不能保证此路径存在。
退货 | |
---|---|
File | 输出目录的位置;如果当前版本不是,则返回null |
getRunningJavaBinaryPath
public static File getRunningJavaBinaryPath ()
返回当前测试工具在其中运行的Java二进制文件的路径
退货 | |
---|---|
File |
getTestCasesDirs
public staticgetTestCasesDirs (IBuildInfo buildInfo)
获取测试用例目录的ERROR(/File)
列表
参数 | |
---|---|
buildInfo | IBuildInfo :构建工件信息。如果没有可用的构建信息,或者不需要从构建信息获取测试用例目录,则将其设置为null。 |
退货 | |
---|---|
基于环境变量的值和给定的构建信息,构建输出的测试用例文件夹的目录的ERROR(/File) 列表。 |
isRemoteEnvironment
public static boolean isRemoteEnvironment ()
如果我们当前在远程环境中运行,则返回true。
退货 | |
---|---|
boolean |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2020-09-08 UTC.
[]
[]