GTest
public
class
GTest
extends GTestBase
implements
IDeviceTest
A Test that runs a native test package on given device.
Summary
Public constructors |
GTest()
|
Protected methods |
void
|
executeCommandByScript(ITestDevice testDevice, String cmd, IShellOutputReceiver resultParser)
Helper method to run a gtest command from a temporary script, in the case that the command
is too long to be run directly by adb.
|
String
|
getGTestCmdLine(String fullPath, String flags)
Helper method to build the gtest command to run.
|
String
|
loadFilter(String binaryOnDevice)
Define get filter method.
|
boolean
|
shouldSkipFile(String fullPath)
Helper method to determine if we should skip the execution of a given file.
|
Public constructors
Public methods
getDevice
public ITestDevice getDevice ()
Get the device under test.
setDevice
public void setDevice (ITestDevice device)
Inject the device under test.
Protected methods
executeCommandByScript
protected void executeCommandByScript (ITestDevice testDevice,
String cmd,
IShellOutputReceiver resultParser)
Helper method to run a gtest command from a temporary script, in the case that the command
is too long to be run directly by adb.
Parameters |
testDevice |
ITestDevice : the device on which to run the command |
cmd |
String : the command string to run |
resultParser |
IShellOutputReceiver : the output receiver for reading test results
|
getGTestCmdLine
protected String getGTestCmdLine (String fullPath,
String flags)
Helper method to build the gtest command to run.
Parameters |
fullPath |
String : absolute file system path to gtest binary on device |
flags |
String : gtest execution flags |
Returns |
String |
the shell command line to run for the gtest
|
loadFilter
protected String loadFilter (String binaryOnDevice)
Define get filter method.
Sub class must implement how to get it's own filter.
Parameters |
binaryOnDevice |
String : the full path of the filter file. |
Returns |
String |
filter string.
|
shouldSkipFile
protected boolean shouldSkipFile (String fullPath)
Helper method to determine if we should skip the execution of a given file.
Parameters |
fullPath |
String : the full path of the file in question |
Returns |
boolean |
true if we should skip the said file.
|