SystemUtil
public
class
SystemUtil
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.util.SystemUtil |
用於發出系統呼叫的公用程式類別。
摘要
常數 | |
|---|---|
String |
REMOTE_VM_VARIABLE
|
欄位 | |
|---|---|
public
static
final
|
ENV_VARIABLE_PATHS_IN_TESTS_DIR
追蹤變數對應至測試目錄中子路徑的情況。 |
公用建構函式 | |
|---|---|
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()
Returns true if Tradefed is running in local mode and should automate some actions for user. |
static
boolean
|
isRemoteEnvironment()
如果目前在遠端環境中執行,則傳回 true。 |
常數
REMOTE_VM_VARIABLE
public static final String REMOTE_VM_VARIABLE
常數值: "REMOTE_VM_ENV"
欄位
ENV_VARIABLE_PATHS_IN_TESTS_DIR
public static finalENV_VARIABLE_PATHS_IN_TESTS_DIR
追蹤變數對應至測試目錄中子路徑的情況。
公用建構函式
SystemUtil
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 ()
取得指向 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 |
|