diff --git a/infra/bots/recipe_modules/flavor/gn_android_flavor.py b/infra/bots/recipe_modules/flavor/gn_android_flavor.py index 5b71823612..05a6da25ff 100644 --- a/infra/bots/recipe_modules/flavor/gn_android_flavor.py +++ b/infra/bots/recipe_modules/flavor/gn_android_flavor.py @@ -127,7 +127,8 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils): self._run('ninja', ninja, '-C', self.out_dir) def install(self): - if 'NexusPlayer' == self.m.vars.builder_cfg.get('model'): + reboot_always = ['NexusPlayer', 'PixelC'] + if self.m.vars.builder_cfg.get('model') in reboot_always: self._adb('rebooting device', 'reboot') self._wait_for_device() self._adb('mkdir ' + self.device_dirs.resource_dir, diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android.json index 35b20726c3..7f0afd635e 100644 --- a/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android.json +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android.json @@ -1,4 +1,53 @@ [ + { + "cmd": [ + "adb", + "reboot" + ], + "cwd": "[START_DIR]/skia", + "name": "rebooting device" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nimport time\n\nkicks = 0\nwhile True:\n\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', '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'])\n\nprint 'Timed out waiting for device'\nsys.exit(1)\n" + ], + "name": "wait for device", + "~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@@@@", + "@@@STEP_LOG_LINE@python.inline@kicks = 0@@@", + "@@@STEP_LOG_LINE@python.inline@while True:@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@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', '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@@@@", + "@@@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", diff --git a/infra/bots/recipe_modules/skpbench/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench.json b/infra/bots/recipe_modules/skpbench/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench.json index 6353575a6c..ec12084c64 100644 --- a/infra/bots/recipe_modules/skpbench/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench.json +++ b/infra/bots/recipe_modules/skpbench/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench.json @@ -21,6 +21,55 @@ "@@@STEP_LOG_END@python.inline@@@" ] }, + { + "cmd": [ + "adb", + "reboot" + ], + "cwd": "[START_DIR]/skia", + "name": "rebooting device" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nimport time\n\nkicks = 0\nwhile True:\n\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', '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'])\n\nprint 'Timed out waiting for device'\nsys.exit(1)\n" + ], + "name": "wait for device", + "~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@@@@", + "@@@STEP_LOG_LINE@python.inline@kicks = 0@@@", + "@@@STEP_LOG_LINE@python.inline@while True:@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@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', '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@@@@", + "@@@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", diff --git a/infra/bots/recipe_modules/skpbench/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Vulkan_Skpbench.json b/infra/bots/recipe_modules/skpbench/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Vulkan_Skpbench.json index 5a54a616b7..a51a7622dc 100644 --- a/infra/bots/recipe_modules/skpbench/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Vulkan_Skpbench.json +++ b/infra/bots/recipe_modules/skpbench/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Vulkan_Skpbench.json @@ -21,6 +21,55 @@ "@@@STEP_LOG_END@python.inline@@@" ] }, + { + "cmd": [ + "adb", + "reboot" + ], + "cwd": "[START_DIR]/skia", + "name": "rebooting device" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nimport time\n\nkicks = 0\nwhile True:\n\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', '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'])\n\nprint 'Timed out waiting for device'\nsys.exit(1)\n" + ], + "name": "wait for device", + "~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@@@@", + "@@@STEP_LOG_LINE@python.inline@kicks = 0@@@", + "@@@STEP_LOG_LINE@python.inline@while True:@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@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', '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@@@@", + "@@@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", diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android.json index e3bc75c648..9d7a35bc79 100644 --- a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android.json +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android.json @@ -1,4 +1,53 @@ [ + { + "cmd": [ + "adb", + "reboot" + ], + "cwd": "[START_DIR]/skia", + "name": "rebooting device" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nimport time\n\nkicks = 0\nwhile True:\n\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', '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'])\n\nprint 'Timed out waiting for device'\nsys.exit(1)\n" + ], + "name": "wait for device", + "~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@@@@", + "@@@STEP_LOG_LINE@python.inline@kicks = 0@@@", + "@@@STEP_LOG_LINE@python.inline@while True:@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@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', '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@@@@", + "@@@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", diff --git a/infra/bots/recipes/swarm_skpbench.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench.json b/infra/bots/recipes/swarm_skpbench.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench.json index 6353575a6c..ec12084c64 100644 --- a/infra/bots/recipes/swarm_skpbench.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench.json +++ b/infra/bots/recipes/swarm_skpbench.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench.json @@ -21,6 +21,55 @@ "@@@STEP_LOG_END@python.inline@@@" ] }, + { + "cmd": [ + "adb", + "reboot" + ], + "cwd": "[START_DIR]/skia", + "name": "rebooting device" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nimport time\n\nkicks = 0\nwhile True:\n\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', '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'])\n\nprint 'Timed out waiting for device'\nsys.exit(1)\n" + ], + "name": "wait for device", + "~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@@@@", + "@@@STEP_LOG_LINE@python.inline@kicks = 0@@@", + "@@@STEP_LOG_LINE@python.inline@while True:@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@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', '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@@@@", + "@@@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",