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 428473 e2c2511391907e9f1783a96f4234d2e025e76e75
parent 428472 ee77d1455a036db2e556a352146211e23e9a54cb
child 428474 b793e27d6abff13848404162bb6eb59b9357f8f4
push id97
push userfmarier@mozilla.com
push dateSat, 14 Oct 2017 01:12:59 +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.