aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Ben Wagner <benjaminwagner@google.com>2018-01-04 11:29:15 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-04 17:16:23 +0000
commitf990ebc272c5342a0a83bf6aea3f6cd0cf2aa149 (patch)
tree765dc8867c46b4174f616d19c8b0eff71635429d
parent6cc7bbc0582acffe93bdb2ab9a215c443033fb86 (diff)
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>
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/Test-iOS-Clang-iPadPro-GPU-GT7800-arm64-Debug-All.json30
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/retry_ios_install.json595
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/retry_ios_install_retries_exhausted.json194
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.py23
-rw-r--r--infra/bots/recipe_modules/flavor/ios_flavor.py25
-rw-r--r--infra/bots/recipes/perf.expected/Perf-iOS-Clang-iPadPro-GPU-GT7800-arm64-Release-All.json34
-rw-r--r--infra/bots/recipes/test.expected/Test-iOS-Clang-iPadPro-GPU-GT7800-arm64-Release-All.json34
7 files changed, 826 insertions, 109 deletions
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 f8f5cdd604..f30c8c2da8 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
@@ -135,21 +135,6 @@
{
"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",
"-i",
"[START_DIR]/out/Debug/dm.app"
],
@@ -165,21 +150,6 @@
{
"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",
"-i",
"[START_DIR]/out/Debug/nanobench.app"
],
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/retry_ios_install.json b/infra/bots/recipe_modules/flavor/examples/full.expected/retry_ios_install.json
new file mode 100644
index 0000000000..4840840995
--- /dev/null
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/retry_ios_install.json
@@ -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
+ }
+] \ No newline at end of file
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/retry_ios_install_retries_exhausted.json b/infra/bots/recipe_modules/flavor/examples/full.expected/retry_ios_install_retries_exhausted.json
new file mode 100644
index 0000000000..d8e912d9bc
--- /dev/null
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/retry_ios_install_retries_exhausted.json
@@ -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
+ }
+] \ No newline at end of file
diff --git a/infra/bots/recipe_modules/flavor/examples/full.py b/infra/bots/recipe_modules/flavor/examples/full.py
index 5f38a437a6..bed486f18f 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.py
+++ b/infra/bots/recipe_modules/flavor/examples/full.py
@@ -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)
+ )
diff --git a/infra/bots/recipe_modules/flavor/ios_flavor.py b/infra/bots/recipe_modules/flavor/ios_flavor.py
index 29f147c3c8..fb4b8a8adb 100644
--- a/infra/bots/recipe_modules/flavor/ios_flavor.py
+++ b/infra/bots/recipe_modules/flavor/ios_flavor.py
@@ -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',
diff --git a/infra/bots/recipes/perf.expected/Perf-iOS-Clang-iPadPro-GPU-GT7800-arm64-Release-All.json b/infra/bots/recipes/perf.expected/Perf-iOS-Clang-iPadPro-GPU-GT7800-arm64-Release-All.json
index 5598557e49..bbd6699542 100644
--- a/infra/bots/recipes/perf.expected/Perf-iOS-Clang-iPadPro-GPU-GT7800-arm64-Release-All.json
+++ b/infra/bots/recipes/perf.expected/Perf-iOS-Clang-iPadPro-GPU-GT7800-arm64-Release-All.json
@@ -17,23 +17,6 @@
{
"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",
"-i",
"[START_DIR]/out/Release/dm.app"
],
@@ -51,23 +34,6 @@
{
"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",
"-i",
"[START_DIR]/out/Release/nanobench.app"
],
diff --git a/infra/bots/recipes/test.expected/Test-iOS-Clang-iPadPro-GPU-GT7800-arm64-Release-All.json b/infra/bots/recipes/test.expected/Test-iOS-Clang-iPadPro-GPU-GT7800-arm64-Release-All.json
index 1a97c9f7a1..9d0dde5547 100644
--- a/infra/bots/recipes/test.expected/Test-iOS-Clang-iPadPro-GPU-GT7800-arm64-Release-All.json
+++ b/infra/bots/recipes/test.expected/Test-iOS-Clang-iPadPro-GPU-GT7800-arm64-Release-All.json
@@ -17,23 +17,6 @@
{
"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",
"-i",
"[START_DIR]/out/Release/dm.app"
],
@@ -51,23 +34,6 @@
{
"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",
"-i",
"[START_DIR]/out/Release/nanobench.app"
],