diff options
Diffstat (limited to 'android/config.go')
| -rw-r--r-- | android/config.go | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/android/config.go b/android/config.go index 3de1ef1fa..5dcc59bef 100644 --- a/android/config.go +++ b/android/config.go @@ -84,6 +84,8 @@ type config struct { inMake bool + captureBuild bool // true for tests, saves build parameters for each module + OncePer } @@ -171,7 +173,8 @@ func TestConfig(buildDir string) Config { DeviceName: stringPtr("test_device"), }, - buildDir: buildDir, + buildDir: buildDir, + captureBuild: true, } config.deviceConfig = &deviceConfig{ config: config, @@ -527,20 +530,21 @@ func (c *deviceConfig) NativeCoverageEnabled() bool { func (c *deviceConfig) CoverageEnabledForPath(path string) bool { coverage := false if c.config.ProductVariables.CoveragePaths != nil { - for _, prefix := range *c.config.ProductVariables.CoveragePaths { - if strings.HasPrefix(path, prefix) { - coverage = true - break - } + if prefixInList(path, *c.config.ProductVariables.CoveragePaths) { + coverage = true } } if coverage && c.config.ProductVariables.CoverageExcludePaths != nil { - for _, prefix := range *c.config.ProductVariables.CoverageExcludePaths { - if strings.HasPrefix(path, prefix) { - coverage = false - break - } + if prefixInList(path, *c.config.ProductVariables.CoverageExcludePaths) { + coverage = false } } return coverage } + +func (c *config) IntegerOverflowDisabledForPath(path string) bool { + if c.ProductVariables.IntegerOverflowExcludePaths == nil { + return false + } + return prefixInList(path, *c.ProductVariables.IntegerOverflowExcludePaths) +} |