summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Maxim Pleshivenkov <mpleshivenkov@google.com> 2021-06-30 10:31:46 -0400
committer Maxim Pleshivenkov <mpleshivenkov@google.com> 2021-06-30 14:29:49 -0400
commit9d773841c9bb1b263c722eddf3c609d0df90a252 (patch)
tree9d768b06424912f1b1fce330425d4a9497bf261d
parente19e6196b9ae292bbb541674f1c9600b2c5b3cdc (diff)
Added quotes to protect wildcard
When generating zip archive with zip2zip wildcard mask is specified. Bash attempts to resolve wildcard **/*.class. If android build top directory containts subfolder(s) with .class, bash wildcard resolution succeeds. Bash passes list of files to zip2zip instead of actual wildcard. Created archive doesn't contain required files. Adding quotes to wildcard to prvent that. Bug: NA Test: manual - build with coverage enabled Change-Id: Iebdaa32693fe820f0f79588d61cb89660ea2b611
-rw-r--r--java/jacoco.go2
-rw-r--r--java/jacoco_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/java/jacoco.go b/java/jacoco.go
index 9162161d3..e11c2ce69 100644
--- a/java/jacoco.go
+++ b/java/jacoco.go
@@ -94,7 +94,7 @@ func jacocoFiltersToZipCommand(includes, excludes []string) string {
if len(includes) > 0 {
specs += strings.Join(includes, " ")
} else {
- specs += "**/*.class"
+ specs += "'**/*.class'"
}
return specs
}
diff --git a/java/jacoco_test.go b/java/jacoco_test.go
index 91f05535a..1882908ca 100644
--- a/java/jacoco_test.go
+++ b/java/jacoco_test.go
@@ -74,7 +74,7 @@ func TestJacocoFiltersToZipCommand(t *testing.T) {
{
name: "implicit wildcard",
includes: []string{},
- out: "**/*.class",
+ out: "'**/*.class'",
},
{
name: "only include",