SandboxedInvocationExecution

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)

針對叫用動作的每個裝置部分,呼叫 ITestDevice#postInvocationTearDown(Throwable)

void runDevicePreInvocationSetup(IInvocationContext context, IConfiguration config, ITestLogger logger)

針對叫用動作的每個裝置部分,呼叫 ERROR(ITestDevice#preInvocationSetup(IBuildInfo)/com.android.tradefed.device.ITestDevice#preInvocationSetup(com.android.tradefed.build.IBuildInfo) ITestDevice#preInvocationSetup(IBuildInfo))

受保護的方法

getPreparersToRun(IConfiguration config, String deviceName)

擷取要在裝置上執行的預備作業清單。

void logHostAdb(IConfiguration config, ITestLogger logger)

從 $TMPDIR/adb.$UID.log 收集記錄。

公用建構函式

SandboxedInvocationExecution

public SandboxedInvocationExecution ()

公用方法

cleanUpBuilds

public void cleanUpBuilds (IInvocationContext context, 
                IConfiguration config)

執行 build_provider 清理步驟。與建構擷取作業相關。

參數
context IInvocationContext:叫用作業的 IInvocationContext

config IConfiguration:此測試執行作業的 IConfiguration

fetchBuild

public boolean fetchBuild (TestInformation testInfo, 
                IConfiguration config, 
                IRescheduler rescheduler, 
                ITestInvocationListener listener)

執行叫用動作的 build_provider 步驟。

參數
testInfo TestInformation:叫用作業的 TestInformation

config IConfiguration:此測試執行作業的 IConfiguration

rescheduler IReschedulerIRescheduler,用於重新排定部分呼叫,以便在其他資源上執行

listener ITestInvocationListener:用於回報建構下載失敗的 ITestInvocation

傳回
boolean 如果成功下載版本,則傳回 True,否則傳回 False。

擲回
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)

針對叫用動作的每個裝置部分,呼叫 ERROR(ITestDevice#preInvocationSetup(IBuildInfo)/com.android.tradefed.device.ITestDevice#preInvocationSetup(com.android.tradefed.build.IBuildInfo) ITestDevice#preInvocationSetup(IBuildInfo))

參數
context IInvocationContext:叫用作業的 IInvocationContext

config IConfiguration:此測試執行作業的 IConfiguration

logger ITestLogger:用於回報記錄的 ITestLogger

擲回
DeviceNotAvailableException
TargetSetupError

受保護的方法

getPreparersToRun

protected  getPreparersToRun (IConfiguration config, 
                String deviceName)

擷取要在裝置上執行的預備作業清單。

在沙箱類別中覆寫,限制研究室準備工具在沙箱子項中執行

參數
config IConfiguration

deviceName String

傳回

logHostAdb

protected void logHostAdb (IConfiguration config, 
                ITestLogger logger)

從 $TMPDIR/adb.$UID.log 收集記錄。

參數
config IConfiguration

logger ITestLogger