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
This commit is contained in:
Pirama Arumuga Nainar
2019-03-01 14:43:39 -08:00
parent 6db4d4e613
commit 4e128282f2

View File

@@ -862,7 +862,7 @@ func (c *deviceConfig) NativeCoverageEnabled() bool {
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
}
}