ProtoResultParser
public
class
ProtoResultParser
extends Object
java.lang.Object | |
↳ | com.android.tradefed.result.proto.ProtoResultParser |
Parser for the Tradefed results proto format.
Summary
Nested classes | |
---|---|
enum |
ProtoResultParser.TestLevel
Enumeration representing the current level of the proto being processed. |
Public constructors | |
---|---|
ProtoResultParser(ITestInvocationListener listener, IInvocationContext context, boolean reportInvocation)
Ctor. |
|
ProtoResultParser(ITestInvocationListener listener, IInvocationContext context, boolean reportInvocation, String prefixForFile)
Ctor. |
Public methods | |
---|---|
void
|
completeModuleEvents()
If needed to ensure consistent reporting, complete the events of the module. |
String
|
getModuleInProgress()
Returns the id of the module in progress. |
boolean
|
hasInvocationFailed()
Returns whether or not the invocation failed has been reported. |
boolean
|
invocationEndedReached()
Returns whether or not the parsing reached an invocation ended. |
void
|
processFileProto(File protoFile)
In case of parsing proto files directly, handle direct parsing of them as a sequence. |
void
|
processFinalizedProto(TestRecordProto.TestRecord finalProto)
Main entry function that takes the finalized completed proto and replay its results. |
ProtoResultParser.TestLevel
|
processNewProto(TestRecordProto.TestRecord currentProto)
Main entry function where each proto is presented to get parsed into Tradefed events. |
void
|
setQuiet(boolean quiet)
Sets whether or not to print when events are received. |
void
|
setReportLogs(boolean reportLogs)
Sets whether or not we should report the logs. |
Public constructors
ProtoResultParser
public ProtoResultParser (ITestInvocationListener listener, IInvocationContext context, boolean reportInvocation)
Ctor.
Parameters | |
---|---|
listener |
ITestInvocationListener |
context |
IInvocationContext |
reportInvocation |
boolean |
ProtoResultParser
public ProtoResultParser (ITestInvocationListener listener, IInvocationContext context, boolean reportInvocation, String prefixForFile)
Ctor.
Parameters | |
---|---|
listener |
ITestInvocationListener |
context |
IInvocationContext |
reportInvocation |
boolean |
prefixForFile |
String |
Public methods
completeModuleEvents
public void completeModuleEvents ()
If needed to ensure consistent reporting, complete the events of the module.
getModuleInProgress
public String getModuleInProgress ()
Returns the id of the module in progress. Returns null if none in progress.
Returns | |
---|---|
String |
hasInvocationFailed
public boolean hasInvocationFailed ()
Returns whether or not the invocation failed has been reported.
Returns | |
---|---|
boolean |
invocationEndedReached
public boolean invocationEndedReached ()
Returns whether or not the parsing reached an invocation ended.
Returns | |
---|---|
boolean |
processFileProto
public void processFileProto (File protoFile)
In case of parsing proto files directly, handle direct parsing of them as a sequence.
Associated with FileProtoResultReporter
when reporting a sequence of files.
Parameters | |
---|---|
protoFile |
File : The proto file to be parsed. |
processFinalizedProto
public void processFinalizedProto (TestRecordProto.TestRecord finalProto)
Main entry function that takes the finalized completed proto and replay its results.
Parameters | |
---|---|
finalProto |
TestRecordProto.TestRecord : The final TestRecord to be parsed.
|
processNewProto
public ProtoResultParser.TestLevel processNewProto (TestRecordProto.TestRecord currentProto)
Main entry function where each proto is presented to get parsed into Tradefed events.
Parameters | |
---|---|
currentProto |
TestRecordProto.TestRecord : The current TestRecord to be parsed. |
Returns | |
---|---|
ProtoResultParser.TestLevel |
True if the proto processed was a module. |
setQuiet
public void setQuiet (boolean quiet)
Sets whether or not to print when events are received.
Parameters | |
---|---|
quiet |
boolean |
setReportLogs
public void setReportLogs (boolean reportLogs)
Sets whether or not we should report the logs.
Parameters | |
---|---|
reportLogs |
boolean |
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 2022-08-03 UTC.