ExecutableTargetTest

public class ExecutableTargetTest
extends ExecutableBaseTest implements IDeviceTest

java.lang.Object
   ↳ com.android.tradefed.testtype.binary.ExecutableBaseTest
     ↳ com.android.tradefed.testtype.binary.ExecutableTargetTest


Test runner for executable running on the target. The runner implements IDeviceTest since the binary run on a device.

Summary

Public constructors

ExecutableTargetTest()

Public methods

String findBinary(String binary)

Search for the binary to be able to run it.

ITestDevice getDevice()

Get the device under test.

void runBinary(String binaryPath, ITestInvocationListener listener, TestDescription description)

Actually run the binary at the given path.

void setDevice(ITestDevice device)

Inject the device under test.

Protected methods

void checkCommandResult(CommandResult result, ITestInvocationListener listener, TestDescription description)

Check the result of the test command.

boolean getSkipBinaryCheck()

Public constructors

ExecutableTargetTest

public ExecutableTargetTest ()

Public methods

findBinary

public String findBinary (String binary)

Search for the binary to be able to run it.

Parameters
binary String: the path of the binary or simply the binary name.

Returns
String The path to the binary, or null if not found.

Throws
DeviceNotAvailableException

getDevice

public ITestDevice getDevice ()

Get the device under test.

Returns
ITestDevice the ITestDevice

runBinary

public void runBinary (String binaryPath, 
                ITestInvocationListener listener, 
                TestDescription description)

Actually run the binary at the given path.

Parameters
binaryPath String: The path of the binary.

listener ITestInvocationListener: The listener where to report the results.

description TestDescription: The test in progress.

Throws
DeviceNotAvailableException

setDevice

public void setDevice (ITestDevice device)

Inject the device under test.

Parameters
device ITestDevice: the ITestDevice to use

Protected methods

checkCommandResult

protected void checkCommandResult (CommandResult result, 
                ITestInvocationListener listener, 
                TestDescription description)

Check the result of the test command.

Parameters
result CommandResult: test result of the command CommandResult

listener ITestInvocationListener: the ITestInvocationListener

description TestDescription: The test in progress.

getSkipBinaryCheck

protected boolean getSkipBinaryCheck ()

Returns
boolean