From 5a59c26193272825e814b50f7d9856c1b122531f Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Wed, 3 Jan 2018 16:12:57 -0500 Subject: In iOS recipe, uninstall before install. Bug: skia:7408 Change-Id: Iea55fe9199db7fc841ed0ba4a2451a84cd57213f Reviewed-on: https://skia-review.googlesource.com/90343 Reviewed-by: Stephan Altmueller Commit-Queue: Ben Wagner --- ...S-Clang-iPadPro-GPU-GT7800-arm64-Debug-All.json | 30 ++++++++++++++++++++++ infra/bots/recipe_modules/flavor/ios_flavor.py | 14 +++++++--- 2 files changed, 41 insertions(+), 3 deletions(-) (limited to 'infra/bots/recipe_modules') diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-iOS-Clang-iPadPro-GPU-GT7800-arm64-Debug-All.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-iOS-Clang-iPadPro-GPU-GT7800-arm64-Debug-All.json index f30c8c2da8..f8f5cdd604 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-iOS-Clang-iPadPro-GPU-GT7800-arm64-Debug-All.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-iOS-Clang-iPadPro-GPU-GT7800-arm64-Debug-All.json @@ -132,6 +132,21 @@ "infra_step": true, "name": "setup_device" }, + { + "cmd": [ + "ideviceinstaller", + "-U", + "com.google.dm" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" + }, + "infra_step": true, + "name": "uninstall_dm" + }, { "cmd": [ "ideviceinstaller", @@ -147,6 +162,21 @@ "infra_step": true, "name": "install_dm" }, + { + "cmd": [ + "ideviceinstaller", + "-U", + "com.google.nanobench" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" + }, + "infra_step": true, + "name": "uninstall_nanobench" + }, { "cmd": [ "ideviceinstaller", diff --git a/infra/bots/recipe_modules/flavor/ios_flavor.py b/infra/bots/recipe_modules/flavor/ios_flavor.py index 4cb91a53ef..29f147c3c8 100644 --- a/infra/bots/recipe_modules/flavor/ios_flavor.py +++ b/infra/bots/recipe_modules/flavor/ios_flavor.py @@ -19,10 +19,18 @@ class iOSFlavorUtils(gn_flavor.GNFlavorUtils): for app_name in ['dm', 'nanobench']: app_package = self.m.vars.skia_out.join(self.m.vars.configuration, '%s.app' % app_name) + + # If app ID changes, upgrade will fail, so uninstall first. + self.m.run(self.m.step, + 'uninstall_' + app_name, + cmd=['ideviceinstaller', '-U', 'com.google.%s' % app_name], + infra_step=True, + # App may not be installed. + abort_on_failure=False, fail_build_on_failure=False) self.m.run(self.m.step, - 'install_' + app_name, - cmd=['ideviceinstaller', '-i', app_package], - infra_step=True) + 'install_' + app_name, + cmd=['ideviceinstaller', '-i', app_package], + infra_step=True) self.device_dirs = default_flavor.DeviceDirs( dm_dir='dm', -- cgit v1.2.3