Fix jacoco filters

Add space after -x argument for jacoco excludes.
Add .class to end of file name for jacoco includes.

Bug: 64836607
Test: jacoco_test.go
Change-Id: I4c1024755882c976f7326f7382c4f2e99a20233d
This commit is contained in:
Colin Cross
2017-12-19 13:59:44 -08:00
parent 7a3139e05d
commit d7deceb8fa
2 changed files with 14 additions and 1 deletions

View File

@@ -76,7 +76,7 @@ func (j *Module) jacocoModuleToZipCommand(ctx android.ModuleContext) string {
func jacocoFiltersToZipCommand(includes, excludes []string) string {
specs := ""
if len(excludes) > 0 {
specs += android.JoinWithPrefix(excludes, "-x") + " "
specs += android.JoinWithPrefix(excludes, "-x ") + " "
}
if len(includes) > 0 {
specs += strings.Join(includes, " ")
@@ -113,6 +113,8 @@ func jacocoFilterToSpec(filter string) (string, error) {
spec += "**/*.class"
} else if wildcard {
spec += "*.class"
} else {
spec += ".class"
}
return spec, nil