In iOS recipe, uninstall before install.

Bug: skia:7408
Change-Id: Iea55fe9199db7fc841ed0ba4a2451a84cd57213f
Reviewed-on: https://skia-review.googlesource.com/90343
Reviewed-by: Stephan Altmueller <stephana@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
This commit is contained in:
Ben Wagner 2018-01-03 16:12:57 -05:00 committed by Skia Commit-Bot
parent 2c647bc49a
commit 5a59c26193
4 changed files with 109 additions and 3 deletions

View File

@ -132,6 +132,21 @@
"infra_step": true,
"name": "setup_device"
},
{
"cmd": [
"ideviceinstaller",
"-U",
"com.google.dm"
],
"env": {
"BUILDTYPE": "Debug",
"CHROME_HEADLESS": "1",
"PATH": "<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": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "uninstall_nanobench"
},
{
"cmd": [
"ideviceinstaller",

View File

@ -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,
'install_' + app_name,
cmd=['ideviceinstaller', '-i', app_package],
infra_step=True)
'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)
self.device_dirs = default_flavor.DeviceDirs(
dm_dir='dm',

View File

@ -14,6 +14,23 @@
"infra_step": true,
"name": "setup_device"
},
{
"cmd": [
"ideviceinstaller",
"-U",
"com.google.dm"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"IOS_BUNDLE_ID": "com.google.nanobench",
"IOS_MOUNT_POINT": "[START_DIR]/mnt_iosdevice",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "uninstall_dm"
},
{
"cmd": [
"ideviceinstaller",
@ -31,6 +48,23 @@
"infra_step": true,
"name": "install_dm"
},
{
"cmd": [
"ideviceinstaller",
"-U",
"com.google.nanobench"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"IOS_BUNDLE_ID": "com.google.nanobench",
"IOS_MOUNT_POINT": "[START_DIR]/mnt_iosdevice",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "uninstall_nanobench"
},
{
"cmd": [
"ideviceinstaller",

View File

@ -14,6 +14,23 @@
"infra_step": true,
"name": "setup_device"
},
{
"cmd": [
"ideviceinstaller",
"-U",
"com.google.dm"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"IOS_BUNDLE_ID": "com.google.dm",
"IOS_MOUNT_POINT": "[START_DIR]/mnt_iosdevice",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "uninstall_dm"
},
{
"cmd": [
"ideviceinstaller",
@ -31,6 +48,23 @@
"infra_step": true,
"name": "install_dm"
},
{
"cmd": [
"ideviceinstaller",
"-U",
"com.google.nanobench"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"IOS_BUNDLE_ID": "com.google.dm",
"IOS_MOUNT_POINT": "[START_DIR]/mnt_iosdevice",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "uninstall_nanobench"
},
{
"cmd": [
"ideviceinstaller",