Merge changes from topic "gcov-clang-migration" into rvc-dev

* changes:
  Make native_coverage clause work with ClangCoverage
  Introduce product variables to select Java code coverage paths in Soong.
  Rename native code coverage paths product variables in Soong.
This commit is contained in:
Oliver Nguyen
2020-07-06 21:07:54 +00:00
committed by Android (Google) Code Review
7 changed files with 63 additions and 19 deletions

View File

@@ -633,7 +633,9 @@ type jniLib struct {
}
func (j *Module) shouldInstrument(ctx android.BaseModuleContext) bool {
return j.properties.Instrument && ctx.Config().IsEnvTrue("EMMA_INSTRUMENT")
return j.properties.Instrument &&
ctx.Config().IsEnvTrue("EMMA_INSTRUMENT") &&
ctx.DeviceConfig().JavaCoverageEnabledForPath(ctx.ModuleDir())
}
func (j *Module) shouldInstrumentStatic(ctx android.BaseModuleContext) bool {