RemoteInvocationExecution

public class RemoteInvocationExecution
extends InvocationExecution

java.lang.Object
   ↳ com.android.tradefed.invoker.InvocationExecution
     ↳ com.android.tradefed.invoker.RemoteInvocationExecution


實作 InvocationExecution,用於驅動遠端執行作業。

摘要

巢狀類別

class RemoteInvocationExecution.FileOptionValueTransformer

 

常數

String GLOBAL_REMOTE_CONFIG

long JOIN_CLEAN_TIMEOUT_MS

long LAUNCH_EXTRA_DEVICE

long NEW_USER_TIMEOUT

String PROTO_RESULT_NAME

long PULL_RESULT_TIMEOUT

long PUSH_TF_TIMEOUT

String REMOTE_CONFIG

long REMOTE_PROCESS_RUNNING_WAIT

String REMOTE_USER_DIR

long SETUP_REMOTE_DIR_TIMEOUT

String START_FEATURE_SERVER

String STDERR_FILE

String STDOUT_FILE

公用建構函式

RemoteInvocationExecution()

公用方法

void doCleanUp(IInvocationContext context, IConfiguration config, Throwable exception)

執行 target_preparer 和 multi_target_preparer 的清除步驟。

void doSetup(TestInformation testInfo, IConfiguration config, ITestLogger logger)

執行 target_preparer 和 multi_target_preparer setUp 步驟。

void doTeardown(TestInformation testInfo, IConfiguration config, ITestLogger logger, Throwable exception)

執行 target_preparer 和 multi_target_preparer 拆除步驟。

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

執行調用的 build_provider 步驟。

void runTests(TestInformation info, IConfiguration config, ITestInvocationListener listener)

執行測試。

受保護的方法

void customizeDevicePreInvocation(IConfiguration config, IInvocationContext context)

Give a chance to customize some of the device before preInvocationSetup.

String getAdbVersion()

傳回用於呼叫的 adb 版本。

常數

GLOBAL_REMOTE_CONFIG

public static final String GLOBAL_REMOTE_CONFIG

常數值: "global-remote-configuration"

JOIN_CLEAN_TIMEOUT_MS

public static final long JOIN_CLEAN_TIMEOUT_MS

常數值: 120000 (0x000000000001d4c0)

LAUNCH_EXTRA_DEVICE

public static final long LAUNCH_EXTRA_DEVICE

常數值: 900000 (0x00000000000dbba0)

NEW_USER_TIMEOUT

public static final long NEW_USER_TIMEOUT

常數值: 300000 (0x00000000000493e0)

PROTO_RESULT_NAME

public static final String PROTO_RESULT_NAME

常數值: "output.pb"

PULL_RESULT_TIMEOUT

public static final long PULL_RESULT_TIMEOUT

常數值: 180000 (0x000000000002bf20)

PUSH_TF_TIMEOUT

public static final long PUSH_TF_TIMEOUT

常數值: 150000 (0x00000000000249f0)

REMOTE_CONFIG

public static final String REMOTE_CONFIG

常數值: "configuration"

REMOTE_PROCESS_RUNNING_WAIT

public static final long REMOTE_PROCESS_RUNNING_WAIT

常數值: 15000 (0x0000000000003a98)

REMOTE_USER_DIR

public static final String REMOTE_USER_DIR

常數值: "/home/{$USER}/"

SETUP_REMOTE_DIR_TIMEOUT

public static final long SETUP_REMOTE_DIR_TIMEOUT

常數值: 600000 (0x00000000000927c0)

START_FEATURE_SERVER

public static final String START_FEATURE_SERVER

常數值: "START_FEATURE_SERVER"

STDERR_FILE

public static final String STDERR_FILE

常數值: "screen-VM_tradefed-stderr.txt"

STDOUT_FILE

public static final String STDOUT_FILE

常數值: "screen-VM_tradefed-stdout.txt"

公用建構函式

RemoteInvocationExecution

public RemoteInvocationExecution ()

公用方法

doCleanUp

public void doCleanUp (IInvocationContext context, 
                IConfiguration config, 
                Throwable exception)

執行 target_preparer 和 multi_target_preparer 的 cleanUp 步驟。裝置是否會清理。

參數
context IInvocationContext:叫用的 IInvocationContext

config IConfiguration:這次測試執行的 IConfiguration

exception Throwable:測試執行時擲回的原始例外狀況。

doSetup

public void doSetup (TestInformation testInfo, 
                IConfiguration config, 
                ITestLogger logger)

執行 target_preparer 和 multi_target_preparer 的 setUp 步驟。設定測試所需的所有裝置。

參數
testInfo TestInformation:叫用的 TestInformation

config IConfiguration:這次測試執行的 IConfiguration

logger ITestLogger:回報設定失敗記錄的 ITestLogger

擲回
BuildError
DeviceNotAvailableException
TargetSetupError

doTeardown

public void doTeardown (TestInformation testInfo, 
                IConfiguration config, 
                ITestLogger logger, 
                Throwable exception)

執行 target_preparer 和 multi_target_preparer 拆除步驟。是否拆除與設定相關聯的裝置。

參數
testInfo TestInformation:叫用的 TestInformation

config IConfiguration:這次測試執行的 IConfiguration

logger ITestLoggerITestLogger,用於回報記錄。

exception Throwable:測試執行時擲回的原始例外狀況。

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

runTests

public void runTests (TestInformation info, 
                IConfiguration config, 
                ITestInvocationListener listener)

執行測試。

參數
info TestInformation:用於執行測試的 TestInformation

config IConfiguration:要執行的 IConfiguration

listener ITestInvocationListener:測試結果的 ITestInvocationListener

受保護的方法

customizeDevicePreInvocation

protected void customizeDevicePreInvocation (IConfiguration config, 
                IInvocationContext context)

在 preInvocationSetup 之前,提供自訂部分裝置的機會。

參數
config IConfiguration:呼叫的設定。

context IInvocationContext:目前的叫用內容。

getAdbVersion

protected String getAdbVersion ()

傳回用於叫用的 adb 版本。

傳回
String