Only uninstall if install failed.

This is a followup to https://skia-review.googlesource.com/c/skia/+/90343,
which causes task durations to increase due to copying over images, skps,
etc. on every run.

Bug: skia:7408
Change-Id: I42e829e287b7343e969159ac19c587a87ebe99e8
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/90942
Reviewed-by: Stephan Altmueller <stephana@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
This commit is contained in:
Ben Wagner 2018-01-04 11:29:15 -05:00 committed by Skia Commit-Bot
parent 6cc7bbc058
commit f990ebc272
7 changed files with 826 additions and 109 deletions

View File

@ -132,21 +132,6 @@
"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",
@ -162,21 +147,6 @@
"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

@ -0,0 +1,595 @@
[
{
"cmd": [
"python",
"-u",
"[START_DIR]/skia/bin/fetch-gn"
],
"cwd": "[START_DIR]/skia",
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "fetch-gn"
},
{
"cmd": [
"[START_DIR]/skia/bin/gn",
"gen",
"[START_DIR]/out/Release",
"--args=cc=\"clang\" cxx=\"clang++\" is_debug=false"
],
"cwd": "[START_DIR]/skia",
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"name": "gn gen"
},
{
"cmd": [
"ninja",
"-k",
"0",
"-C",
"[START_DIR]/out/Release"
],
"cwd": "[START_DIR]/skia",
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"name": "ninja"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_push_file",
"file.txt",
"file.txt"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "push_file file.txt"
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"rmtree",
"results_dir"
],
"infra_step": true,
"name": "rmtree results_dir"
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"ensure-directory",
"--mode",
"0777",
"results_dir"
],
"infra_step": true,
"name": "makedirs results_dir"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_rm",
"device_results_dir"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "rm device_results_dir"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_mkdir",
"device_results_dir"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "mkdir device_results_dir"
},
{
"cmd": [
"ios.py"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "setup_device"
},
{
"cmd": [
"ideviceinstaller",
"-i",
"[START_DIR]/out/Release/dm.app"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "install_dm",
"~followup_annotations": [
"step returned non-zero exit code: 1",
"@@@STEP_EXCEPTION@@@"
]
},
{
"cmd": [
"ideviceinstaller",
"-U",
"com.google.dm"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "uninstall_dm"
},
{
"cmd": [
"ideviceinstaller",
"-i",
"[START_DIR]/out/Release/dm.app"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "install_dm (attempt 2)"
},
{
"cmd": [
"ideviceinstaller",
"-i",
"[START_DIR]/out/Release/nanobench.app"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "install_nanobench"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_push_if_needed",
"[START_DIR]/skia/resources",
"resources"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "push_if_needed [START_DIR]/skia/resources"
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"copy",
"[START_DIR]/skia/infra/bots/assets/skp/VERSION",
"/path/to/tmp/"
],
"infra_step": true,
"name": "Get downloaded SKP VERSION"
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"copy",
"42",
"[START_DIR]/tmp/SKP_VERSION"
],
"infra_step": true,
"name": "write SKP_VERSION"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_cat_file",
"tmp/SKP_VERSION"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "cat_file tmp/SKP_VERSION",
"stdout": "/path/to/tmp/"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_rm",
"tmp/SKP_VERSION"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "rm tmp/SKP_VERSION"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_rm",
"skps"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "rm skps"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_mkdir",
"skps"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "mkdir skps"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_push_if_needed",
"[START_DIR]/skp",
"skps"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "push_if_needed [START_DIR]/skp"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_push_file",
"[START_DIR]/tmp/SKP_VERSION",
"tmp/SKP_VERSION"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "push_file [START_DIR]/tmp/SKP_VERSION"
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"copy",
"[START_DIR]/skia/infra/bots/assets/skimage/VERSION",
"/path/to/tmp/"
],
"infra_step": true,
"name": "Get downloaded skimage VERSION"
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"copy",
"42",
"[START_DIR]/tmp/SK_IMAGE_VERSION"
],
"infra_step": true,
"name": "write SK_IMAGE_VERSION"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_cat_file",
"tmp/SK_IMAGE_VERSION"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "cat_file tmp/SK_IMAGE_VERSION",
"stdout": "/path/to/tmp/"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_rm",
"tmp/SK_IMAGE_VERSION"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "rm tmp/SK_IMAGE_VERSION"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_rm",
"images"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "rm images"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_mkdir",
"images"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "mkdir images"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_push_if_needed",
"[START_DIR]/skimage",
"images"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "push_if_needed [START_DIR]/skimage"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_push_file",
"[START_DIR]/tmp/SK_IMAGE_VERSION",
"tmp/SK_IMAGE_VERSION"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "push_file [START_DIR]/tmp/SK_IMAGE_VERSION"
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"copy",
"[START_DIR]/skia/infra/bots/assets/svg/VERSION",
"/path/to/tmp/"
],
"infra_step": true,
"name": "Get downloaded SVG VERSION"
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"copy",
"42",
"[START_DIR]/tmp/SVG_VERSION"
],
"infra_step": true,
"name": "write SVG_VERSION"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_cat_file",
"tmp/SVG_VERSION"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "cat_file tmp/SVG_VERSION",
"stdout": "/path/to/tmp/"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_rm",
"tmp/SVG_VERSION"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "rm tmp/SVG_VERSION"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_rm",
"svgs"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "rm svgs"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_mkdir",
"svgs"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "mkdir svgs"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_push_if_needed",
"[START_DIR]/svg",
"svgs"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "push_if_needed [START_DIR]/svg"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_push_file",
"[START_DIR]/tmp/SVG_VERSION",
"tmp/SVG_VERSION"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "push_file [START_DIR]/tmp/SVG_VERSION"
},
{
"cmd": [
"idevice-app-runner",
"-s",
"com.google.dm",
"--args",
"--some-flag"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"name": "dm"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_pull_if_needed",
"dm",
"[CUSTOM_[SWARM_OUT_DIR]]/dm"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "pull_if_needed dm"
},
{
"name": "$result",
"recipe_result": null,
"status_code": 0
}
]

View File

@ -0,0 +1,194 @@
[
{
"cmd": [
"python",
"-u",
"[START_DIR]/skia/bin/fetch-gn"
],
"cwd": "[START_DIR]/skia",
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "fetch-gn"
},
{
"cmd": [
"[START_DIR]/skia/bin/gn",
"gen",
"[START_DIR]/out/Release",
"--args=cc=\"clang\" cxx=\"clang++\" is_debug=false"
],
"cwd": "[START_DIR]/skia",
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"name": "gn gen"
},
{
"cmd": [
"ninja",
"-k",
"0",
"-C",
"[START_DIR]/out/Release"
],
"cwd": "[START_DIR]/skia",
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"name": "ninja"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_push_file",
"file.txt",
"file.txt"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "push_file file.txt"
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"rmtree",
"results_dir"
],
"infra_step": true,
"name": "rmtree results_dir"
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"ensure-directory",
"--mode",
"0777",
"results_dir"
],
"infra_step": true,
"name": "makedirs results_dir"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_rm",
"device_results_dir"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "rm device_results_dir"
},
{
"cmd": [
"[START_DIR]/skia/platform_tools/ios/bin/ios_mkdir",
"device_results_dir"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "mkdir device_results_dir"
},
{
"cmd": [
"ios.py"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "setup_device"
},
{
"cmd": [
"ideviceinstaller",
"-i",
"[START_DIR]/out/Release/dm.app"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "install_dm",
"~followup_annotations": [
"step returned non-zero exit code: 1",
"@@@STEP_EXCEPTION@@@"
]
},
{
"cmd": [
"ideviceinstaller",
"-U",
"com.google.dm"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "uninstall_dm"
},
{
"cmd": [
"ideviceinstaller",
"-i",
"[START_DIR]/out/Release/dm.app"
],
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "install_dm (attempt 2)",
"~followup_annotations": [
"step returned non-zero exit code: 1",
"@@@STEP_EXCEPTION@@@"
]
},
{
"name": "$result",
"reason": "Infra Failure: Step('install_dm (attempt 2)') returned 1",
"recipe_result": null,
"status_code": 1
}
]

View File

@ -200,3 +200,26 @@ def GenTests(api):
swarm_out_dir='[SWARM_OUT_DIR]') +
api.step_data('Scale CPU 0 to 0.600000', retcode=1)
)
builder = 'Test-iOS-Clang-iPhone7-GPU-GT7600-arm64-Release-All'
fail_step_name = 'install_dm'
yield (
api.test('retry_ios_install') +
api.properties(buildername=builder,
repository='https://skia.googlesource.com/skia.git',
revision='abc123',
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]') +
api.step_data(fail_step_name, retcode=1)
)
yield (
api.test('retry_ios_install_retries_exhausted') +
api.properties(buildername=builder,
repository='https://skia.googlesource.com/skia.git',
revision='abc123',
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]') +
api.step_data(fail_step_name, retcode=1) +
api.step_data(fail_step_name + ' (attempt 2)', retcode=1)
)

View File

@ -20,17 +20,20 @@ class iOSFlavorUtils(gn_flavor.GNFlavorUtils):
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)
def uninstall_app(attempt):
# If app ID changes, upgrade will fail, so try uninstalling.
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)
num_attempts = 2
self.m.run.with_retry(self.m.step, 'install_' + app_name, num_attempts,
cmd=['ideviceinstaller', '-i', app_package],
between_attempts_fn=uninstall_app,
infra_step=True)
self.device_dirs = default_flavor.DeviceDirs(
dm_dir='dm',

View File

@ -14,23 +14,6 @@
"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",
@ -48,23 +31,6 @@
"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,23 +14,6 @@
"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",
@ -48,23 +31,6 @@
"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",