ProtoResultParser

public class ProtoResultParser
extends Object

java.lang.Object
   ↳ com.android.tradefed.result.proto.ProtoResultParser


Tradefed 結果 proto 格式的剖析器。

摘要

巢狀類別

enum ProtoResultParser.TestLevel

列舉代表目前正在處理的 Proto 層級。 

公用建構函式

ProtoResultParser(ITestInvocationListener listener, IInvocationContext context, boolean reportInvocation)

建構函式。

ProtoResultParser(ITestInvocationListener listener, IInvocationContext context, boolean reportInvocation, String prefixForFile)

建構函式。

公用方法

void completeModuleEvents()

如有需要,請完成單元中的事件,以便確保回報資料一致。

String getModuleInProgress()

傳回進行中的模組 ID。

boolean hasInvocationFailed()

傳回是否已回報叫用失敗。

boolean invocationEndedReached()

傳回剖析是否已達到叫用結束點。

void processFileProto(File protoFile)

如果要直接剖析 Proto 檔案,請將這些檔案的直接剖析作業視為序列。

void processFinalizedProto(TestRecordProto.TestRecord finalProto)

主入口函式,會取得已完成的最終原型,並重播其結果。

ProtoResultParser.TestLevel processNewProto(TestRecordProto.TestRecord currentProto)

主要進入函式,其中會顯示每個原型檔,以便剖析成 Tradefed 事件。

void setQuiet(boolean quiet)

設定是否要在接收事件時列印。

void setReportLogs(boolean reportLogs)

設定是否要回報記錄。

公用建構函式

ProtoResultParser

public ProtoResultParser (ITestInvocationListener listener, 
                IInvocationContext context, 
                boolean reportInvocation)

建構函式。

參數
listener ITestInvocationListener

context IInvocationContext

reportInvocation boolean

ProtoResultParser

public ProtoResultParser (ITestInvocationListener listener, 
                IInvocationContext context, 
                boolean reportInvocation, 
                String prefixForFile)

建構函式。

參數
listener ITestInvocationListener

context IInvocationContext

reportInvocation boolean

prefixForFile String

公用方法

completeModuleEvents

public void completeModuleEvents ()

如有需要,請完成模組的事件,以便確保回報資料一致。

getModuleInProgress

public String getModuleInProgress ()

傳回進行中的模組 ID。如果沒有正在進行的作業,則傳回空值。

傳回
String

hasInvocationFailed

public boolean hasInvocationFailed ()

傳回是否已回報叫用失敗。

傳回
boolean

invocationEndedReached

public boolean invocationEndedReached ()

傳回剖析是否已達到結束的叫用。

傳回
boolean

processFileProto

public void processFileProto (File protoFile)

如果要直接剖析 Proto 檔案,請將這些檔案直接剖析為序列。回報檔案序列時,與 FileProtoResultReporter 相關聯。

參數
protoFile File:要剖析的 proto 檔案。

processFinalizedProto

public void processFinalizedProto (TestRecordProto.TestRecord finalProto)

主進入函式,會取得已完成的最終原型,並重播其結果。

參數
finalProto TestRecordProto.TestRecord:要剖析的最終 TestRecord

processNewProto

public ProtoResultParser.TestLevel processNewProto (TestRecordProto.TestRecord currentProto)

主要進入函式,其中會顯示每個原型,以便剖析成 Tradefed 事件。

參數
currentProto TestRecordProto.TestRecord:要剖析的目前 TestRecord

傳回
ProtoResultParser.TestLevel 如果處理的 proto 是模組,則為 True。

setQuiet

public void setQuiet (boolean quiet)

設定是否要在接收事件時列印。

參數
quiet boolean

setReportLogs

public void setReportLogs (boolean reportLogs)

設定是否要回報記錄。

參數
reportLogs boolean