沙盒調用執行
public class SandboxedInvocationExecution
extends InvocationExecution
java.lang.Object | ||
↳ | com.android.tradefed.invoker.InvocationExecution | |
↳ | com.android.tradefed.invoker.sandbox.SandboxedInvocationExecution |
調用的特殊沙箱執行:這是當我們在沙箱內運行命令時的 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) |
受保護的方法 | |
---|---|
getLabPreparersToRun ( IConfiguration config, String deviceName) 檢索要在此設備上運行的實驗室準備者列表。 | |
getTargetPreparersToRun ( 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 | 如果我們成功下載構建,則為真,否則為假。 |
投擲 | |
---|---|
BuildRetrievalError | |
DeviceNotAvailableException |
runDevicePostInvocationTearDown
public void runDevicePostInvocationTearDown (IInvocationContext context, IConfiguration config, Throwable exception)
為調用的每個設備部分調用ITestDevice#postInvocationTearDown(Throwable)
。
參數 | |
---|---|
context | IInvocationContext :調用的IInvocationContext 。 |
config | IConfiguration :本次測試運行的IConfiguration 。 |
exception | Throwable :測試運行時拋出的原始異常(如果有)。 |
runDevicePreInvocationSetup
public void runDevicePreInvocationSetup (IInvocationContext context, IConfiguration config, ITestLogger logger)
參數 | |
---|---|
context | IInvocationContext :調用的IInvocationContext 。 |
config | IConfiguration :本次測試運行的IConfiguration 。 |
logger | ITestLogger :用於報告日誌的ITestLogger 。 |
投擲 | |
---|---|
DeviceNotAvailableException | |
TargetSetupError |
受保護的方法
getLabPreparersToRun
protectedgetLabPreparersToRun (IConfiguration config, String deviceName)
檢索要在此設備上運行的實驗室準備者列表。
在沙盒類中覆蓋以限制實驗室準備者在沙盒子類中運行
參數 | |
---|---|
config | IConfiguration |
deviceName | String |
退貨 | |
---|---|
getTargetPreparersToRun
protectedgetTargetPreparersToRun (IConfiguration config, String deviceName)
檢索要在此設備上運行的目標準備程序列表。
在沙盒類中覆蓋以限制實驗室準備者在沙盒子類中運行
參數 | |
---|---|
config | IConfiguration |
deviceName | String |
退貨 | |
---|---|
logHostAdb
protected void logHostAdb (IConfiguration config, ITestLogger logger)
從 $TMPDIR/adb.$UID.log 收集日誌。
參數 | |
---|---|
config | IConfiguration |
logger | ITestLogger |