Bug 1385461 - Fix upgrade script to avoid excluding bytestream files. draft
authorFrancois Marier <francois@mozilla.com>
Thu, 12 Oct 2017 17:27:32 -0700
changeset 683517 1bf0d6e1ce4ca7ac1b91612eb5a1edb6aeb3f0dd
parent 683516 f94476e3463e63096f5f91b13b7b49a46a2d860d
child 683518 bd27f439c2ad29d2d1a985b23520223c4c614f1e
push id85402
push userfmarier@mozilla.com
push dateThu, 19 Oct 2017 21:21:03 +0000
bugs1385461
milestone58.0a1
Bug 1385461 - Fix upgrade script to avoid excluding bytestream files. I had to fix the globbing pattern in the upgrade script which would otherwise exclude "bytestream.*" from the tree because its name contains the string "test". MozReview-Commit-ID: 1J48i0oxVz2
toolkit/components/protobuf/upgrade_protobuf.sh
--- a/toolkit/components/protobuf/upgrade_protobuf.sh
+++ b/toolkit/components/protobuf/upgrade_protobuf.sh
@@ -42,17 +42,23 @@ rm -rf src/google/*
 
 # Add all the new protobuf sources.
 cp -r $PROTOBUF_LIB_PATH/src/google/* src/google/
 
 # Remove compiler sources.
 rm -rf src/google/protobuf/compiler
 
 # Remove test files.
-find src/google -name '*test*' | xargs rm -rf
+find src/google -name '*_unittest*' | xargs rm -f
+find src/google -name '*unittest_*' | xargs rm -f
+find src/google -name 'unittest.*' | xargs rm -f
+find src/google -name '*_test*' | xargs rm -f
+find src/google -name '*test_*' | xargs rm -f
+find src/google -type d -name 'testdata' | xargs rm -rf
+find src/google -type d -name 'testing' | xargs rm -rf
 
 # Remove protobuf's build files.
 find src/google/ -name '.deps' | xargs rm -rf
 find src/google/ -name '.dirstamp' | xargs rm -rf
 rm -rf src/google/protobuf/SEBS
 
 # Apply custom changes for building as part of mozilla-central.