Bug 1533589: [win64-aarch64] Simplify logic about unpacking builds in update-verify; r=sfraser a=tomprince
authorTom Prince <mozilla@hocat.ca>
Fri, 05 Apr 2019 17:24:51 +0000
changeset 525981 02a85326761d0432d0550adab60ff6ebc858b603
parent 525980 1e5ffce08e373e30c219694a9f6c00011fbe6196
child 525982 1c729b2f5e3eb6f1942b26e13feb927a676d60ed
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfraser, tomprince
bugs1533589
milestone67.0
Bug 1533589: [win64-aarch64] Simplify logic about unpacking builds in update-verify; r=sfraser a=tomprince We always pass in the platform formated as an update platform. Since the only variation in formats is between major platforms, be liberal in parsing platforms, when selecting which unpack logic to use. This makes win64-aarch64 support fall out automatically. Differential Revision: https://phabricator.services.mozilla.com/D26201
tools/update-verify/release/common/unpack.sh
--- a/tools/update-verify/release/common/unpack.sh
+++ b/tools/update-verify/release/common/unpack.sh
@@ -15,17 +15,20 @@ unpack_build () {
     update_settings_string=$6
 
     if [ ! -f "$pkg_file" ]; then
       return 1
     fi 
     mkdir -p $dir_name
     pushd $dir_name > /dev/null
     case $unpack_platform in
-        mac|mac64|mac-ppc|Darwin_ppc-gcc|Darwin_Universal-gcc3|Darwin_x86_64-gcc3|Darwin_x86-gcc3-u-ppc-i386|Darwin_x86-gcc3-u-i386-x86_64|Darwin_x86_64-gcc3-u-i386-x86_64)
+        # $unpack_platform is either
+        # - a balrog platform name (from testing/mozharness/scripts/release/update-verify-config-creator.py)
+        # - a simple platform name (from tools/update-verify/release/updates/verify.sh)
+        mac|Darwin_*)
             os=`uname`
             # How we unpack a dmg differs depending on which platform we're on.
             if [[ "$os" == "Darwin" ]]
             then
                 cd ../
                 echo "installing $pkg_file"
                 ../common/unpack-diskimage.sh "$pkg_file" mnt $dir_name
             else
@@ -47,17 +50,17 @@ unpack_build () {
                 # them. It's important to copy (and not move), because when
                 # we diff the installer vs updated build afterwards, the
                 # installer version will have them in their original place.
                 cp "${appdir}/Contents/Resources/update-settings.ini" "${appdir}/update-settings.ini"
                 cp "${appdir}/Contents/Resources/precomplete" "${appdir}/precomplete"
             fi
             update_settings_file="${appdir}/update-settings.ini"
             ;;
-        win32|win64|WINNT_x86-msvc|WINNT_x86-msvc-x86|WINNT_x86-msvc-x64|WINNT_x86_64-msvc|WINNT_x86_64-msvc-x64)
+        win32|WINNT_*)
             7z x ../"$pkg_file" > /dev/null
             if [ -d localized ]
             then
               mkdir bin/
               cp -rp nonlocalized/* bin/
               cp -rp localized/*    bin/
               rm -rf nonlocalized
               rm -rf localized
@@ -75,29 +78,32 @@ unpack_build () {
               for file in *.xpi
               do
                 unzip -o $file > /dev/null
               done
               unzip -o ${locale}.xpi > /dev/null
             fi
             update_settings_file='bin/update-settings.ini'
             ;;
-        linux-i686|linux-x86_64|linux|linux64|Linux_x86-gcc|Linux_x86-gcc3|Linux_x86_64-gcc3)
+        linux|Linux_*)
             if `echo $pkg_file | grep -q "tar.gz"`
             then
                 tar xfz ../"$pkg_file" > /dev/null
             elif `echo $pkg_file | grep -q "tar.bz2"`
             then
                 tar xfj ../"$pkg_file" > /dev/null
             else
                 echo "Unknown package type for file: $pkg_file"
                 exit 1
             fi
             update_settings_file=`echo $product | tr '[A-Z]' '[a-z]'`'/update-settings.ini'
             ;;
+        *)
+            echo "Unknown platform to unpack: $unpack_platform"
+            exit 1
     esac
 
     if [ ! -z $unpack_jars ]; then
         for f in `find . -name '*.jar' -o -name '*.ja'`; do
             unzip -o "$f" -d "$f.dir" > /dev/null
         done
     fi