沙盒呼叫執行
public class SandboxedInvocationExecution
extends InvocationExecution
java.lang.Object | ||
↳ | com.android.tradefed.invoker.InitationExecution | |
↳ | com.android.tradefed.invoker.sandbox.SandboxedInitationExecution |
呼叫的特殊沙箱執行:這是當我們在沙箱內執行指令時的 InvocationExection。該構建應該已經在上下文中可用。
概括
公共構造函數 | |
---|---|
SandboxedInvocationExecution () |
公共方法 | |
---|---|
void | cleanUpBuilds (IInvocationContext context, IConfiguration config) 執行 build_provider 清理步驟。 |
boolean | fetchBuild (TestInformation testInfo, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener listener) 執行呼叫的 build_provider 步驟。 |
void | runDevicePostInvocationTearDown (IInvocationContext context, IConfiguration config, Throwable exception) 為呼叫的每個裝置部分呼叫 |
void | runDevicePreInvocationSetup (IInvocationContext context, IConfiguration config, ITestLogger logger) |
受保護的方法 | |
---|---|
getPreparersToRun ( IConfiguration config, String deviceName) 檢索要在此裝置上執行的準備器清單。 | |
void | logHostAdb ( IConfiguration config, ITestLogger logger) 從 $TMPDIR/adb.$UID.log 收集日誌。 |
公共構造函數
沙盒呼叫執行
public SandboxedInvocationExecution ()
公共方法
清理構建
public void cleanUpBuilds (IInvocationContext context, IConfiguration config)
執行 build_provider 清理步驟。與構建獲取相關。
參數 | |
---|---|
context | IInvocationContext :呼叫的IInvocationContext 。 |
config | IConfiguration :本次測試運行的IConfiguration 。 |
獲取構建
public boolean fetchBuild (TestInformation testInfo, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener listener)
執行呼叫的 build_provider 步驟。
參數 | |
---|---|
testInfo | TestInformation :呼叫的TestInformation 。 |
config | IConfiguration :本次測試運行的IConfiguration 。 |
rescheduler | IRescheduler : IRescheduler ,用於重新安排呼叫的部分以便在另一個資源上執行 |
listener | ITestInvocationListener :報告建置下載失敗的ITestInvocation 。 |
退貨 | |
---|---|
boolean | 如果我們成功下載了建置版本,則為 true,否則為 false。 |
投擲 | |
---|---|
BuildRetrievalError | |
DeviceNotAvailableException |
runDevicePostInspirationTearDown
public void runDevicePostInvocationTearDown (IInvocationContext context, IConfiguration config, Throwable exception)
為呼叫的每個裝置部分呼叫ITestDevice#postInvocationTearDown(Throwable)
。
參數 | |
---|---|
context | IInvocationContext :呼叫的IInvocationContext 。 |
config | IConfiguration :本次測試運行的IConfiguration 。 |
exception | Throwable :測試運行時拋出的原始異常(如果有)。 |
運行設備預調用設定
public void runDevicePreInvocationSetup (IInvocationContext context, IConfiguration config, ITestLogger logger)
參數 | |
---|---|
context | IInvocationContext :呼叫的IInvocationContext 。 |
config | IConfiguration :本次測試運行的IConfiguration 。 |
logger | ITestLogger :報告日誌的ITestLogger 。 |
投擲 | |
---|---|
DeviceNotAvailableException | |
TargetSetupError |
受保護的方法
獲取準備運行
protectedgetPreparersToRun (IConfiguration config, String deviceName)
檢索要在此裝置上執行的準備器清單。
在沙箱類別中重寫,以限制實驗室準備者在沙箱項目內運行
參數 | |
---|---|
config | IConfiguration |
deviceName | String |
退貨 | |
---|---|
日誌主機Adb
protected void logHostAdb (IConfiguration config, ITestLogger logger)
從 $TMPDIR/adb.$UID.log 收集日誌。
參數 | |
---|---|
config | IConfiguration |
logger | ITestLogger |