HostGTest

public class HostGTest
extends GTestBase implements IAbiReceiver, IBuildReceiver

java.lang.Object
   ↳ com.android.tradefed.testtype.GTestBase
     ↳ com.android.tradefed.testtype.HostGTest


A Test that runs a native test package.

Summary

Public constructors

HostGTest()

Public methods

CommandResult executeHostCommand(String cmd, long timeoutMs)
CommandResult executeHostCommand(String cmd)
CommandResult executeHostGTestCommand(String cmd, long timeoutMs, IShellOutputReceiver receiver)
IAbi getAbi()
String loadFilter(String binaryOnHost)

Define get filter method.

void run(ITestInvocationListener listener)

void setAbi(IAbi abi)
void setBuild(IBuildInfo buildInfo)

Public constructors

HostGTest

public HostGTest ()

Public methods

executeHostCommand

public CommandResult executeHostCommand (String cmd, 
                long timeoutMs)

Parameters
cmd String: command that want to execute in host

timeoutMs long: timeout for command in milliseconds

Returns
CommandResult the CommandResult of command

executeHostCommand

public CommandResult executeHostCommand (String cmd)

Parameters
cmd String: command that want to execute in host

Returns
CommandResult the CommandResult of command

executeHostGTestCommand

public CommandResult executeHostGTestCommand (String cmd, 
                long timeoutMs, 
                IShellOutputReceiver receiver)

Parameters
cmd String: command that want to execute in host

timeoutMs long: timeout for command in milliseconds

receiver IShellOutputReceiver: the result parser

Returns
CommandResult the CommandResult of command

getAbi

public IAbi getAbi ()

Returns
IAbi

loadFilter

public String loadFilter (String binaryOnHost)

Define get filter method.

Sub class must implement how to get it's own filter.

Parameters
binaryOnHost String: the full path of the filter file.

Returns
String filter string.

run

public void run (ITestInvocationListener listener)

Parameters
listener ITestInvocationListener

Throws
DeviceNotAvailableException

setAbi

public void setAbi (IAbi abi)

Parameters
abi IAbi

setBuild

public void setBuild (IBuildInfo buildInfo)

Parameters
buildInfo IBuildInfo