為配合主幹穩定開發模型,並確保生態系統的平台穩定性,我們將自 2026 年起,在第 2 季和第 4 季將原始碼發布至 AOSP。如要建構及貢獻 AOSP,請使用 android-latest-release。android-latest-release 資訊清單分支版本一律會參照推送至 Android 開放原始碼計畫的最新版本。詳情請參閱「Android 開放原始碼計畫變更」。
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
MoblyBinaryHostTest
public
class
MoblyBinaryHostTest
extends Object
implements
IBuildReceiver,
IDeviceTest,
IRemoteTest,
IShardableTest,
ITestFilterReceiver
| java.lang.Object
|
| ↳ |
com.android.tradefed.testtype.mobly.MoblyBinaryHostTest
|
主機測試:從 Android 建構系統 (Soong) 執行 mobly python 二進位檔案
摘要
受保護的方法 |
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)
|
公用建構函式
MoblyBinaryHostTest
public MoblyBinaryHostTest ()
公用方法
addAllExcludeFilters
public void addAllExcludeFilters (Set<String> filters)
新增要排除的測試篩選器 Set。
addAllIncludeFilters
public void addAllIncludeFilters (Set<String> filters)
新增要納入測試的篩選器Set。
addExcludeFilter
public void addExcludeFilter (String filter)
新增要排除的測試篩選器。
addIncludeFilter
public void addIncludeFilter (String filter)
新增要納入的測試篩選條件。
clearExcludeFilters
public void clearExcludeFilters ()
刪除目前追蹤的所有排除篩選器。
clearIncludeFilters
public void clearIncludeFilters ()
刪除目前追蹤的所有包含篩選器。
getExcludeFilters
public Set<String> getExcludeFilters ()
傳回排除篩選器的目前 Set。
getIncludeFilters
public Set<String> getIncludeFilters ()
傳回包含篩選器的目前 Set。
setBuild
public void setBuild (IBuildInfo buildInfo)
setDevice
public void setDevice (ITestDevice device)
注入測試裝置。
拆分
public Collection<IRemoteTest> split (int shardCountHint)
split() 的替代版本,也會提供嘗試執行的 shardCount。這項功能適用於有時無法任意決定的測試執行器。
| 參數 |
shardCountHint |
int:嘗試的分片數量。 |
| 傳回 |
Collection<IRemoteTest> |
要個別執行的子測試集合,或 null 如果測試目前無法分片 |
受保護的方法
buildCommandLineArray
protected String[] buildCommandLineArray (String filePath,
String configPath,
List<String> tests)
| 參數 |
filePath |
String |
configPath |
String |
tests |
List |
buildCommandLineArray
protected String[] buildCommandLineArray (String filePath,
String configPath)
| 參數 |
filePath |
String |
configPath |
String |
buildCommandLineForListTests
protected String[] buildCommandLineForListTests (String filePath)
filterTests
protected Optional<Pair<List<String>, List<String>>> filterTests (String[] testListLines,
String runName,
ITestInvocationListener listener)
| 參數 |
testListLines |
String |
runName |
String |
listener |
ITestInvocationListener |
| 傳回 |
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)
剖析 Mobly 測試結果,並回報結果。
| 參數 |
inputStream |
InputStream:讀取 Mobly 測試結果檔案的 InputStream 物件。 |
parser |
MoblyYamlResultParser:處理 Mobly 測試結果的 MoblyYamlResultParser 物件。 |
listener |
ITestInvocationListener:ITestInvocationListener 執行個體,可執行各種報表作業。 |
runName |
String:str,執行的 Mobly 測試二進位檔名稱。 |
protected void updateConfigFile (InputStream configInputStream,
Writer writer)
| 參數 |
configInputStream |
InputStream |
writer |
Writer |
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2026-06-22 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2026-06-22 (世界標準時間)。"],[],[]]