SystemUtil
public
class
SystemUtil
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.SystemUtil |
用於發出系統呼叫的工具類別。
摘要
欄位 | |
---|---|
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()
取得指向 Tradefed 外部測試目錄的 |
static
File
|
getProductOutputDir()
從 Android 建構樹狀結構中取得產品專屬輸出目錄。 |
static
File
|
getRunningJavaBinaryPath(boolean skipJavaCheck)
這個版本含有明確的功能伺服器,僅適用於特殊情況,例如雜訊干擾的乾燥運作。 |
static
File
|
getRunningJavaBinaryPath()
傳回目前測試輔助程式執行的 Java 二進位檔路徑 |
static
|
getTestCasesDirs(IBuildInfo buildInfo)
取得測試案例目錄的 |
static
boolean
|
isLocalMode()
如果 Tradefed 以本機模式執行,且應為使用者自動執行某些動作,則會傳回 true。 |
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
公用建構函式
SystemUtil
public SystemUtil ()
公用方法
getExternalTestCasesDir
public static File getExternalTestCasesDir (SystemUtil.EnvVariable envVariable)
取得與 env. 變數相關聯的檔案。
參數 | |
---|---|
envVariable |
SystemUtil.EnvVariable :ANDROID_TARGET_OUT_TESTCASES 或 ANDROID_HOST_OUT_TESTCASES |
傳回 | |
---|---|
File |
相關聯的目錄。 |
getExternalTestCasesDirs
public staticgetExternalTestCasesDirs ()
取得指向 Tradefed 外部測試目錄的 ERROR(/File)
清單。
傳回 | |
---|---|
|
getProductOutputDir
public static File getProductOutputDir ()
從 Android 建構樹狀結構中取得產品專屬的輸出目錄。這個位置通常包含各種裝置分區、啟動載入程式、無線電等的映像檔。
注意:這個方法不保證這個路徑存在。
傳回 | |
---|---|
File |
輸出目錄的位置,或如果目前的版本不是,則為 null |
getRunningJavaBinaryPath
public static File getRunningJavaBinaryPath (boolean skipJavaCheck)
這個版本含有明確的功能伺服器,僅適用於特殊情況,例如噪音干擾的乾燥運作。
參數 | |
---|---|
skipJavaCheck |
boolean |
傳回 | |
---|---|
File |
getRunningJavaBinaryPath
public static File getRunningJavaBinaryPath ()
傳回目前測試架構正在執行的 Java 二進位檔路徑
傳回 | |
---|---|
File |
getTestCasesDirs
public staticgetTestCasesDirs (IBuildInfo buildInfo)
取得測試案例目錄的 ERROR(/File)
清單
參數 | |
---|---|
buildInfo |
IBuildInfo :建構構件資訊。如果沒有建構資訊,或不需要從建構資訊取得測試案例目錄,請將其設為空值。 |
傳回 | |
---|---|
|
根據環境變數的值和指定的建構資訊,列出建構輸出內容的測試案例資料夾目錄 ERROR(/File) 。 |
isLocalMode
public static boolean isLocalMode ()
如果 Tradefed 以本機模式執行,且應為使用者自動執行某些動作,則會傳回 true。
傳回 | |
---|---|
boolean |
isRemoteEnvironment
public static boolean isRemoteEnvironment ()
如果目前是在遠端環境中執行,則傳回 true。
傳回 | |
---|---|
boolean |