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 "gles,glesinst4", 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_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 "issue", 280 "456789", 281 "patchset", 282 "12", 283 "patch_storage", 284 "gerrit", 285 "swarming_bot_id", 286 "skia-bot-123", 287 "swarming_task_id", 288 "123456", 289 "--outfile", 290 "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-Android_Skpbench/data/skpbench_abc123_1337000001.json", 291 "--key", 292 "arch", 293 "arm64", 294 "compiler", 295 "Clang", 296 "cpu_or_gpu", 297 "GPU", 298 "cpu_or_gpu_value", 299 "TegraX1", 300 "extra_config", 301 "Android_Skpbench", 302 "model", 303 "PixelC", 304 "os", 305 "Android" 306 ], 307 "env": { 308 "BUILDTYPE": "Release", 309 "CHROME_HEADLESS": "1", 310 "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", 311 "SKIA_OUT": "[START_DIR]/out" 312 }, 313 "name": "Parse skpbench output into Perf json" 314 }, 315 { 316 "cmd": [ 317 "python", 318 "-u", 319 "\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", 320 "[START_DIR]/out/Release" 321 ], 322 "env": { 323 "BUILDTYPE": "Release", 324 "CHROME_HEADLESS": "1", 325 "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", 326 "SKIA_OUT": "[START_DIR]/out" 327 }, 328 "infra_step": true, 329 "name": "dump log", 330 "~followup_annotations": [ 331 "@@@STEP_LOG_LINE (a] python.inline@@@@", 332 "@@@STEP_LOG_LINE (a] python.inline@import os@@@", 333 "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@", 334 "@@@STEP_LOG_LINE (a] python.inline@import sys@@@", 335 "@@@STEP_LOG_LINE (a] python.inline@out = sys.argv[1]@@@", 336 "@@@STEP_LOG_LINE (a] python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", 337 "@@@STEP_LOG_LINE (a] python.inline@for line in log.split('\\n'):@@@", 338 "@@@STEP_LOG_LINE (a] python.inline@ tokens = line.split()@@@", 339 "@@@STEP_LOG_LINE (a] python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", 340 "@@@STEP_LOG_LINE (a] python.inline@ addr, path = tokens[-2:]@@@", 341 "@@@STEP_LOG_LINE (a] python.inline@ local = os.path.join(out, os.path.basename(path))@@@", 342 "@@@STEP_LOG_LINE (a] python.inline@ if os.path.exists(local):@@@", 343 "@@@STEP_LOG_LINE (a] python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", 344 "@@@STEP_LOG_LINE (a] python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", 345 "@@@STEP_LOG_LINE (a] python.inline@ print line@@@", 346 "@@@STEP_LOG_END (a] python.inline@@@" 347 ] 348 }, 349 { 350 "cmd": [ 351 "adb", 352 "kill-server" 353 ], 354 "cwd": "[START_DIR]/skia", 355 "env": { 356 "BUILDTYPE": "Release", 357 "CHROME_HEADLESS": "1", 358 "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", 359 "SKIA_OUT": "[START_DIR]/out" 360 }, 361 "infra_step": true, 362 "name": "kill adb server" 363 }, 364 { 365 "name": "$result", 366 "recipe_result": null, 367 "status_code": 0 368 } 369 ]