From d7425b14658a7db37db6401b29c095809bd9bcf2 Mon Sep 17 00:00:00 2001 From: Eric Boren Date: Tue, 10 Jul 2018 15:11:37 -0400 Subject: [PATCH] [infra] Determine Android device location based on bot ID Bug: skia: Change-Id: Ic68bbca59c2fd5d0ffd9bae29fe0f90e090e8b06 Reviewed-on: https://skia-review.googlesource.com/140342 Reviewed-by: Kevin Lubick Reviewed-by: Joe Gregorio --- infra/bots/recipe_modules/flavor/android.py | 3 +- ...-GPU-MaliT880-arm64-Debug-All-Android.json | 136 ++++++++------- ...GPU-Adreno418-arm64-Debug-All-Android.json | 14 ++ ...Chorizo-CPU-Cortex_A7-arm-Release-All.json | 14 ++ ...PU-Mali400MP2-arm-Release-All-Android.json | 138 ++++++++------- ...-GPU-MaliT880-arm64-Debug-All-Android.json | 136 ++++++++------- ...GPU-Adreno418-arm64-Debug-All-Android.json | 14 ++ ...eno418-arm64-Release-All-Android_ASAN.json | 14 ++ .../full.expected/cpu_scale_failed.json | 28 +-- .../full.expected/cpu_scale_failed_golo.json | 28 +-- .../full.expected/cpu_scale_failed_once.json | 146 +++++++++------- .../full.expected/failed_infra_step.json | 158 ++++++++--------- .../full.expected/failed_read_version.json | 156 +++++++++-------- .../full.expected/retry_adb_command.json | 156 +++++++++-------- .../retry_adb_command_retries_exhausted.json | 76 ++++---- ...5-GPU-Adreno330-arm-Debug-All-Android.json | 28 +-- ...rm64-Release-All-Android_NoGPUThreads.json | 160 ++++++++--------- ...owerVR-x86-Release-All-Android_Vulkan.json | 28 +-- ...g-Chorizo-CPU-Cortex_A7-arm-Debug-All.json | 28 +-- ...Chorizo-GPU-Cortex_A7-arm-Release-All.json | 28 +-- ...m64-Release-All-Android_CCPR_Skpbench.json | 28 +-- .../recipes/skpbench.expected/trybot.json | 28 +-- ...PU-Mali400MP2-arm-Release-All-Android.json | 28 +-- ...-GPU-MaliT760-arm64-Debug-All-Android.json | 28 +-- ...T880-arm64-Release-All-Android_Vulkan.json | 28 +-- ...-TegraX1-arm64-Debug-All-Android_CCPR.json | 28 +-- ...GPU-Adreno330-arm-Release-All-Android.json | 28 +-- ...-Adreno418-arm-Debug-All-Android_ASAN.json | 148 ++++++++-------- ...-arm64-Debug-All-Android_NoGPUThreads.json | 162 ++++++++--------- ...s7-CPU-Tegra3-arm-Release-All-Android.json | 28 +-- ...owerVR-x86-Release-All-Android_Vulkan.json | 28 +-- ...eno530-arm64-Debug-All-Android_Vulkan.json | 28 +-- ...Chorizo-CPU-Cortex_A7-arm-Release-All.json | 28 +-- ...Chorizo-GPU-Cortex_A7-arm-Release-All.json | 28 +-- .../test.expected/failed_get_hashes.json | 140 ++++++++------- .../recipes/test.expected/failed_pull.json | 164 ++++++++++-------- .../recipes/test.expected/failed_push.json | 44 ++--- .../recipes/test.expected/internal_bot_1.json | 138 ++++++++------- .../recipes/test.expected/internal_bot_2.json | 138 ++++++++------- 39 files changed, 1477 insertions(+), 1282 deletions(-) diff --git a/infra/bots/recipe_modules/flavor/android.py b/infra/bots/recipe_modules/flavor/android.py index 5ca32b8995..0d83c438e5 100644 --- a/infra/bots/recipe_modules/flavor/android.py +++ b/infra/bots/recipe_modules/flavor/android.py @@ -18,8 +18,7 @@ class AndroidFlavor(default.DefaultFlavor): self._ever_ran_adb = False self.ADB_BINARY = '/usr/bin/adb.1.0.35' self.ADB_PUB_KEY = '/home/chrome-bot/.android/adbkey' - self._golo_devices = ['Nexus5x'] - if self.m.vars.builder_cfg.get('model') in self._golo_devices: + if 'skia' not in self.m.vars.swarming_bot_id: self.ADB_BINARY = '/opt/infra-android/tools/adb' self.ADB_PUB_KEY = ('/home/chrome-bot/.android/' 'chrome_infrastructure_adbkey') diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Debug-All-Android.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Debug-All-Android.json index 1df372593f..8781a8e29f 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Debug-All-Android.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Debug-All-Android.json @@ -1,14 +1,28 @@ [ { "cmd": [ - "/usr/bin/adb.1.0.35", + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "/opt/infra-android/tools/adb", "push", "file.txt", "file.txt" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -45,7 +59,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -53,7 +67,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -62,7 +76,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -70,7 +84,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -79,7 +93,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -87,7 +101,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -98,7 +112,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skia/resources", "/sdcard/revenge_of_the_skiabot/resources" ], @@ -121,7 +135,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -157,14 +171,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -174,7 +188,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -182,7 +196,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -191,7 +205,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -199,7 +213,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -208,7 +222,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -216,7 +230,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -227,7 +241,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skp", "/sdcard/revenge_of_the_skiabot/skps" ], @@ -250,7 +264,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -258,14 +272,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SKP_VERSION", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -302,14 +316,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -319,7 +333,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -327,7 +341,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -336,7 +350,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -344,7 +358,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -353,7 +367,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -361,7 +375,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -372,7 +386,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skimage", "/sdcard/revenge_of_the_skiabot/images" ], @@ -395,7 +409,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -403,14 +417,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SK_IMAGE_VERSION", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -447,14 +461,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -464,7 +478,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -472,7 +486,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -481,7 +495,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -489,7 +503,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -498,7 +512,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -506,7 +520,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -517,7 +531,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/svg", "/sdcard/revenge_of_the_skiabot/svgs" ], @@ -540,7 +554,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -548,14 +562,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SVG_VERSION", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -564,14 +578,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/build/nanobench", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -594,14 +608,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/nanobench.sh", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -610,13 +624,13 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "logcat", "-c" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -627,7 +641,7 @@ "cmd": [ "python", "-u", - "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", "/data/local/tmp/", "nanobench.sh" ], @@ -638,9 +652,9 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@", "@@@STEP_LOG_LINE@python.inline@try:@@@", - "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@", "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", @@ -654,14 +668,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "pull", "/sdcard/revenge_of_the_skiabot/perf", "[TMP_BASE]/adb_pull_tmp_1" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -746,7 +760,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", "[START_DIR]/build" ], "env": { @@ -762,7 +776,7 @@ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@", "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", @@ -777,12 +791,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android.json index c6b5a4883a..962f8ceeb6 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android.json @@ -1,4 +1,18 @@ [ + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "/opt/infra-android/tools/adb", diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Chromecast-Clang-Chorizo-CPU-Cortex_A7-arm-Release-All.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Chromecast-Clang-Chorizo-CPU-Cortex_A7-arm-Release-All.json index a948fb8859..86919631bc 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Chromecast-Clang-Chorizo-CPU-Cortex_A7-arm-Release-All.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Chromecast-Clang-Chorizo-CPU-Cortex_A7-arm-Release-All.json @@ -1,4 +1,18 @@ [ + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "python", diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android.json index 0c578fe703..c5edd973b5 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android.json @@ -1,14 +1,28 @@ [ { "cmd": [ - "/usr/bin/adb.1.0.35", + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "/opt/infra-android/tools/adb", "push", "file.txt", "file.txt" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -45,7 +59,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -53,7 +67,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -62,7 +76,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -70,7 +84,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -79,7 +93,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -87,7 +101,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -98,7 +112,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skia/resources", "/sdcard/revenge_of_the_skiabot/resources" ], @@ -121,7 +135,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -157,14 +171,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -174,7 +188,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -182,7 +196,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -191,7 +205,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -199,7 +213,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -208,7 +222,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -216,7 +230,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -227,7 +241,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skp", "/sdcard/revenge_of_the_skiabot/skps" ], @@ -250,7 +264,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -258,14 +272,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SKP_VERSION", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -302,14 +316,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -319,7 +333,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -327,7 +341,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -336,7 +350,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -344,7 +358,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -353,7 +367,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -361,7 +375,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -372,7 +386,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skimage", "/sdcard/revenge_of_the_skiabot/images" ], @@ -395,7 +409,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -403,14 +417,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SK_IMAGE_VERSION", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -447,14 +461,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -464,7 +478,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -472,7 +486,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -481,7 +495,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -489,7 +503,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -498,7 +512,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -506,7 +520,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -517,7 +531,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/svg", "/sdcard/revenge_of_the_skiabot/svgs" ], @@ -540,7 +554,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -548,14 +562,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SVG_VERSION", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -567,7 +581,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "0", "hotplug" ], @@ -606,14 +620,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/build/dm", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -636,14 +650,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/dm.sh", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -652,13 +666,13 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "logcat", "-c" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -669,7 +683,7 @@ "cmd": [ "python", "-u", - "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", "/data/local/tmp/", "dm.sh" ], @@ -680,9 +694,9 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@", "@@@STEP_LOG_LINE@python.inline@try:@@@", - "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@", "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", @@ -696,14 +710,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "pull", "/sdcard/revenge_of_the_skiabot/dm_out", "[TMP_BASE]/adb_pull_tmp_1" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -788,7 +802,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", "[START_DIR]/build" ], "env": { @@ -804,7 +818,7 @@ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@", "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", @@ -819,12 +833,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Debug-All-Android.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Debug-All-Android.json index 4eeaaba070..a0bde750f5 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Debug-All-Android.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Debug-All-Android.json @@ -1,14 +1,28 @@ [ { "cmd": [ - "/usr/bin/adb.1.0.35", + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "/opt/infra-android/tools/adb", "push", "file.txt", "file.txt" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -45,7 +59,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -53,7 +67,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -62,7 +76,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -70,7 +84,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -79,7 +93,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -87,7 +101,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -98,7 +112,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skia/resources", "/sdcard/revenge_of_the_skiabot/resources" ], @@ -121,7 +135,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -157,14 +171,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -174,7 +188,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -182,7 +196,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -191,7 +205,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -199,7 +213,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -208,7 +222,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -216,7 +230,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -227,7 +241,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skp", "/sdcard/revenge_of_the_skiabot/skps" ], @@ -250,7 +264,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -258,14 +272,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SKP_VERSION", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -302,14 +316,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -319,7 +333,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -327,7 +341,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -336,7 +350,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -344,7 +358,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -353,7 +367,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -361,7 +375,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -372,7 +386,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skimage", "/sdcard/revenge_of_the_skiabot/images" ], @@ -395,7 +409,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -403,14 +417,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SK_IMAGE_VERSION", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -447,14 +461,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -464,7 +478,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -472,7 +486,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -481,7 +495,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -489,7 +503,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -498,7 +512,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -506,7 +520,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -517,7 +531,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/svg", "/sdcard/revenge_of_the_skiabot/svgs" ], @@ -540,7 +554,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -548,14 +562,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SVG_VERSION", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -564,14 +578,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/build/dm", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -594,14 +608,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/dm.sh", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -610,13 +624,13 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "logcat", "-c" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -627,7 +641,7 @@ "cmd": [ "python", "-u", - "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", "/data/local/tmp/", "dm.sh" ], @@ -638,9 +652,9 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@", "@@@STEP_LOG_LINE@python.inline@try:@@@", - "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@", "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", @@ -654,14 +668,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "pull", "/sdcard/revenge_of_the_skiabot/dm_out", "[TMP_BASE]/adb_pull_tmp_1" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -746,7 +760,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", "[START_DIR]/build" ], "env": { @@ -762,7 +776,7 @@ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@", "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", @@ -777,12 +791,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android.json index f41795197b..dec71833fa 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android.json @@ -1,4 +1,18 @@ [ + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "/opt/infra-android/tools/adb", diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android_ASAN.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android_ASAN.json index dcbb029f05..90651bfd3c 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android_ASAN.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android_ASAN.json @@ -1,4 +1,18 @@ [ + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "/opt/infra-android/tools/adb", diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed.json b/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed.json index a9285fdb4a..5d5cb63278 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed.json @@ -1,4 +1,18 @@ [ + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "/usr/bin/adb.1.0.35", @@ -865,20 +879,6 @@ "@@@STEP_LOG_END@python.inline@@@" ] }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed_golo.json b/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed_golo.json index 6376ef598a..02c8590c34 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed_golo.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed_golo.json @@ -1,4 +1,18 @@ [ + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "/opt/infra-android/tools/adb", @@ -865,20 +879,6 @@ "@@@STEP_LOG_END@python.inline@@@" ] }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed_once.json b/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed_once.json index 387713d1ee..2357335df4 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed_once.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed_once.json @@ -1,14 +1,28 @@ [ { "cmd": [ - "/usr/bin/adb.1.0.35", + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "/opt/infra-android/tools/adb", "push", "file.txt", "file.txt" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -45,7 +59,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -53,7 +67,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -62,7 +76,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -70,7 +84,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -79,7 +93,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -87,7 +101,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -98,7 +112,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skia/resources", "/sdcard/revenge_of_the_skiabot/resources" ], @@ -121,7 +135,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -157,14 +171,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -174,7 +188,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -182,7 +196,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -191,7 +205,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -199,7 +213,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -208,7 +222,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -216,7 +230,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -227,7 +241,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skp", "/sdcard/revenge_of_the_skiabot/skps" ], @@ -250,7 +264,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -258,14 +272,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SKP_VERSION", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -302,14 +316,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -319,7 +333,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -327,7 +341,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -336,7 +350,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -344,7 +358,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -353,7 +367,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -361,7 +375,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -372,7 +386,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skimage", "/sdcard/revenge_of_the_skiabot/images" ], @@ -395,7 +409,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -403,14 +417,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SK_IMAGE_VERSION", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -447,14 +461,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -464,7 +478,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -472,7 +486,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -481,7 +495,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -489,7 +503,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -498,7 +512,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -506,7 +520,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -517,7 +531,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/svg", "/sdcard/revenge_of_the_skiabot/svgs" ], @@ -540,7 +554,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -548,14 +562,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SVG_VERSION", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -567,7 +581,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "0", "userspace" ], @@ -609,7 +623,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "0.6", "0" ], @@ -685,7 +699,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "0.6", "0" ], @@ -759,7 +773,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "2", "userspace" ], @@ -801,7 +815,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "0.6", "2" ], @@ -872,14 +886,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/build/nanobench", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -902,14 +916,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/nanobench.sh", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -918,13 +932,13 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "logcat", "-c" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -935,7 +949,7 @@ "cmd": [ "python", "-u", - "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", "/data/local/tmp/", "nanobench.sh" ], @@ -946,9 +960,9 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@", "@@@STEP_LOG_LINE@python.inline@try:@@@", - "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@", "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", @@ -962,14 +976,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "pull", "/sdcard/revenge_of_the_skiabot/perf", "[TMP_BASE]/adb_pull_tmp_1" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -1054,7 +1068,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", "[START_DIR]/build" ], "env": { @@ -1070,7 +1084,7 @@ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@", "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", @@ -1085,12 +1099,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/failed_infra_step.json b/infra/bots/recipe_modules/flavor/examples/full.expected/failed_infra_step.json index 6424e6ea37..38a810ff3f 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/failed_infra_step.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/failed_infra_step.json @@ -1,14 +1,28 @@ [ { "cmd": [ - "/usr/bin/adb.1.0.35", + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "/opt/infra-android/tools/adb", "push", "file.txt", "file.txt" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -45,7 +59,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -53,7 +67,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -62,7 +76,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -70,7 +84,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -79,7 +93,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -87,7 +101,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -98,7 +112,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skia/resources", "/sdcard/revenge_of_the_skiabot/resources" ], @@ -121,7 +135,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -157,14 +171,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -174,7 +188,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -182,7 +196,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -191,7 +205,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -199,7 +213,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -208,7 +222,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -216,7 +230,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -227,7 +241,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skp", "/sdcard/revenge_of_the_skiabot/skps" ], @@ -250,7 +264,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -258,14 +272,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SKP_VERSION", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -302,14 +316,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -319,7 +333,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -327,7 +341,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -336,7 +350,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -344,7 +358,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -353,7 +367,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -361,7 +375,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -372,7 +386,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skimage", "/sdcard/revenge_of_the_skiabot/images" ], @@ -395,7 +409,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -403,14 +417,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SK_IMAGE_VERSION", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -447,14 +461,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -464,7 +478,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -472,7 +486,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -481,7 +495,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -489,7 +503,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -498,7 +512,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -506,7 +520,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -517,7 +531,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/svg", "/sdcard/revenge_of_the_skiabot/svgs" ], @@ -540,7 +554,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -548,14 +562,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SVG_VERSION", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -567,7 +581,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "0", "userspace" ], @@ -609,7 +623,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "0.6", "0" ], @@ -683,7 +697,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "2", "userspace" ], @@ -725,7 +739,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "0.6", "2" ], @@ -796,14 +810,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/build/nanobench", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -826,14 +840,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/nanobench.sh", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -842,13 +856,13 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "logcat", "-c" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -859,7 +873,7 @@ "cmd": [ "python", "-u", - "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", "/data/local/tmp/", "nanobench.sh" ], @@ -870,9 +884,9 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@", "@@@STEP_LOG_LINE@python.inline@try:@@@", - "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@", "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", @@ -886,14 +900,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "pull", "/sdcard/revenge_of_the_skiabot/perf", "[TMP_BASE]/adb_pull_tmp_1" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -978,7 +992,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", "[START_DIR]/build" ], "env": { @@ -995,7 +1009,7 @@ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@", "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", @@ -1009,20 +1023,6 @@ "@@@STEP_EXCEPTION@@@" ] }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", @@ -1039,12 +1039,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, 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 7630a35f98..6639601c10 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 @@ -1,14 +1,28 @@ [ { "cmd": [ - "/usr/bin/adb.1.0.35", + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "/opt/infra-android/tools/adb", "push", "file.txt", "file.txt" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -45,7 +59,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -53,7 +67,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -62,7 +76,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -70,7 +84,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -79,7 +93,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -87,7 +101,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -98,7 +112,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skia/resources", "/sdcard/revenge_of_the_skiabot/resources" ], @@ -121,7 +135,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -157,14 +171,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -174,7 +188,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -182,7 +196,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -191,7 +205,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -199,7 +213,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -208,7 +222,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -216,7 +230,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -227,7 +241,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skp", "/sdcard/revenge_of_the_skiabot/skps" ], @@ -250,7 +264,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -258,14 +272,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SKP_VERSION", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -302,14 +316,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -323,12 +337,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -338,12 +352,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "wait-for-device" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -353,14 +367,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -370,7 +384,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -378,7 +392,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -387,7 +401,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -395,7 +409,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -404,7 +418,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -412,7 +426,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -423,7 +437,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skimage", "/sdcard/revenge_of_the_skiabot/images" ], @@ -446,7 +460,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -454,14 +468,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SK_IMAGE_VERSION", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -498,14 +512,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -515,7 +529,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -523,7 +537,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -532,7 +546,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -540,7 +554,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -549,7 +563,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -557,7 +571,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -568,7 +582,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/svg", "/sdcard/revenge_of_the_skiabot/svgs" ], @@ -591,7 +605,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -599,14 +613,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SVG_VERSION", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -618,7 +632,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "0", "userspace" ], @@ -660,7 +674,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "0.6", "0" ], @@ -734,7 +748,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "2", "userspace" ], @@ -776,7 +790,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "0.6", "2" ], @@ -847,14 +861,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/build/nanobench", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -877,14 +891,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/nanobench.sh", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -893,13 +907,13 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "logcat", "-c" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -910,7 +924,7 @@ "cmd": [ "python", "-u", - "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", "/data/local/tmp/", "nanobench.sh" ], @@ -921,9 +935,9 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@", "@@@STEP_LOG_LINE@python.inline@try:@@@", - "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@", "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", @@ -937,14 +951,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "pull", "/sdcard/revenge_of_the_skiabot/perf", "[TMP_BASE]/adb_pull_tmp_1" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -1029,7 +1043,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", "[START_DIR]/build" ], "env": { @@ -1045,7 +1059,7 @@ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@", "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", @@ -1060,12 +1074,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, 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 6a2d3ec16c..38493bbc20 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 @@ -1,14 +1,28 @@ [ { "cmd": [ - "/usr/bin/adb.1.0.35", + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "/opt/infra-android/tools/adb", "push", "file.txt", "file.txt" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -45,7 +59,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -53,7 +67,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -62,7 +76,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -70,7 +84,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -79,7 +93,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -87,7 +101,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -100,12 +114,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -115,12 +129,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "wait-for-device" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -130,7 +144,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -138,7 +152,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -149,7 +163,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skia/resources", "/sdcard/revenge_of_the_skiabot/resources" ], @@ -172,7 +186,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -208,14 +222,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -225,7 +239,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -233,7 +247,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -242,7 +256,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -250,7 +264,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -259,7 +273,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -267,7 +281,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -278,7 +292,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skp", "/sdcard/revenge_of_the_skiabot/skps" ], @@ -301,7 +315,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -309,14 +323,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SKP_VERSION", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -353,14 +367,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -370,7 +384,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -378,7 +392,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -387,7 +401,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -395,7 +409,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -404,7 +418,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -412,7 +426,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -423,7 +437,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skimage", "/sdcard/revenge_of_the_skiabot/images" ], @@ -446,7 +460,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -454,14 +468,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SK_IMAGE_VERSION", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -498,14 +512,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -515,7 +529,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -523,7 +537,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -532,7 +546,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -540,7 +554,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -549,7 +563,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -557,7 +571,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -568,7 +582,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/svg", "/sdcard/revenge_of_the_skiabot/svgs" ], @@ -591,7 +605,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -599,14 +613,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SVG_VERSION", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -618,7 +632,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "0", "userspace" ], @@ -660,7 +674,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "0.6", "0" ], @@ -734,7 +748,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "2", "userspace" ], @@ -776,7 +790,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "0.6", "2" ], @@ -847,14 +861,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/build/nanobench", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -877,14 +891,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/nanobench.sh", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -893,13 +907,13 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "logcat", "-c" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -910,7 +924,7 @@ "cmd": [ "python", "-u", - "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", "/data/local/tmp/", "nanobench.sh" ], @@ -921,9 +935,9 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@", "@@@STEP_LOG_LINE@python.inline@try:@@@", - "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@", "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", @@ -937,14 +951,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "pull", "/sdcard/revenge_of_the_skiabot/perf", "[TMP_BASE]/adb_pull_tmp_1" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -1029,7 +1043,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", "[START_DIR]/build" ], "env": { @@ -1045,7 +1059,7 @@ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@", "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", @@ -1060,12 +1074,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, 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 3f2e375954..ad58cb2bcb 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 @@ -1,14 +1,28 @@ [ { "cmd": [ - "/usr/bin/adb.1.0.35", + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "/opt/infra-android/tools/adb", "push", "file.txt", "file.txt" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -45,7 +59,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -53,7 +67,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -62,7 +76,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -70,7 +84,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -79,7 +93,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -87,7 +101,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -100,12 +114,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -115,12 +129,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "wait-for-device" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -130,7 +144,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -138,7 +152,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -151,12 +165,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -166,12 +180,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "wait-for-device" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -181,7 +195,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -189,7 +203,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -204,7 +218,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", "[START_DIR]/build" ], "env": { @@ -220,7 +234,7 @@ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@", "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", @@ -233,20 +247,6 @@ "@@@STEP_LOG_END@python.inline@@@" ] }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", @@ -263,12 +263,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android.json index fc4666a750..8eac3e7c9c 100644 --- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android.json +++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android.json @@ -14,6 +14,20 @@ "infra_step": true, "name": "makedirs tmp_dir" }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "/usr/bin/adb.1.0.35", @@ -499,20 +513,6 @@ "infra_step": true, "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android_NoGPUThreads.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android_NoGPUThreads.json index 194c6f1acd..ff7686e102 100644 --- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android_NoGPUThreads.json +++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android_NoGPUThreads.json @@ -16,7 +16,21 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "/usr/bin/adb.1.0.35", "shell", "mkdir", "-p", @@ -24,7 +38,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -35,7 +49,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skia/resources", "/sdcard/revenge_of_the_skiabot/resources" ], @@ -58,7 +72,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -94,14 +108,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -111,7 +125,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-f", @@ -119,7 +133,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -128,7 +142,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-rf", @@ -136,7 +150,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -145,7 +159,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "mkdir", "-p", @@ -153,7 +167,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -164,7 +178,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skp", "/sdcard/revenge_of_the_skiabot/skps" ], @@ -187,7 +201,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -195,14 +209,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "push", "[START_DIR]/tmp/SKP_VERSION", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -239,14 +253,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -256,7 +270,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-f", @@ -264,7 +278,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -273,7 +287,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-rf", @@ -281,7 +295,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -290,7 +304,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "mkdir", "-p", @@ -298,7 +312,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -309,7 +323,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skimage", "/sdcard/revenge_of_the_skiabot/images" ], @@ -332,7 +346,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -340,14 +354,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "push", "[START_DIR]/tmp/SK_IMAGE_VERSION", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -384,14 +398,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -401,7 +415,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-f", @@ -409,7 +423,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -418,7 +432,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-rf", @@ -426,7 +440,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -435,7 +449,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "mkdir", "-p", @@ -443,7 +457,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -454,7 +468,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/svg", "/sdcard/revenge_of_the_skiabot/svgs" ], @@ -477,7 +491,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -485,14 +499,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "push", "[START_DIR]/tmp/SVG_VERSION", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -501,7 +515,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-rf", @@ -509,7 +523,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -518,7 +532,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "mkdir", "-p", @@ -526,27 +540,13 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, "infra_step": true, "name": "mkdir /sdcard/revenge_of_the_skiabot/perf" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", @@ -566,7 +566,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "4", "userspace" ], @@ -608,7 +608,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "0.6", "4" ], @@ -682,7 +682,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\n# If we try to echo 1 to an already online cpu, adb returns exit code 1.\n# So, check the value before trying to write it.\nprior_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif prior_status == str(value):\n print 'CPU %d online already %d' % (cpu, value)\n sys.exit()\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(value):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_status, value))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "0", "0" ], @@ -732,7 +732,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\n# If we try to echo 1 to an already online cpu, adb returns exit code 1.\n# So, check the value before trying to write it.\nprior_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif prior_status == str(value):\n print 'CPU %d online already %d' % (cpu, value)\n sys.exit()\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(value):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_status, value))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "1", "0" ], @@ -782,7 +782,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\n# If we try to echo 1 to an already online cpu, adb returns exit code 1.\n# So, check the value before trying to write it.\nprior_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif prior_status == str(value):\n print 'CPU %d online already %d' % (cpu, value)\n sys.exit()\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(value):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_status, value))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "2", "0" ], @@ -832,7 +832,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\n# If we try to echo 1 to an already online cpu, adb returns exit code 1.\n# So, check the value before trying to write it.\nprior_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif prior_status == str(value):\n print 'CPU %d online already %d' % (cpu, value)\n sys.exit()\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(value):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_status, value))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "3", "0" ], @@ -882,7 +882,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nfreq = sys.argv[2]\nidle_timer = \"10000\"\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'stop', 'thermald'])\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/class/kgsl/kgsl-3d0/gpuclk' % freq])\n\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/gpuclk']).strip()\nif actual_freq != freq:\n raise Exception('Frequency (actual, expected) (%s, %s)'\n % (actual_freq, freq))\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/class/kgsl/kgsl-3d0/idle_timer' % idle_timer])\n\nactual_timer = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/idle_timer']).strip()\nif actual_timer != idle_timer:\n raise Exception('idle_timer (actual, expected) (%s, %s)'\n % (actual_timer, idle_timer))\n\nfor s in ['force_bus_on', 'force_rail_on', 'force_clk_on']:\n subprocess.check_output([ADB, 'shell', 'echo \"1\" > '\n '/sys/class/kgsl/kgsl-3d0/%s' % s])\n actual_set = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/%s' % s]).strip()\n if actual_set != \"1\":\n raise Exception('%s (actual, expected) (%s, 1)'\n % (s, actual_set))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "600000000" ], "env": { @@ -941,14 +941,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "push", "[START_DIR]/build/nanobench", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -975,14 +975,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "push", "[START_DIR]/tmp/nanobench.sh", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -991,13 +991,13 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "logcat", "-c" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -1008,7 +1008,7 @@ "cmd": [ "python", "-u", - "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", "/data/local/tmp/", "nanobench.sh" ], @@ -1023,9 +1023,9 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])@@@", "@@@STEP_LOG_LINE@python.inline@try:@@@", - "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',@@@", "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", @@ -1054,14 +1054,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "pull", "/sdcard/revenge_of_the_skiabot/perf", "[TMP_BASE]/adb_pull_tmp_1" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -1146,7 +1146,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", "[START_DIR]/build" ], "env": { @@ -1162,7 +1162,7 @@ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])@@@", "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", @@ -1177,12 +1177,12 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json index 3a983b4cd8..07a8dc6c10 100644 --- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json +++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json @@ -14,6 +14,20 @@ "infra_step": true, "name": "makedirs tmp_dir" }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "/usr/bin/adb.1.0.35", @@ -533,20 +547,6 @@ "infra_step": true, "name": "mkdir /sdcard/revenge_of_the_skiabot/perf" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipes/perf.expected/Perf-Chromecast-Clang-Chorizo-CPU-Cortex_A7-arm-Debug-All.json b/infra/bots/recipes/perf.expected/Perf-Chromecast-Clang-Chorizo-CPU-Cortex_A7-arm-Debug-All.json index 5f0567f087..f0106af5a2 100644 --- a/infra/bots/recipes/perf.expected/Perf-Chromecast-Clang-Chorizo-CPU-Cortex_A7-arm-Debug-All.json +++ b/infra/bots/recipes/perf.expected/Perf-Chromecast-Clang-Chorizo-CPU-Cortex_A7-arm-Debug-All.json @@ -14,6 +14,20 @@ "infra_step": true, "name": "makedirs tmp_dir" }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "python", @@ -260,20 +274,6 @@ "infra_step": true, "name": "push [START_DIR]/tmp/SKP_VERSION /cache/skia/SKP_VERSION" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipes/perf.expected/Perf-Chromecast-Clang-Chorizo-GPU-Cortex_A7-arm-Release-All.json b/infra/bots/recipes/perf.expected/Perf-Chromecast-Clang-Chorizo-GPU-Cortex_A7-arm-Release-All.json index ede1b64bed..0293a058f7 100644 --- a/infra/bots/recipes/perf.expected/Perf-Chromecast-Clang-Chorizo-GPU-Cortex_A7-arm-Release-All.json +++ b/infra/bots/recipes/perf.expected/Perf-Chromecast-Clang-Chorizo-GPU-Cortex_A7-arm-Release-All.json @@ -14,6 +14,20 @@ "infra_step": true, "name": "makedirs tmp_dir" }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "python", @@ -292,20 +306,6 @@ "infra_step": true, "name": "mkdir /cache/skia/perf" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipes/skpbench.expected/Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Release-All-Android_CCPR_Skpbench.json b/infra/bots/recipes/skpbench.expected/Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Release-All-Android_CCPR_Skpbench.json index 961643614b..97fc5b0b92 100644 --- a/infra/bots/recipes/skpbench.expected/Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Release-All-Android_CCPR_Skpbench.json +++ b/infra/bots/recipes/skpbench.expected/Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Release-All-Android_CCPR_Skpbench.json @@ -14,6 +14,20 @@ "infra_step": true, "name": "makedirs tmp_dir" }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "/usr/bin/adb.1.0.35", @@ -232,20 +246,6 @@ }, "name": "skpbench" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipes/skpbench.expected/trybot.json b/infra/bots/recipes/skpbench.expected/trybot.json index b0e7e0429b..fab540fcc9 100644 --- a/infra/bots/recipes/skpbench.expected/trybot.json +++ b/infra/bots/recipes/skpbench.expected/trybot.json @@ -14,6 +14,20 @@ "infra_step": true, "name": "makedirs tmp_dir" }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "/usr/bin/adb.1.0.35", @@ -228,20 +242,6 @@ }, "name": "skpbench" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android.json b/infra/bots/recipes/test.expected/Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android.json index 39e3e5c738..ec68eba3b7 100644 --- a/infra/bots/recipes/test.expected/Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android.json +++ b/infra/bots/recipes/test.expected/Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android.json @@ -14,6 +14,20 @@ "infra_step": true, "name": "makedirs tmp_dir" }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "/usr/bin/adb.1.0.35", @@ -624,20 +638,6 @@ "infra_step": true, "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-GalaxyS6-GPU-MaliT760-arm64-Debug-All-Android.json b/infra/bots/recipes/test.expected/Test-Android-Clang-GalaxyS6-GPU-MaliT760-arm64-Debug-All-Android.json index 4078fa0f5b..f7951005ed 100644 --- a/infra/bots/recipes/test.expected/Test-Android-Clang-GalaxyS6-GPU-MaliT760-arm64-Debug-All-Android.json +++ b/infra/bots/recipes/test.expected/Test-Android-Clang-GalaxyS6-GPU-MaliT760-arm64-Debug-All-Android.json @@ -14,6 +14,20 @@ "infra_step": true, "name": "makedirs tmp_dir" }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "/usr/bin/adb.1.0.35", @@ -624,20 +638,6 @@ "infra_step": true, "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android_Vulkan.json b/infra/bots/recipes/test.expected/Test-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android_Vulkan.json index 2e4880406a..fdafd45680 100644 --- a/infra/bots/recipes/test.expected/Test-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android_Vulkan.json +++ b/infra/bots/recipes/test.expected/Test-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android_Vulkan.json @@ -14,6 +14,20 @@ "infra_step": true, "name": "makedirs tmp_dir" }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "/usr/bin/adb.1.0.35", @@ -624,20 +638,6 @@ "infra_step": true, "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-All-Android_CCPR.json b/infra/bots/recipes/test.expected/Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-All-Android_CCPR.json index 2057812de5..2374275398 100644 --- a/infra/bots/recipes/test.expected/Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-All-Android_CCPR.json +++ b/infra/bots/recipes/test.expected/Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-All-Android_CCPR.json @@ -14,6 +14,20 @@ "infra_step": true, "name": "makedirs tmp_dir" }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "/usr/bin/adb.1.0.35", @@ -624,20 +638,6 @@ "infra_step": true, "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-All-Android.json b/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-All-Android.json index 713c357c6e..c8f854467f 100644 --- a/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-All-Android.json +++ b/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-All-Android.json @@ -14,6 +14,20 @@ "infra_step": true, "name": "makedirs tmp_dir" }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "/usr/bin/adb.1.0.35", @@ -624,20 +638,6 @@ "infra_step": true, "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm-Debug-All-Android_ASAN.json b/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm-Debug-All-Android_ASAN.json index 307409352d..ecb75f0b91 100644 --- a/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm-Debug-All-Android_ASAN.json +++ b/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm-Debug-All-Android_ASAN.json @@ -16,7 +16,21 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "/usr/bin/adb.1.0.35", "shell", "mkdir", "-p", @@ -24,7 +38,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -36,7 +50,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nASAN_SETUP = sys.argv[2]\n\ndef wait_for_device():\n while True:\n time.sleep(5)\n print 'Waiting for device'\n subprocess.check_output([ADB, 'wait-for-device'])\n bit1 = subprocess.check_output([ADB, 'shell', 'getprop',\n 'dev.bootcomplete'])\n bit2 = subprocess.check_output([ADB, 'shell', 'getprop',\n 'sys.boot_completed'])\n if '1' in bit1 and '1' in bit2:\n print 'Device detected'\n break\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\noutput = subprocess.check_output([ADB, 'disable-verity'])\nprint output\n\nif 'already disabled' not in output:\n print 'Rebooting device'\n subprocess.check_output([ADB, 'reboot'])\n wait_for_device()\n\ndef installASAN(revert=False):\n # ASAN setup script is idempotent, either it installs it or\n # says it's installed. Returns True on success, false otherwise.\n out = subprocess.check_output([ADB, 'wait-for-device'])\n print out\n cmd = [ASAN_SETUP]\n if revert:\n cmd = [ASAN_SETUP, '--revert']\n process = subprocess.Popen(cmd, env={'ADB': ADB},\n stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n\n # this also blocks until command finishes\n (stdout, stderr) = process.communicate()\n print stdout\n print 'Stderr: %s' % stderr\n return process.returncode == 0\n\nif not installASAN():\n print 'Trying to revert the ASAN install and then re-install'\n # ASAN script sometimes has issues if it was interrupted or partially applied\n # Try reverting it, then re-enabling it\n if not installASAN(revert=True):\n raise Exception('reverting ASAN install failed')\n\n # Sleep because device does not reboot instantly\n time.sleep(10)\n\n if not installASAN():\n raise Exception('Tried twice to setup ASAN and failed.')\n\n# Sleep because device does not reboot instantly\ntime.sleep(10)\nwait_for_device()\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "[START_DIR]/android_ndk_linux/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/6.0.2/bin/asan_device_setup" ], "env": { @@ -122,7 +136,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skia/resources", "/sdcard/revenge_of_the_skiabot/resources" ], @@ -145,7 +159,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -181,14 +195,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -198,7 +212,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-f", @@ -206,7 +220,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -215,7 +229,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-rf", @@ -223,7 +237,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -232,7 +246,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "mkdir", "-p", @@ -240,7 +254,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -251,7 +265,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skp", "/sdcard/revenge_of_the_skiabot/skps" ], @@ -274,7 +288,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -282,14 +296,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "push", "[START_DIR]/tmp/SKP_VERSION", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -326,14 +340,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -343,7 +357,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-f", @@ -351,7 +365,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -360,7 +374,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-rf", @@ -368,7 +382,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -377,7 +391,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "mkdir", "-p", @@ -385,7 +399,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -396,7 +410,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skimage", "/sdcard/revenge_of_the_skiabot/images" ], @@ -419,7 +433,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -427,14 +441,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "push", "[START_DIR]/tmp/SK_IMAGE_VERSION", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -471,14 +485,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -488,7 +502,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-f", @@ -496,7 +510,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -505,7 +519,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-rf", @@ -513,7 +527,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -522,7 +536,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "mkdir", "-p", @@ -530,7 +544,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -541,7 +555,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/svg", "/sdcard/revenge_of_the_skiabot/svgs" ], @@ -564,7 +578,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -572,34 +586,20 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "push", "[START_DIR]/tmp/SVG_VERSION", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, "infra_step": true, "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", @@ -619,7 +619,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\n# If we try to echo 1 to an already online cpu, adb returns exit code 1.\n# So, check the value before trying to write it.\nprior_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif prior_status == str(value):\n print 'CPU %d online already %d' % (cpu, value)\n sys.exit()\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(value):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_status, value))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "0", "1" ], @@ -669,7 +669,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\n# If we try to echo 1 to an already online cpu, adb returns exit code 1.\n# So, check the value before trying to write it.\nprior_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif prior_status == str(value):\n print 'CPU %d online already %d' % (cpu, value)\n sys.exit()\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(value):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_status, value))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "1", "1" ], @@ -719,7 +719,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\n# If we try to echo 1 to an already online cpu, adb returns exit code 1.\n# So, check the value before trying to write it.\nprior_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif prior_status == str(value):\n print 'CPU %d online already %d' % (cpu, value)\n sys.exit()\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(value):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_status, value))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "2", "1" ], @@ -769,7 +769,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\n# If we try to echo 1 to an already online cpu, adb returns exit code 1.\n# So, check the value before trying to write it.\nprior_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif prior_status == str(value):\n print 'CPU %d online already %d' % (cpu, value)\n sys.exit()\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(value):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_status, value))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "3", "1" ], @@ -819,7 +819,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "4", "ondemand" ], @@ -861,7 +861,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "0", "ondemand" ], @@ -900,14 +900,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "push", "[START_DIR]/build/dm", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -934,14 +934,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "push", "[START_DIR]/tmp/dm.sh", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -950,13 +950,13 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "logcat", "-c" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -967,7 +967,7 @@ "cmd": [ "python", "-u", - "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", "/data/local/tmp/", "dm.sh" ], @@ -982,9 +982,9 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])@@@", "@@@STEP_LOG_LINE@python.inline@try:@@@", - "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',@@@", "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", @@ -996,7 +996,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", "[START_DIR]/build" ], "env": { @@ -1012,7 +1012,7 @@ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])@@@", "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", @@ -1027,12 +1027,12 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android_NoGPUThreads.json b/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android_NoGPUThreads.json index 6cfed5d1b2..6e22f1c00a 100644 --- a/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android_NoGPUThreads.json +++ b/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android_NoGPUThreads.json @@ -16,7 +16,21 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "/usr/bin/adb.1.0.35", "shell", "mkdir", "-p", @@ -24,7 +38,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -35,7 +49,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skia/resources", "/sdcard/revenge_of_the_skiabot/resources" ], @@ -58,7 +72,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -94,14 +108,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -111,7 +125,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-f", @@ -119,7 +133,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -128,7 +142,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-rf", @@ -136,7 +150,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -145,7 +159,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "mkdir", "-p", @@ -153,7 +167,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -164,7 +178,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skp", "/sdcard/revenge_of_the_skiabot/skps" ], @@ -187,7 +201,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -195,14 +209,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "push", "[START_DIR]/tmp/SKP_VERSION", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -239,14 +253,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -256,7 +270,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-f", @@ -264,7 +278,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -273,7 +287,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-rf", @@ -281,7 +295,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -290,7 +304,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "mkdir", "-p", @@ -298,7 +312,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -309,7 +323,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skimage", "/sdcard/revenge_of_the_skiabot/images" ], @@ -332,7 +346,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -340,14 +354,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "push", "[START_DIR]/tmp/SK_IMAGE_VERSION", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -384,14 +398,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -401,7 +415,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-f", @@ -409,7 +423,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -418,7 +432,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-rf", @@ -426,7 +440,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -435,7 +449,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "mkdir", "-p", @@ -443,7 +457,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -454,7 +468,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/svg", "/sdcard/revenge_of_the_skiabot/svgs" ], @@ -477,7 +491,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -485,14 +499,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "push", "[START_DIR]/tmp/SVG_VERSION", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -529,7 +543,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "rm", "-rf", @@ -537,7 +551,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -546,7 +560,7 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "shell", "mkdir", "-p", @@ -554,7 +568,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -610,34 +624,20 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "push", "[START_DIR]/tmp/uninteresting_hashes.txt", "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, "infra_step": true, "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", @@ -657,7 +657,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\n# If we try to echo 1 to an already online cpu, adb returns exit code 1.\n# So, check the value before trying to write it.\nprior_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif prior_status == str(value):\n print 'CPU %d online already %d' % (cpu, value)\n sys.exit()\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(value):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_status, value))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "0", "1" ], @@ -707,7 +707,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\n# If we try to echo 1 to an already online cpu, adb returns exit code 1.\n# So, check the value before trying to write it.\nprior_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif prior_status == str(value):\n print 'CPU %d online already %d' % (cpu, value)\n sys.exit()\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(value):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_status, value))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "1", "1" ], @@ -757,7 +757,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\n# If we try to echo 1 to an already online cpu, adb returns exit code 1.\n# So, check the value before trying to write it.\nprior_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif prior_status == str(value):\n print 'CPU %d online already %d' % (cpu, value)\n sys.exit()\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(value):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_status, value))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "2", "1" ], @@ -807,7 +807,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\n# If we try to echo 1 to an already online cpu, adb returns exit code 1.\n# So, check the value before trying to write it.\nprior_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif prior_status == str(value):\n print 'CPU %d online already %d' % (cpu, value)\n sys.exit()\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(value):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_status, value))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "3", "1" ], @@ -857,7 +857,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "4", "ondemand" ], @@ -899,7 +899,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "0", "ondemand" ], @@ -938,14 +938,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "push", "[START_DIR]/build/dm", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -972,14 +972,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "push", "[START_DIR]/tmp/dm.sh", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -988,13 +988,13 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "logcat", "-c" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -1005,7 +1005,7 @@ "cmd": [ "python", "-u", - "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", "/data/local/tmp/", "dm.sh" ], @@ -1020,9 +1020,9 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])@@@", "@@@STEP_LOG_LINE@python.inline@try:@@@", - "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',@@@", "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", @@ -1036,14 +1036,14 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "pull", "/sdcard/revenge_of_the_skiabot/dm_out", "[TMP_BASE]/adb_pull_tmp_1" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -1128,7 +1128,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", "[START_DIR]/build" ], "env": { @@ -1144,7 +1144,7 @@ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])@@@", "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", @@ -1159,12 +1159,12 @@ }, { "cmd": [ - "/opt/infra-android/tools/adb", + "/usr/bin/adb.1.0.35", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus7-CPU-Tegra3-arm-Release-All-Android.json b/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus7-CPU-Tegra3-arm-Release-All-Android.json index 60232c76c0..fa55c30a70 100644 --- a/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus7-CPU-Tegra3-arm-Release-All-Android.json +++ b/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus7-CPU-Tegra3-arm-Release-All-Android.json @@ -14,6 +14,20 @@ "infra_step": true, "name": "makedirs tmp_dir" }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "/usr/bin/adb.1.0.35", @@ -624,20 +638,6 @@ "infra_step": true, "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json b/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json index c3f0b8f2dc..30be094af6 100644 --- a/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json +++ b/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json @@ -14,6 +14,20 @@ "infra_step": true, "name": "makedirs tmp_dir" }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "/usr/bin/adb.1.0.35", @@ -624,20 +638,6 @@ "infra_step": true, "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android_Vulkan.json b/infra/bots/recipes/test.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android_Vulkan.json index 93e81433c4..4b1660339e 100644 --- a/infra/bots/recipes/test.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android_Vulkan.json +++ b/infra/bots/recipes/test.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android_Vulkan.json @@ -14,6 +14,20 @@ "infra_step": true, "name": "makedirs tmp_dir" }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "/usr/bin/adb.1.0.35", @@ -624,20 +638,6 @@ "infra_step": true, "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipes/test.expected/Test-Chromecast-Clang-Chorizo-CPU-Cortex_A7-arm-Release-All.json b/infra/bots/recipes/test.expected/Test-Chromecast-Clang-Chorizo-CPU-Cortex_A7-arm-Release-All.json index de40df1973..ed674e93b0 100644 --- a/infra/bots/recipes/test.expected/Test-Chromecast-Clang-Chorizo-CPU-Cortex_A7-arm-Release-All.json +++ b/infra/bots/recipes/test.expected/Test-Chromecast-Clang-Chorizo-CPU-Cortex_A7-arm-Release-All.json @@ -14,6 +14,20 @@ "infra_step": true, "name": "makedirs tmp_dir" }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "python", @@ -382,20 +396,6 @@ "infra_step": true, "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /cache/skia/uninteresting_hashes.txt" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipes/test.expected/Test-Chromecast-Clang-Chorizo-GPU-Cortex_A7-arm-Release-All.json b/infra/bots/recipes/test.expected/Test-Chromecast-Clang-Chorizo-GPU-Cortex_A7-arm-Release-All.json index 29aebda68b..f3cfcf71a3 100644 --- a/infra/bots/recipes/test.expected/Test-Chromecast-Clang-Chorizo-GPU-Cortex_A7-arm-Release-All.json +++ b/infra/bots/recipes/test.expected/Test-Chromecast-Clang-Chorizo-GPU-Cortex_A7-arm-Release-All.json @@ -14,6 +14,20 @@ "infra_step": true, "name": "makedirs tmp_dir" }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, { "cmd": [ "python", @@ -382,20 +396,6 @@ "infra_step": true, "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /cache/skia/uninteresting_hashes.txt" }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", diff --git a/infra/bots/recipes/test.expected/failed_get_hashes.json b/infra/bots/recipes/test.expected/failed_get_hashes.json index 80c44aa7ff..8ab23dabc2 100644 --- a/infra/bots/recipes/test.expected/failed_get_hashes.json +++ b/infra/bots/recipes/test.expected/failed_get_hashes.json @@ -16,7 +16,21 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -24,7 +38,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -35,7 +49,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skia/resources", "/sdcard/revenge_of_the_skiabot/resources" ], @@ -58,7 +72,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -94,14 +108,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -111,7 +125,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -119,7 +133,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -128,7 +142,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -136,7 +150,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -145,7 +159,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -153,7 +167,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -164,7 +178,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skp", "/sdcard/revenge_of_the_skiabot/skps" ], @@ -187,7 +201,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -195,14 +209,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SKP_VERSION", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -239,14 +253,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -256,7 +270,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -264,7 +278,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -273,7 +287,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -281,7 +295,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -290,7 +304,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -298,7 +312,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -309,7 +323,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skimage", "/sdcard/revenge_of_the_skiabot/images" ], @@ -332,7 +346,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -340,14 +354,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SK_IMAGE_VERSION", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -384,14 +398,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -401,7 +415,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -409,7 +423,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -418,7 +432,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -426,7 +440,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -435,7 +449,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -443,7 +457,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -454,7 +468,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/svg", "/sdcard/revenge_of_the_skiabot/svgs" ], @@ -477,7 +491,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -485,14 +499,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SVG_VERSION", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -529,7 +543,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -537,7 +551,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -546,7 +560,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -554,7 +568,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -612,14 +626,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/uninteresting_hashes.txt", "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -632,7 +646,7 @@ "-u", "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" ], - "name": "get swarming bot id", + "name": "get swarming bot id (2)", "stdout": "/path/to/tmp/", "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@import os@@@", @@ -659,7 +673,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "0", "ondemand" ], @@ -698,14 +712,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/build/dm", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -732,14 +746,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/dm.sh", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -748,13 +762,13 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "logcat", "-c" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -765,7 +779,7 @@ "cmd": [ "python", "-u", - "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", "/data/local/tmp/", "dm.sh" ], @@ -780,9 +794,9 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@", "@@@STEP_LOG_LINE@python.inline@try:@@@", - "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@", "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", @@ -796,14 +810,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "pull", "/sdcard/revenge_of_the_skiabot/dm_out", "[TMP_BASE]/adb_pull_tmp_1" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -888,7 +902,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", "[START_DIR]/build" ], "env": { @@ -904,7 +918,7 @@ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@", "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", @@ -919,12 +933,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, diff --git a/infra/bots/recipes/test.expected/failed_pull.json b/infra/bots/recipes/test.expected/failed_pull.json index c8562d5ae4..c3ba8018f5 100644 --- a/infra/bots/recipes/test.expected/failed_pull.json +++ b/infra/bots/recipes/test.expected/failed_pull.json @@ -16,7 +16,21 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -24,7 +38,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -35,7 +49,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skia/resources", "/sdcard/revenge_of_the_skiabot/resources" ], @@ -58,7 +72,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -94,14 +108,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -111,7 +125,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -119,7 +133,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -128,7 +142,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -136,7 +150,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -145,7 +159,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -153,7 +167,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -164,7 +178,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skp", "/sdcard/revenge_of_the_skiabot/skps" ], @@ -187,7 +201,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -195,14 +209,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SKP_VERSION", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -239,14 +253,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -256,7 +270,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -264,7 +278,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -273,7 +287,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -281,7 +295,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -290,7 +304,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -298,7 +312,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -309,7 +323,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skimage", "/sdcard/revenge_of_the_skiabot/images" ], @@ -332,7 +346,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -340,14 +354,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SK_IMAGE_VERSION", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -384,14 +398,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -401,7 +415,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -409,7 +423,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -418,7 +432,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -426,7 +440,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -435,7 +449,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -443,7 +457,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -454,7 +468,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/svg", "/sdcard/revenge_of_the_skiabot/svgs" ], @@ -477,7 +491,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -485,14 +499,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SVG_VERSION", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -529,7 +543,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -537,7 +551,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -546,7 +560,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -554,7 +568,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -610,14 +624,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/uninteresting_hashes.txt", "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -630,7 +644,7 @@ "-u", "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" ], - "name": "get swarming bot id", + "name": "get swarming bot id (2)", "stdout": "/path/to/tmp/", "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@import os@@@", @@ -657,7 +671,7 @@ "python", "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "0", "ondemand" ], @@ -696,14 +710,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/build/dm", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -730,14 +744,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/dm.sh", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -746,13 +760,13 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "logcat", "-c" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -763,7 +777,7 @@ "cmd": [ "python", "-u", - "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", "/data/local/tmp/", "dm.sh" ], @@ -779,9 +793,9 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@", "@@@STEP_LOG_LINE@python.inline@try:@@@", - "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@", "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", @@ -796,14 +810,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "pull", "/sdcard/revenge_of_the_skiabot/dm_out", "[TMP_BASE]/adb_pull_tmp_1" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -817,12 +831,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -835,12 +849,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "wait-for-device" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -853,14 +867,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "pull", "/sdcard/revenge_of_the_skiabot/dm_out", "[TMP_BASE]/adb_pull_tmp_1" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -874,12 +888,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -892,12 +906,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "wait-for-device" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -910,14 +924,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "pull", "/sdcard/revenge_of_the_skiabot/dm_out", "[TMP_BASE]/adb_pull_tmp_1" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -949,7 +963,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", "[START_DIR]/build" ], "env": { @@ -965,7 +979,7 @@ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@", "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", @@ -980,12 +994,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, diff --git a/infra/bots/recipes/test.expected/failed_push.json b/infra/bots/recipes/test.expected/failed_push.json index ee5b41d331..8a419351a0 100644 --- a/infra/bots/recipes/test.expected/failed_push.json +++ b/infra/bots/recipes/test.expected/failed_push.json @@ -16,7 +16,21 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -24,7 +38,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -35,7 +49,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skia/resources", "/sdcard/revenge_of_the_skiabot/resources" ], @@ -59,7 +73,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@", @@ -70,7 +84,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", "[START_DIR]/build" ], "env": { @@ -86,7 +100,7 @@ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@", "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", @@ -99,20 +113,6 @@ "@@@STEP_LOG_END@python.inline@@@" ] }, - { - "cmd": [ - "python", - "-u", - "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" - ], - "name": "get swarming bot id", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, { "cmd": [ "python", @@ -129,12 +129,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, diff --git a/infra/bots/recipes/test.expected/internal_bot_1.json b/infra/bots/recipes/test.expected/internal_bot_1.json index 13e35c7dbf..1939189515 100644 --- a/infra/bots/recipes/test.expected/internal_bot_1.json +++ b/infra/bots/recipes/test.expected/internal_bot_1.json @@ -16,7 +16,21 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -24,7 +38,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -35,7 +49,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skia/resources", "/sdcard/revenge_of_the_skiabot/resources" ], @@ -58,7 +72,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -94,14 +108,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -111,7 +125,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -119,7 +133,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -128,7 +142,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -136,7 +150,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -145,7 +159,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -153,7 +167,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -164,7 +178,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skp", "/sdcard/revenge_of_the_skiabot/skps" ], @@ -187,7 +201,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -195,14 +209,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SKP_VERSION", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -239,14 +253,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -256,7 +270,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -264,7 +278,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -273,7 +287,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -281,7 +295,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -290,7 +304,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -298,7 +312,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -309,7 +323,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skimage", "/sdcard/revenge_of_the_skiabot/images" ], @@ -332,7 +346,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -340,14 +354,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SK_IMAGE_VERSION", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -384,14 +398,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -401,7 +415,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -409,7 +423,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -418,7 +432,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -426,7 +440,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -435,7 +449,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -443,7 +457,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -454,7 +468,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/svg", "/sdcard/revenge_of_the_skiabot/svgs" ], @@ -477,7 +491,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -485,14 +499,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SVG_VERSION", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -529,7 +543,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -537,7 +551,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -546,7 +560,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -554,7 +568,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -610,14 +624,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/uninteresting_hashes.txt", "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -630,7 +644,7 @@ "-u", "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" ], - "name": "get swarming bot id", + "name": "get swarming bot id (2)", "stdout": "/path/to/tmp/", "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@import os@@@", @@ -654,14 +668,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/build/dm", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -688,14 +702,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/dm.sh", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -704,13 +718,13 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "logcat", "-c" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -721,7 +735,7 @@ "cmd": [ "python", "-u", - "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", "/data/local/tmp/", "dm.sh" ], @@ -736,9 +750,9 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@", "@@@STEP_LOG_LINE@python.inline@try:@@@", - "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@", "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", @@ -752,14 +766,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "pull", "/sdcard/revenge_of_the_skiabot/dm_out", "[TMP_BASE]/adb_pull_tmp_1" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -844,7 +858,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", "[START_DIR]/build" ], "env": { @@ -860,7 +874,7 @@ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@", "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", @@ -875,12 +889,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, diff --git a/infra/bots/recipes/test.expected/internal_bot_2.json b/infra/bots/recipes/test.expected/internal_bot_2.json index c5a7c33773..d5af38bd83 100644 --- a/infra/bots/recipes/test.expected/internal_bot_2.json +++ b/infra/bots/recipes/test.expected/internal_bot_2.json @@ -16,7 +16,21 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -24,7 +38,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -35,7 +49,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skia/resources", "/sdcard/revenge_of_the_skiabot/resources" ], @@ -58,7 +72,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -94,14 +108,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -111,7 +125,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -119,7 +133,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -128,7 +142,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -136,7 +150,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -145,7 +159,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -153,7 +167,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -164,7 +178,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skp", "/sdcard/revenge_of_the_skiabot/skps" ], @@ -187,7 +201,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -195,14 +209,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SKP_VERSION", "/sdcard/revenge_of_the_skiabot/SKP_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -239,14 +253,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -256,7 +270,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -264,7 +278,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -273,7 +287,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -281,7 +295,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -290,7 +304,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -298,7 +312,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -309,7 +323,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/skimage", "/sdcard/revenge_of_the_skiabot/images" ], @@ -332,7 +346,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -340,14 +354,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SK_IMAGE_VERSION", "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -384,14 +398,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "cat", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -401,7 +415,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-f", @@ -409,7 +423,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -418,7 +432,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -426,7 +440,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -435,7 +449,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -443,7 +457,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -454,7 +468,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", "[START_DIR]/svg", "/sdcard/revenge_of_the_skiabot/svgs" ], @@ -477,7 +491,7 @@ "@@@STEP_LOG_LINE@python.inline@ continue@@@", "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", "@@@STEP_LOG_END@python.inline@@@" @@ -485,14 +499,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/SVG_VERSION", "/sdcard/revenge_of_the_skiabot/SVG_VERSION" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -529,7 +543,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "rm", "-rf", @@ -537,7 +551,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -546,7 +560,7 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "shell", "mkdir", "-p", @@ -554,7 +568,7 @@ ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -610,14 +624,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/uninteresting_hashes.txt", "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -630,7 +644,7 @@ "-u", "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" ], - "name": "get swarming bot id", + "name": "get swarming bot id (2)", "stdout": "/path/to/tmp/", "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@import os@@@", @@ -654,14 +668,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/build/dm", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -688,14 +702,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "push", "[START_DIR]/tmp/dm.sh", "/data/local/tmp/" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -704,13 +718,13 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "logcat", "-c" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -721,7 +735,7 @@ "cmd": [ "python", "-u", - "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", "/data/local/tmp/", "dm.sh" ], @@ -736,9 +750,9 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@", "@@@STEP_LOG_LINE@python.inline@try:@@@", - "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@", "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", @@ -752,14 +766,14 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "pull", "/sdcard/revenge_of_the_skiabot/dm_out", "[TMP_BASE]/adb_pull_tmp_1" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" }, @@ -844,7 +858,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", "[START_DIR]/build" ], "env": { @@ -860,7 +874,7 @@ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@", "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", @@ -875,12 +889,12 @@ }, { "cmd": [ - "/usr/bin/adb.1.0.35", + "/opt/infra-android/tools/adb", "kill-server" ], "cwd": "[START_DIR]/skia", "env": { - "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey", + "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", "CHROME_HEADLESS": "1", "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" },