From 9d773841c9bb1b263c722eddf3c609d0df90a252 Mon Sep 17 00:00:00 2001 From: Maxim Pleshivenkov Date: Wed, 30 Jun 2021 10:31:46 -0400 Subject: [PATCH] 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 --- java/jacoco.go | 2 +- java/jacoco_test.go | 2 +- 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",