ClangCodeCoverageCollector

public final class ClangCodeCoverageCollector
extends BaseDeviceMetricCollector implements IConfigurationReceiver

java.lang.Object
   ↳ com.android.tradefed.device.metric.BaseDeviceMetricCollector
     ↳ com.android.tradefed.device.metric.ClangCodeCoverageCollector


A BaseDeviceMetricCollector that will pull Clang coverage measurements off of the device and log them as test artifacts.

Summary

Public constructors

ClangCodeCoverageCollector()

Public methods

ITestInvocationListener init(IInvocationContext context, ITestInvocationListener listener)

Initialization of the collector with the current context and where to forward results.

void onTestRunEnd(DeviceMetricData runData, currentRunMetrics)

Callback when a test run is ended.

void setConfiguration(IConfiguration configuration)

Injects the IConfiguration in use.

void setRunUtil(IRunUtil runUtil)

Public constructors

ClangCodeCoverageCollector

public ClangCodeCoverageCollector ()

Public methods

init

public ITestInvocationListener init (IInvocationContext context, 
                ITestInvocationListener listener)

Initialization of the collector with the current context and where to forward results. Will only be called once per instance, and the collector is expected to update its internal context and listener. Init will never be called during a test run always before.

Do not override unless you know what you are doing.

Parameters
context IInvocationContext: the IInvocationContext for the invocation in progress.

listener ITestInvocationListener: the ITestInvocationListener where to put results.

Returns
ITestInvocationListener the new listener wrapping the original one.

Throws
DeviceNotAvailableException

onTestRunEnd

public void onTestRunEnd (DeviceMetricData runData, 
                 currentRunMetrics)

Callback when a test run is ended. This should be the time for clean up.

Parameters
runData DeviceMetricData: the DeviceMetricData holding the data for the run. Will be the same object as during BaseDeviceMetricCollector.onTestRunStart(com.android.tradefed.device.metric.DeviceMetricData).

currentRunMetrics : the current map of metrics passed to ERROR(/#testRunEnded(long,Map)).

Throws
DeviceNotAvailableException

setConfiguration

public void setConfiguration (IConfiguration configuration)

Injects the IConfiguration in use.

Parameters
configuration IConfiguration

setRunUtil

public void setRunUtil (IRunUtil runUtil)

Parameters
runUtil IRunUtil