aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipe_modules/flavor/examples/full.expected/failed_read_version.json
diff options
context:
space:
mode:
authorGravatar Ben Wagner <benjaminwagner@google.com>2017-09-08 14:06:38 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-11 14:09:20 +0000
commitcf9365a0bc94e2550350dd652a8f2fd2ba80a7f8 (patch)
tree195b10ea5c22486dd3bc6c326df92abde74241ee /infra/bots/recipe_modules/flavor/examples/full.expected/failed_read_version.json
parent8b1360dcfab9ae748361268284068049cd3796a7 (diff)
Retry adb commands on flaky devices.
No-Try: true Change-Id: I3519131cf064d0a9676abd0fb9d7e946646ce27f Reviewed-on: https://skia-review.googlesource.com/43564 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Diffstat (limited to 'infra/bots/recipe_modules/flavor/examples/full.expected/failed_read_version.json')
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/failed_read_version.json82
1 files changed, 82 insertions, 0 deletions
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/failed_read_version.json b/infra/bots/recipe_modules/flavor/examples/full.expected/failed_read_version.json
index d62eeb8e3a..c8292117fc 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.expected/failed_read_version.json
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/failed_read_version.json
@@ -385,6 +385,88 @@
{
"cmd": [
"adb",
+ "kill-server"
+ ],
+ "cwd": "[START_DIR]/skia",
+ "env": {
+ "BUILDTYPE": "Debug",
+ "CHROME_HEADLESS": "1",
+ "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
+ "SKIA_OUT": "[START_DIR]/out"
+ },
+ "infra_step": true,
+ "name": "kill adb server after failure of 'read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION' (attempt 1)",
+ "timeout": 30
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "\nimport subprocess\nimport sys\nimport time\nkicks = 0\nwhile True:\n times = 0\n while times < 30:\n print 'Waiting for the device to be connected and ready.'\n try:\n times += 1\n output = subprocess.check_output(['adb', 'shell',\n 'getprop',\n 'sys.boot_completed'])\n if '1' in output:\n print 'Connected'\n sys.exit(0)\n except subprocess.CalledProcessError:\n # no device connected/authorized yet\n pass\n time.sleep(5)\n if kicks >= 3:\n break\n print 'Giving the device a \"kick\" by trying to reboot it.'\n kicks += 1\n print subprocess.check_output(['adb', 'reboot'])\nprint 'Timed out waiting for device'\nsys.exit(1)\n"
+ ],
+ "cwd": "[START_DIR]/skia",
+ "env": {
+ "BUILDTYPE": "Debug",
+ "CHROME_HEADLESS": "1",
+ "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
+ "SKIA_OUT": "[START_DIR]/out"
+ },
+ "infra_step": true,
+ "name": "wait for device after failure of 'read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION' (attempt 1)",
+ "timeout": 660,
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@python.inline@@@@",
+ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
+ "@@@STEP_LOG_LINE@python.inline@import sys@@@",
+ "@@@STEP_LOG_LINE@python.inline@import time@@@",
+ "@@@STEP_LOG_LINE@python.inline@kicks = 0@@@",
+ "@@@STEP_LOG_LINE@python.inline@while True:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ times = 0@@@",
+ "@@@STEP_LOG_LINE@python.inline@ while times < 30:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ print 'Waiting for the device to be connected and ready.'@@@",
+ "@@@STEP_LOG_LINE@python.inline@ try:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ times += 1@@@",
+ "@@@STEP_LOG_LINE@python.inline@ output = subprocess.check_output(['adb', 'shell',@@@",
+ "@@@STEP_LOG_LINE@python.inline@ 'getprop',@@@",
+ "@@@STEP_LOG_LINE@python.inline@ 'sys.boot_completed'])@@@",
+ "@@@STEP_LOG_LINE@python.inline@ if '1' in output:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ print 'Connected'@@@",
+ "@@@STEP_LOG_LINE@python.inline@ sys.exit(0)@@@",
+ "@@@STEP_LOG_LINE@python.inline@ except subprocess.CalledProcessError:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ # no device connected/authorized yet@@@",
+ "@@@STEP_LOG_LINE@python.inline@ pass@@@",
+ "@@@STEP_LOG_LINE@python.inline@ time.sleep(5)@@@",
+ "@@@STEP_LOG_LINE@python.inline@ if kicks >= 3:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ break@@@",
+ "@@@STEP_LOG_LINE@python.inline@ print 'Giving the device a \"kick\" by trying to reboot it.'@@@",
+ "@@@STEP_LOG_LINE@python.inline@ kicks += 1@@@",
+ "@@@STEP_LOG_LINE@python.inline@ print subprocess.check_output(['adb', 'reboot'])@@@",
+ "@@@STEP_LOG_LINE@python.inline@print 'Timed out waiting for device'@@@",
+ "@@@STEP_LOG_LINE@python.inline@sys.exit(1)@@@",
+ "@@@STEP_LOG_END@python.inline@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "adb",
+ "shell",
+ "cat",
+ "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
+ ],
+ "cwd": "[START_DIR]/skia",
+ "env": {
+ "BUILDTYPE": "Debug",
+ "CHROME_HEADLESS": "1",
+ "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
+ "SKIA_OUT": "[START_DIR]/out"
+ },
+ "infra_step": true,
+ "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION (attempt 2)",
+ "stdout": "/path/to/tmp/"
+ },
+ {
+ "cmd": [
+ "adb",
"shell",
"rm",
"-f",