ProtoResultParser
public class ProtoResultParser
extends Object
java.lang.Objek | |
↳ | com.android.tradefed.result.proto.ProtoResultParser |
Parser untuk format proto hasil Tradefed.
Ringkasan
Kelas bersarang | |
---|---|
enum | ProtoResultParser.TestLevel Pencacahan mewakili level proto yang sedang diproses. |
Konstruktor publik | |
---|---|
ProtoResultParser (ITestInvocationListener listener, IInvocationContext context, boolean reportInvocation) aktor. | |
ProtoResultParser (ITestInvocationListener listener, IInvocationContext context, boolean reportInvocation, String prefixForFile) aktor. |
Metode publik | |
---|---|
void | completeModuleEvents () Jika diperlukan untuk memastikan pelaporan yang konsisten, selesaikan peristiwa dalam modul. |
String | getModuleInProgress () Mengembalikan id modul yang sedang berlangsung. |
boolean | hasInvocationFailed () Mengembalikan apakah pemanggilan gagal telah dilaporkan atau belum. |
boolean | invocationEndedReached () Mengembalikan apakah penguraian mencapai pemanggilan berakhir atau tidak. |
void | processFileProto (File protoFile) Dalam hal penguraian file proto secara langsung, tangani penguraian langsung file tersebut secara berurutan. |
void | processFinalizedProto (TestRecordProto.TestRecord finalProto) Fungsi entri utama yang mengambil proto yang telah diselesaikan dan memutar ulang hasilnya. |
ProtoResultParser.TestLevel | processNewProto (TestRecordProto.TestRecord currentProto) Fungsi entri utama di mana setiap proto disajikan untuk diurai ke dalam acara Tradefed. |
void | setQuiet (boolean quiet) Mengatur apakah akan mencetak atau tidak ketika acara diterima. |
void | setReportLogs (boolean reportLogs) Menyetel apakah kita harus melaporkan log atau tidak. |
Konstruktor publik
ProtoResultParser
public ProtoResultParser (ITestInvocationListener listener, IInvocationContext context, boolean reportInvocation)
aktor.
Parameter | |
---|---|
listener | ITestInvocationListener |
context | IInvocationContext |
reportInvocation | boolean |
ProtoResultParser
public ProtoResultParser (ITestInvocationListener listener, IInvocationContext context, boolean reportInvocation, String prefixForFile)
aktor.
Parameter | |
---|---|
listener | ITestInvocationListener |
context | IInvocationContext |
reportInvocation | boolean |
prefixForFile | String |
Metode publik
lengkapModuleEvents
public void completeModuleEvents ()
Jika diperlukan untuk memastikan pelaporan yang konsisten, selesaikan peristiwa dalam modul.
dapatkanModuleInProgress
public String getModuleInProgress ()
Mengembalikan id modul yang sedang berlangsung. Mengembalikan null jika tidak ada yang sedang berlangsung.
Kembali | |
---|---|
String |
hasInvocationFailed
public boolean hasInvocationFailed ()
Mengembalikan apakah pemanggilan gagal telah dilaporkan atau belum.
Kembali | |
---|---|
boolean |
doaEndedReached
public boolean invocationEndedReached ()
Mengembalikan apakah penguraian mencapai pemanggilan berakhir atau tidak.
Kembali | |
---|---|
boolean |
prosesFileProto
public void processFileProto (File protoFile)
Dalam hal penguraian file proto secara langsung, tangani penguraian langsung file tersebut secara berurutan. Terkait dengan FileProtoResultReporter
saat melaporkan urutan file.
Parameter | |
---|---|
protoFile | File : File proto yang akan diurai. |
prosesSelesaiProto
public void processFinalizedProto (TestRecordProto.TestRecord finalProto)
Fungsi entri utama yang mengambil proto yang telah diselesaikan dan memutar ulang hasilnya.
Parameter | |
---|---|
finalProto | TestRecordProto.TestRecord : TestRecord terakhir yang akan diuraikan. |
prosesNewProto
public ProtoResultParser.TestLevel processNewProto (TestRecordProto.TestRecord currentProto)
Fungsi entri utama di mana setiap proto disajikan untuk diurai ke dalam acara Tradefed.
Parameter | |
---|---|
currentProto | TestRecordProto.TestRecord : TestRecord saat ini yang akan diuraikan. |
Kembali | |
---|---|
ProtoResultParser.TestLevel | Benar jika proto yang diproses adalah modul. |
set Tenang
public void setQuiet (boolean quiet)
Mengatur apakah akan mencetak atau tidak ketika acara diterima.
Parameter | |
---|---|
quiet | boolean |
setReportLogs
public void setReportLogs (boolean reportLogs)
Menyetel apakah kita harus melaporkan log atau tidak.
Parameter | |
---|---|
reportLogs | boolean |
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2023-12-01 UTC.