1 [ 2 { 3 "cmd": [ 4 "python", 5 "-u", 6 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 7 "--json-output", 8 "/path/to/tmp/json", 9 "ensure-directory", 10 "--mode", 11 "0777", 12 "[START_DIR]/tmp" 13 ], 14 "infra_step": true, 15 "name": "makedirs tmp_dir" 16 }, 17 { 18 "cmd": [ 19 "adb", 20 "shell", 21 "mkdir", 22 "-p", 23 "/sdcard/revenge_of_the_skiabot/resources" 24 ], 25 "cwd": "[START_DIR]/skia", 26 "env": { 27 "BUILDTYPE": "Release", 28 "CHROME_HEADLESS": "1", 29 "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", 30 "SKIA_OUT": "[START_DIR]/out" 31 }, 32 "infra_step": true, 33 "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" 34 }, 35 { 36 "cmd": [ 37 "python", 38 "-u", 39 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 40 "--json-output", 41 "/path/to/tmp/json", 42 "copy", 43 "[START_DIR]/skia/infra/bots/assets/skp/VERSION", 44 "/path/to/tmp/" 45 ], 46 "infra_step": true, 47 "name": "Get downloaded SKP VERSION" 48 }, 49 { 50 "cmd": [ 51 "python", 52 "-u", 53 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 54 "--json-output", 55 "/path/to/tmp/json", 56 "copy", 57 "42", 58 "[START_DIR]/tmp/SKP_VERSION" 59 ], 60 "infra_step": true, 61 "name": "write SKP_VERSION" 62 }, 63 { 64 "cmd": [ 65 "adb", 66 "shell", 67 "cat", 68 "/sdcard/revenge_of_the_skiabot/SKP_VERSION" 69 ], 70 "cwd": "[START_DIR]/skia", 71 "env": { 72 "BUILDTYPE": "Release", 73 "CHROME_HEADLESS": "1", 74 "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", 75 "SKIA_OUT": "[START_DIR]/out" 76 }, 77 "infra_step": true, 78 "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", 79 "stdout": "/path/to/tmp/" 80 }, 81 { 82 "cmd": [ 83 "adb", 84 "shell", 85 "rm", 86 "-f", 87 "/sdcard/revenge_of_the_skiabot/SKP_VERSION" 88 ], 89 "cwd": "[START_DIR]/skia", 90 "env": { 91 "BUILDTYPE": "Release", 92 "CHROME_HEADLESS": "1", 93 "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", 94 "SKIA_OUT": "[START_DIR]/out" 95 }, 96 "infra_step": true, 97 "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" 98 }, 99 { 100 "cmd": [ 101 "adb", 102 "shell", 103 "rm", 104 "-rf", 105 "/sdcard/revenge_of_the_skiabot/skps" 106 ], 107 "cwd": "[START_DIR]/skia", 108 "env": { 109 "BUILDTYPE": "Release", 110 "CHROME_HEADLESS": "1", 111 "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", 112 "SKIA_OUT": "[START_DIR]/out" 113 }, 114 "infra_step": true, 115 "name": "rm /sdcard/revenge_of_the_skiabot/skps" 116 }, 117 { 118 "cmd": [ 119 "adb", 120 "shell", 121 "mkdir", 122 "-p", 123 "/sdcard/revenge_of_the_skiabot/skps" 124 ], 125 "cwd": "[START_DIR]/skia", 126 "env": { 127 "BUILDTYPE": "Release", 128 "CHROME_HEADLESS": "1", 129 "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", 130 "SKIA_OUT": "[START_DIR]/out" 131 }, 132 "infra_step": true, 133 "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" 134 }, 135 { 136 "cmd": [ 137 "python", 138 "-u", 139 "\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(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", 140 "[START_DIR]/skp", 141 "/sdcard/revenge_of_the_skiabot/skps" 142 ], 143 "env": { 144 "BUILDTYPE": "Release", 145 "CHROME_HEADLESS": "1", 146 "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", 147 "SKIA_OUT": "[START_DIR]/out" 148 }, 149 "infra_step": true, 150 "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", 151 "~followup_annotations": [ 152 "@@@STEP_LOG_LINE (a] python.inline@@@@", 153 "@@@STEP_LOG_LINE (a] python.inline@import os@@@", 154 "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@", 155 "@@@STEP_LOG_LINE (a] python.inline@import sys@@@", 156 "@@@STEP_LOG_LINE (a] python.inline@host = sys.argv[1]@@@", 157 "@@@STEP_LOG_LINE (a] python.inline@device = sys.argv[2]@@@", 158 "@@@STEP_LOG_LINE (a] python.inline@for d, _, fs in os.walk(host):@@@", 159 "@@@STEP_LOG_LINE (a] python.inline@ p = os.path.relpath(d, host)@@@", 160 "@@@STEP_LOG_LINE (a] python.inline@ if p != '.' and p.startswith('.'):@@@", 161 "@@@STEP_LOG_LINE (a] python.inline@ continue@@@", 162 "@@@STEP_LOG_LINE (a] python.inline@ for f in fs:@@@", 163 "@@@STEP_LOG_LINE (a] python.inline@ print os.path.join(p,f)@@@", 164 "@@@STEP_LOG_LINE (a] python.inline@ subprocess.check_call(['adb', 'push',@@@", 165 "@@@STEP_LOG_LINE (a] python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", 166 "@@@STEP_LOG_LINE (a] python.inline@ os.path.join(device, p, f)])@@@", 167 "@@@STEP_LOG_END (a] python.inline@@@" 168 ] 169 }, 170 { 171 "cmd": [ 172 "adb", 173 "push", 174 "[START_DIR]/tmp/SKP_VERSION", 175 "/sdcard/revenge_of_the_skiabot/SKP_VERSION" 176 ], 177 "cwd": "[START_DIR]/skia", 178 "env": { 179 "BUILDTYPE": "Release", 180 "CHROME_HEADLESS": "1", 181 "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", 182 "SKIA_OUT": "[START_DIR]/out" 183 }, 184 "infra_step": true, 185 "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" 186 }, 187 { 188 "cmd": [ 189 "adb", 190 "push", 191 "[START_DIR]/out/Release/skpbench", 192 "/data/local/tmp/" 193 ], 194 "cwd": "[START_DIR]/skia", 195 "env": { 196 "BUILDTYPE": "Release", 197 "CHROME_HEADLESS": "1", 198 "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", 199 "SKIA_OUT": "[START_DIR]/out" 200 }, 201 "infra_step": true, 202 "name": "push skpbench" 203 }, 204 { 205 "cmd": [ 206 "python", 207 "-u", 208 "[START_DIR]/skia/tools/skpbench/skpbench.py", 209 "/data/local/tmp/skpbench", 210 "/sdcard/revenge_of_the_skiabot/skps", 211 "--adb", 212 "--resultsfile", 213 "[CUSTOM_[SWARM_OUT_DIR]]/table", 214 "--config", 215 "vk", 216 "-v", 217 "5" 218 ], 219 "env": { 220 "BUILDTYPE": "Release", 221 "CHROME_HEADLESS": "1", 222 "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", 223 "SKIA_OUT": "[START_DIR]/out" 224 }, 225 "name": "skpbench" 226 }, 227 { 228 "cmd": [ 229 "python", 230 "-u", 231 "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" 232 ], 233 "name": "get swarming bot id", 234 "stdout": "/path/to/tmp/", 235 "~followup_annotations": [ 236 "@@@STEP_LOG_LINE (a] python.inline@import os@@@", 237 "@@@STEP_LOG_LINE (a] python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", 238 "@@@STEP_LOG_END (a] python.inline@@@" 239 ] 240 }, 241 { 242 "cmd": [ 243 "python", 244 "-u", 245 "import os\nprint os.environ.get('SWARMING_TASK_ID', '')\n" 246 ], 247 "name": "get swarming task id", 248 "stdout": "/path/to/tmp/", 249 "~followup_annotations": [ 250 "@@@STEP_LOG_LINE (a] python.inline@import os@@@", 251 "@@@STEP_LOG_LINE (a] python.inline@print os.environ.get('SWARMING_TASK_ID', '')@@@", 252 "@@@STEP_LOG_END (a] python.inline@@@" 253 ] 254 }, 255 { 256 "cmd": [ 257 "python", 258 "-u", 259 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 260 "--json-output", 261 "/path/to/tmp/json", 262 "ensure-directory", 263 "--mode", 264 "0777", 265 "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-Android_Vulkan_Skpbench/data" 266 ], 267 "infra_step": true, 268 "name": "makedirs perf_dir" 269 }, 270 { 271 "cmd": [ 272 "python", 273 "-u", 274 "[START_DIR]/skia/tools/skpbench/skiaperf.py", 275 "[CUSTOM_[SWARM_OUT_DIR]]/table", 276 "--properties", 277 "gitHash", 278 "abc123", 279 "swarming_bot_id", 280 "skia-bot-123", 281 "swarming_task_id", 282 "123456", 283 "--outfile", 284 "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-Android_Vulkan_Skpbench/data/skpbench_abc123_1337000001.json", 285 "--key", 286 "arch", 287 "arm64", 288 "compiler", 289 "Clang", 290 "cpu_or_gpu", 291 "GPU", 292 "cpu_or_gpu_value", 293 "TegraX1", 294 "extra_config", 295 "Android_Vulkan_Skpbench", 296 "model", 297 "PixelC", 298 "os", 299 "Android" 300 ], 301 "env": { 302 "BUILDTYPE": "Release", 303 "CHROME_HEADLESS": "1", 304 "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", 305 "SKIA_OUT": "[START_DIR]/out" 306 }, 307 "name": "Parse skpbench output into Perf json" 308 }, 309 { 310 "cmd": [ 311 "python", 312 "-u", 313 "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['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", 314 "[START_DIR]/out/Release" 315 ], 316 "env": { 317 "BUILDTYPE": "Release", 318 "CHROME_HEADLESS": "1", 319 "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", 320 "SKIA_OUT": "[START_DIR]/out" 321 }, 322 "infra_step": true, 323 "name": "dump log", 324 "~followup_annotations": [ 325 "@@@STEP_LOG_LINE (a] python.inline@@@@", 326 "@@@STEP_LOG_LINE (a] python.inline@import os@@@", 327 "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@", 328 "@@@STEP_LOG_LINE (a] python.inline@import sys@@@", 329 "@@@STEP_LOG_LINE (a] python.inline@out = sys.argv[1]@@@", 330 "@@@STEP_LOG_LINE (a] python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", 331 "@@@STEP_LOG_LINE (a] python.inline@for line in log.split('\\n'):@@@", 332 "@@@STEP_LOG_LINE (a] python.inline@ tokens = line.split()@@@", 333 "@@@STEP_LOG_LINE (a] python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", 334 "@@@STEP_LOG_LINE (a] python.inline@ addr, path = tokens[-2:]@@@", 335 "@@@STEP_LOG_LINE (a] python.inline@ local = os.path.join(out, os.path.basename(path))@@@", 336 "@@@STEP_LOG_LINE (a] python.inline@ if os.path.exists(local):@@@", 337 "@@@STEP_LOG_LINE (a] python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", 338 "@@@STEP_LOG_LINE (a] python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", 339 "@@@STEP_LOG_LINE (a] python.inline@ print line@@@", 340 "@@@STEP_LOG_END (a] python.inline@@@" 341 ] 342 }, 343 { 344 "cmd": [ 345 "adb", 346 "kill-server" 347 ], 348 "cwd": "[START_DIR]/skia", 349 "env": { 350 "BUILDTYPE": "Release", 351 "CHROME_HEADLESS": "1", 352 "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", 353 "SKIA_OUT": "[START_DIR]/out" 354 }, 355 "infra_step": true, 356 "name": "kill adb server" 357 }, 358 { 359 "name": "$result", 360 "recipe_result": null, 361 "status_code": 0 362 } 363 ]