ตั้งแต่ปี 2026 เป็นต้นไป เราจะเผยแพร่ซอร์สโค้ดไปยัง AOSP ในไตรมาสที่ 2 และ 4 เพื่อให้สอดคล้องกับโมเดลการพัฒนาแบบ Trunk Stable และรับประกันความเสถียรของแพลตฟอร์มสำหรับระบบนิเวศ หากต้องการสร้างและมีส่วนร่วมใน AOSP ให้ใช้ android-latest-release android-latest-release สาขา Manifest จะอ้างอิงถึงรุ่นล่าสุดที่พุชไปยัง AOSP เสมอ ดูข้อมูลเพิ่มเติมได้ที่การเปลี่ยนแปลงใน AOSP
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
|
การทดสอบโฮสต์มีไว้เพื่อเรียกใช้ไฟล์ไบนารี Python ของ Mobly จากระบบบิลด์ Android (Soong)
สรุป
วิธีการที่ได้รับการป้องกัน |
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)
แยกวิเคราะห์ผลการทดสอบ Mobly และรายงานผล
|
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)
เพิ่มตัวกรองของการทดสอบที่จะยกเว้น
| พารามิเตอร์ |
filter |
String |
addIncludeFilter
public void addIncludeFilter (String filter)
เพิ่มตัวกรองของการทดสอบที่จะรวม
| พารามิเตอร์ |
filter |
String |
clearExcludeFilters
public void clearExcludeFilters ()
ลบตัวกรองการยกเว้นทั้งหมดที่ติดตามอยู่ในปัจจุบัน
clearIncludeFilters
public void clearIncludeFilters ()
ลบตัวกรองรวมทั้งหมดที่ติดตามอยู่ในปัจจุบัน
getDevice
public ITestDevice getDevice ()
เตรียมอุปกรณ์ภายใต้การทดสอบ
getExcludeFilters
public Set<String> getExcludeFilters ()
แสดงผลSetปัจจุบันของตัวกรองยกเว้น
getIncludeFilters
public Set<String> getIncludeFilters ()
แสดงผล Set ปัจจุบันของตัวกรองรวม
setBuild
public void setBuild (IBuildInfo buildInfo)
| พารามิเตอร์ |
buildInfo |
IBuildInfo |
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)
| พารามิเตอร์ |
filePath |
String |
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: ออบเจ็กต์ InputStream ที่อ่านในไฟล์ผลการทดสอบ Mobly |
parser |
MoblyYamlResultParser: ออบเจ็กต์ MoblyYamlResultParser ที่ประมวลผลผลการทดสอบ Mobly |
listener |
ITestInvocationListener: อินสแตนซ์ ITestInvocationListener ที่ทำการรายงานต่างๆ |
runName |
String: str, ชื่อของไบนารีทดสอบ Mobly ที่รัน |
protected void updateConfigFile (InputStream configInputStream,
Writer writer)
| พารามิเตอร์ |
configInputStream |
InputStream |
writer |
Writer |
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2026-06-22 UTC
[[["เข้าใจง่าย","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 UTC"],[],[]]