Effective in 2026, to align with our trunk stable development model and ensure platform stability for the ecosystem, we will publish source code to AOSP in Q2 and Q4. For building and contributing to AOSP, use android-latest-release. The android-latest-release manifest branch will always reference the most recent release pushed to AOSP. For more information, see Changes to AOSP.
Stay organized with collections
Save and categorize content based on your preferences.
MoblyBinaryHostTest
public
class
MoblyBinaryHostTest
extends Object
implements
IBuildReceiver,
IDeviceTest,
IRemoteTest,
IShardableTest,
ITestFilterReceiver
| java.lang.Object
|
| ↳ |
com.android.tradefed.testtype.mobly.MoblyBinaryHostTest
|
Host test meant to run a mobly python binary file from the Android Build system (Soong)
Summary
Protected methods |
String[]
|
buildCommandLineArray(String filePath, String configPath, List<String> tests)
|
String[]
|
buildCommandLineArray(String filePath, String configPath)
|
String[]
|
buildCommandLineForListTests(String filePath)
|
Optional<Pair<List<String>, List<String>>>
|
filterTests(String[] testListLines, String runName, ITestInvocationListener listener)
|
MoblyArtifactReporter
|
getArtifactReporter()
|
String
|
getLogDirAbsolutePath()
|
File
|
getLogDirFile()
|
boolean
|
processYamlTestResults(InputStream inputStream, MoblyYamlResultParser parser, ITestInvocationListener listener, String runName)
Parses Mobly test results and does result reporting.
|
void
|
updateConfigFile(InputStream configInputStream, Writer writer)
|
Public constructors
MoblyBinaryHostTest
public MoblyBinaryHostTest ()
Public methods
addAllExcludeFilters
public void addAllExcludeFilters (Set<String> filters)
Adds the Set of filters of which tests to exclude.
addAllIncludeFilters
public void addAllIncludeFilters (Set<String> filters)
Adds the Set of filters of which tests to include.
addExcludeFilter
public void addExcludeFilter (String filter)
Adds a filter of which tests to exclude.
addIncludeFilter
public void addIncludeFilter (String filter)
Adds a filter of which tests to include.
clearExcludeFilters
public void clearExcludeFilters ()
Delete all the exclude filters currently tracked.
clearIncludeFilters
public void clearIncludeFilters ()
Delete all the include filters currently tracked.
getDevice
public ITestDevice getDevice ()
Get the device under test.
getExcludeFilters
public Set<String> getExcludeFilters ()
Returns the current Set of exclude filters.
getIncludeFilters
public Set<String> getIncludeFilters ()
Returns the current Set of include filters.
setBuild
public void setBuild (IBuildInfo buildInfo)
| Parameters |
buildInfo |
IBuildInfo |
setDevice
public void setDevice (ITestDevice device)
Inject the device under test.
split
public Collection<IRemoteTest> split (int shardCountHint)
Alternative version of split() which also provides the shardCount that is attempted
to be run. This is useful for some test runner that cannot arbitrarily decide sometimes.
| Parameters |
shardCountHint |
int: the attempted shard count. |
| Returns |
Collection<IRemoteTest> |
a collection of subtests to be executed separately or null if test is
not currently shardable |
Protected methods
buildCommandLineArray
protected String[] buildCommandLineArray (String filePath,
String configPath,
List<String> tests)
| Parameters |
filePath |
String |
configPath |
String |
tests |
List |
buildCommandLineArray
protected String[] buildCommandLineArray (String filePath,
String configPath)
| Parameters |
filePath |
String |
configPath |
String |
buildCommandLineForListTests
protected String[] buildCommandLineForListTests (String filePath)
| Parameters |
filePath |
String |
filterTests
protected Optional<Pair<List<String>, List<String>>> filterTests (String[] testListLines,
String runName,
ITestInvocationListener listener)
| Parameters |
testListLines |
String |
runName |
String |
listener |
ITestInvocationListener |
| Returns |
Optional<Pair<List<String>, List<String>>> |
|
getLogDirAbsolutePath
protected String getLogDirAbsolutePath ()
getLogDirFile
protected File getLogDirFile ()
protected boolean processYamlTestResults (InputStream inputStream,
MoblyYamlResultParser parser,
ITestInvocationListener listener,
String runName)
Parses Mobly test results and does result reporting.
| Parameters |
inputStream |
InputStream: An InputStream object reading in Mobly test result file. |
parser |
MoblyYamlResultParser: An MoblyYamlResultParser object that processes Mobly test results. |
listener |
ITestInvocationListener: An ITestInvocationListener instance that does various reporting. |
runName |
String: str, the name of the Mobly test binary run. |
protected void updateConfigFile (InputStream configInputStream,
Writer writer)
| Parameters |
configInputStream |
InputStream |
writer |
Writer |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-06-22 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-06-22 UTC."],[],[]]