Make merge_zips -stripFile use blueprint style globs

merge_zips -stripFile was only considering the name of the file and
ignoring the path.  Make it more useful by supporting blueprint style
globs.  The previous behavior can be recreated by prefixing with **/.

Bug: 111389216
Test: m checkbuild
Change-Id: I25760fe3f1f77704dd9da9d107d9a38a415d681f
diff --git a/cmd/merge_zips/merge_zips_test.go b/cmd/merge_zips/merge_zips_test.go
index 21a7e9a..f91111f 100644
--- a/cmd/merge_zips/merge_zips_test.go
+++ b/cmd/merge_zips/merge_zips_test.go
@@ -135,13 +135,33 @@
 			stripDirEntries: true,
 		},
 		{
+			name: "strip files",
+			in: [][]testZipEntry{
+				{a, bDir, bbDir, bbb, bc, bd, be},
+			},
+			out: []testZipEntry{a, bDir, bbDir, bbb, bc},
+
+			stripFiles: []string{"b/d", "b/e"},
+		},
+		{
+			// merge_zips used to treat -stripFile a as stripping any file named a, it now only strips a in the
+			// root of the zip.
 			name: "strip file name",
 			in: [][]testZipEntry{
 				{a, bDir, ba},
 			},
+			out: []testZipEntry{bDir, ba},
+
+			stripFiles: []string{"a"},
+		},
+		{
+			name: "strip files glob",
+			in: [][]testZipEntry{
+				{a, bDir, ba},
+			},
 			out: []testZipEntry{bDir},
 
-			stripFiles: []string{"a"},
+			stripFiles: []string{"**/a"},
 		},
 		{
 			name: "strip dirs",
@@ -153,6 +173,15 @@
 			stripDirs: []string{"b"},
 		},
 		{
+			name: "strip dirs glob",
+			in: [][]testZipEntry{
+				{a, bDir, bbDir, bbb, bc, bd, be},
+			},
+			out: []testZipEntry{a, bDir, bc, bd, be},
+
+			stripDirs: []string{"b/*"},
+		},
+		{
 			name: "zips to not strip",
 			in: [][]testZipEntry{
 				{a, bDir, bc},