summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
authorOliver Nguyen <olivernguyen@google.com>2020-07-06 21:07:54 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-07-06 21:07:54 +0000
commitf6cd2a0cc6e3582b13c7f2aa1d37a00b985fa2e1 (patch)
tree3d63aa121f002ebc0ab9db9487954a4df5a26015 /java/java.go
parentf221e59429f5f68fc26e3653677ec61967af6ecd (diff)
parent72cabc625599fafc1f1f56c74938a8b11946d7ca (diff)
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.
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/java/java.go b/java/java.go
index 5632ff586..72c91a5e0 100644
--- a/java/java.go
+++ b/java/java.go
@@ -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 {