Enable coverage universally if COVERAGE_PATHS includes "*"
http://b/116873221
This will be used in a target in the build server to build all native
code with coverage.
Test: 'm NATIVE_COVERAGE=true COVERAGE_PATHS=* nothing' works as
expected.
Change-Id: I55d644ed9212c4ab0f1e4a00aac3a467fcf2a463
diff --git a/android/config.go b/android/config.go
index 24be10a..92879de 100644
--- a/android/config.go
+++ b/android/config.go
@@ -862,7 +862,7 @@
func (c *deviceConfig) CoverageEnabledForPath(path string) bool {
coverage := false
if c.config.productVariables.CoveragePaths != nil {
- if PrefixInList(path, c.config.productVariables.CoveragePaths) {
+ if InList("*", c.config.productVariables.CoveragePaths) || PrefixInList(path, c.config.productVariables.CoveragePaths) {
coverage = true
}
}