diff --git a/infra/bots/recipe_modules/flavor/android.py b/infra/bots/recipe_modules/flavor/android.py index 62a49c0b1f..3618517f82 100644 --- a/infra/bots/recipe_modules/flavor/android.py +++ b/infra/bots/recipe_modules/flavor/android.py @@ -88,7 +88,19 @@ class AndroidFlavor(default.DefaultFlavor): def wait_for_device(attempt): self.m.run(self.m.step, - 'kill adb server after failure of \'%s\' (attempt %d)' % ( + 'adb reconnect after failure of \'%s\' (attempt %d)' % ( + title, attempt), + cmd=[self.ADB_BINARY, 'reconnect'], + infra_step=True, timeout=30, abort_on_failure=False, + fail_build_on_failure=False) + self.m.run(self.m.step, + 'wait for device after failure of \'%s\' (attempt %d)' % ( + title, attempt), + cmd=[self.ADB_BINARY, 'wait-for-device'], infra_step=True, + timeout=180, abort_on_failure=False, + fail_build_on_failure=False) + self.m.run(self.m.step, + 'adb reconnect device after failure of \'%s\' (attempt %d)' % ( title, attempt), cmd=[self.ADB_BINARY, 'reconnect', 'device'], infra_step=True, timeout=30, abort_on_failure=False, 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 974e0282cf..8abf46eb1e 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 @@ -898,8 +898,7 @@ { "cmd": [ "/opt/infra-android/tools/adb", - "reconnect", - "device" + "reconnect" ], "cwd": "[START_DIR]/skia", "env": { @@ -908,7 +907,7 @@ "PATH": ":RECIPE_REPO[depot_tools]" }, "infra_step": true, - "name": "kill adb server after failure of 'read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION' (attempt 1)", + "name": "adb reconnect after failure of 'read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION' (attempt 1)", "timeout": 30 }, { @@ -926,6 +925,37 @@ "name": "wait for device after failure of 'read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION' (attempt 1)", "timeout": 180 }, + { + "cmd": [ + "/opt/infra-android/tools/adb", + "reconnect", + "device" + ], + "cwd": "[START_DIR]/skia", + "env": { + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_REPO[depot_tools]" + }, + "infra_step": true, + "name": "adb reconnect device after failure of 'read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION' (attempt 1)", + "timeout": 30 + }, + { + "cmd": [ + "/opt/infra-android/tools/adb", + "wait-for-device" + ], + "cwd": "[START_DIR]/skia", + "env": { + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_REPO[depot_tools]" + }, + "infra_step": true, + "name": "wait for device after failure of 'read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION' (attempt 1) (2)", + "timeout": 180 + }, { "cmd": [ "/opt/infra-android/tools/adb", diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/retry_adb_command.json b/infra/bots/recipe_modules/flavor/examples/full.expected/retry_adb_command.json index 7ab460bd4a..e9f15528e9 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/retry_adb_command.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/retry_adb_command.json @@ -202,8 +202,7 @@ { "cmd": [ "/opt/infra-android/tools/adb", - "reconnect", - "device" + "reconnect" ], "cwd": "[START_DIR]/skia", "env": { @@ -212,7 +211,7 @@ "PATH": ":RECIPE_REPO[depot_tools]" }, "infra_step": true, - "name": "kill adb server after failure of 'mkdir /sdcard/revenge_of_the_skiabot/resources' (attempt 1)", + "name": "adb reconnect after failure of 'mkdir /sdcard/revenge_of_the_skiabot/resources' (attempt 1)", "timeout": 30 }, { @@ -230,6 +229,37 @@ "name": "wait for device after failure of 'mkdir /sdcard/revenge_of_the_skiabot/resources' (attempt 1)", "timeout": 180 }, + { + "cmd": [ + "/opt/infra-android/tools/adb", + "reconnect", + "device" + ], + "cwd": "[START_DIR]/skia", + "env": { + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_REPO[depot_tools]" + }, + "infra_step": true, + "name": "adb reconnect device after failure of 'mkdir /sdcard/revenge_of_the_skiabot/resources' (attempt 1)", + "timeout": 30 + }, + { + "cmd": [ + "/opt/infra-android/tools/adb", + "wait-for-device" + ], + "cwd": "[START_DIR]/skia", + "env": { + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_REPO[depot_tools]" + }, + "infra_step": true, + "name": "wait for device after failure of 'mkdir /sdcard/revenge_of_the_skiabot/resources' (attempt 1) (2)", + "timeout": 180 + }, { "cmd": [ "/opt/infra-android/tools/adb", diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/retry_adb_command_retries_exhausted.json b/infra/bots/recipe_modules/flavor/examples/full.expected/retry_adb_command_retries_exhausted.json index 0caebbc292..593dce9971 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/retry_adb_command_retries_exhausted.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/retry_adb_command_retries_exhausted.json @@ -202,8 +202,7 @@ { "cmd": [ "/opt/infra-android/tools/adb", - "reconnect", - "device" + "reconnect" ], "cwd": "[START_DIR]/skia", "env": { @@ -212,7 +211,7 @@ "PATH": ":RECIPE_REPO[depot_tools]" }, "infra_step": true, - "name": "kill adb server after failure of 'mkdir /sdcard/revenge_of_the_skiabot/resources' (attempt 1)", + "name": "adb reconnect after failure of 'mkdir /sdcard/revenge_of_the_skiabot/resources' (attempt 1)", "timeout": 30 }, { @@ -230,6 +229,37 @@ "name": "wait for device after failure of 'mkdir /sdcard/revenge_of_the_skiabot/resources' (attempt 1)", "timeout": 180 }, + { + "cmd": [ + "/opt/infra-android/tools/adb", + "reconnect", + "device" + ], + "cwd": "[START_DIR]/skia", + "env": { + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_REPO[depot_tools]" + }, + "infra_step": true, + "name": "adb reconnect device after failure of 'mkdir /sdcard/revenge_of_the_skiabot/resources' (attempt 1)", + "timeout": 30 + }, + { + "cmd": [ + "/opt/infra-android/tools/adb", + "wait-for-device" + ], + "cwd": "[START_DIR]/skia", + "env": { + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_REPO[depot_tools]" + }, + "infra_step": true, + "name": "wait for device after failure of 'mkdir /sdcard/revenge_of_the_skiabot/resources' (attempt 1) (2)", + "timeout": 180 + }, { "cmd": [ "/opt/infra-android/tools/adb", @@ -253,8 +283,7 @@ { "cmd": [ "/opt/infra-android/tools/adb", - "reconnect", - "device" + "reconnect" ], "cwd": "[START_DIR]/skia", "env": { @@ -263,7 +292,7 @@ "PATH": ":RECIPE_REPO[depot_tools]" }, "infra_step": true, - "name": "kill adb server after failure of 'mkdir /sdcard/revenge_of_the_skiabot/resources' (attempt 2)", + "name": "adb reconnect after failure of 'mkdir /sdcard/revenge_of_the_skiabot/resources' (attempt 2)", "timeout": 30 }, { @@ -281,6 +310,37 @@ "name": "wait for device after failure of 'mkdir /sdcard/revenge_of_the_skiabot/resources' (attempt 2)", "timeout": 180 }, + { + "cmd": [ + "/opt/infra-android/tools/adb", + "reconnect", + "device" + ], + "cwd": "[START_DIR]/skia", + "env": { + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_REPO[depot_tools]" + }, + "infra_step": true, + "name": "adb reconnect device after failure of 'mkdir /sdcard/revenge_of_the_skiabot/resources' (attempt 2)", + "timeout": 30 + }, + { + "cmd": [ + "/opt/infra-android/tools/adb", + "wait-for-device" + ], + "cwd": "[START_DIR]/skia", + "env": { + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_REPO[depot_tools]" + }, + "infra_step": true, + "name": "wait for device after failure of 'mkdir /sdcard/revenge_of_the_skiabot/resources' (attempt 2) (2)", + "timeout": 180 + }, { "cmd": [ "/opt/infra-android/tools/adb",