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      "python",
20      "-u",
21      "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n"
22    ],
23    "name": "get swarming bot id",
24    "stdout": "/path/to/tmp/",
25    "~followup_annotations": [
26      "@@@STEP_LOG_LINE@python.inline@import os@@@",
27      "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@",
28      "@@@STEP_LOG_END@python.inline@@@"
29    ]
30  },
31  {
32    "cmd": [
33      "/usr/bin/adb.1.0.35",
34      "shell",
35      "mkdir",
36      "-p",
37      "/sdcard/revenge_of_the_skiabot/resources"
38    ],
39    "cwd": "[START_DIR]/skia",
40    "env": {
41      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
42      "CHROME_HEADLESS": "1",
43      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
44    },
45    "infra_step": true,
46    "name": "mkdir /sdcard/revenge_of_the_skiabot/resources"
47  },
48  {
49    "cmd": [
50      "python",
51      "-u",
52      "\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",
53      "[START_DIR]/skia/resources",
54      "/sdcard/revenge_of_the_skiabot/resources"
55    ],
56    "env": {
57      "CHROME_HEADLESS": "1",
58      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
59    },
60    "infra_step": true,
61    "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources",
62    "~followup_annotations": [
63      "@@@STEP_LOG_LINE@python.inline@@@@",
64      "@@@STEP_LOG_LINE@python.inline@import os@@@",
65      "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
66      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
67      "@@@STEP_LOG_LINE@python.inline@host   = sys.argv[1]@@@",
68      "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@",
69      "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@",
70      "@@@STEP_LOG_LINE@python.inline@  p = os.path.relpath(d, host)@@@",
71      "@@@STEP_LOG_LINE@python.inline@  if p != '.' and p.startswith('.'):@@@",
72      "@@@STEP_LOG_LINE@python.inline@    continue@@@",
73      "@@@STEP_LOG_LINE@python.inline@  for f in fs:@@@",
74      "@@@STEP_LOG_LINE@python.inline@    print os.path.join(p,f)@@@",
75      "@@@STEP_LOG_LINE@python.inline@    subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@",
76      "@@@STEP_LOG_LINE@python.inline@                           os.path.realpath(os.path.join(host, p, f)),@@@",
77      "@@@STEP_LOG_LINE@python.inline@                           os.path.join(device, p, f)])@@@",
78      "@@@STEP_LOG_END@python.inline@@@"
79    ]
80  },
81  {
82    "cmd": [
83      "python",
84      "-u",
85      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
86      "--json-output",
87      "/path/to/tmp/json",
88      "copy",
89      "[START_DIR]/skia/infra/bots/assets/skp/VERSION",
90      "/path/to/tmp/"
91    ],
92    "infra_step": true,
93    "name": "Get skp VERSION"
94  },
95  {
96    "cmd": [
97      "python",
98      "-u",
99      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
100      "--json-output",
101      "/path/to/tmp/json",
102      "copy",
103      "42",
104      "[START_DIR]/tmp/SKP_VERSION"
105    ],
106    "infra_step": true,
107    "name": "write SKP_VERSION"
108  },
109  {
110    "cmd": [
111      "/usr/bin/adb.1.0.35",
112      "shell",
113      "cat",
114      "/sdcard/revenge_of_the_skiabot/SKP_VERSION"
115    ],
116    "cwd": "[START_DIR]/skia",
117    "env": {
118      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
119      "CHROME_HEADLESS": "1",
120      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
121    },
122    "infra_step": true,
123    "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION",
124    "stdout": "/path/to/tmp/"
125  },
126  {
127    "cmd": [
128      "/usr/bin/adb.1.0.35",
129      "shell",
130      "rm",
131      "-f",
132      "/sdcard/revenge_of_the_skiabot/SKP_VERSION"
133    ],
134    "cwd": "[START_DIR]/skia",
135    "env": {
136      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
137      "CHROME_HEADLESS": "1",
138      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
139    },
140    "infra_step": true,
141    "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION"
142  },
143  {
144    "cmd": [
145      "/usr/bin/adb.1.0.35",
146      "shell",
147      "rm",
148      "-rf",
149      "/sdcard/revenge_of_the_skiabot/skps"
150    ],
151    "cwd": "[START_DIR]/skia",
152    "env": {
153      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
154      "CHROME_HEADLESS": "1",
155      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
156    },
157    "infra_step": true,
158    "name": "rm /sdcard/revenge_of_the_skiabot/skps"
159  },
160  {
161    "cmd": [
162      "/usr/bin/adb.1.0.35",
163      "shell",
164      "mkdir",
165      "-p",
166      "/sdcard/revenge_of_the_skiabot/skps"
167    ],
168    "cwd": "[START_DIR]/skia",
169    "env": {
170      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
171      "CHROME_HEADLESS": "1",
172      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
173    },
174    "infra_step": true,
175    "name": "mkdir /sdcard/revenge_of_the_skiabot/skps"
176  },
177  {
178    "cmd": [
179      "python",
180      "-u",
181      "\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",
182      "[START_DIR]/skp",
183      "/sdcard/revenge_of_the_skiabot/skps"
184    ],
185    "env": {
186      "CHROME_HEADLESS": "1",
187      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
188    },
189    "infra_step": true,
190    "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps",
191    "~followup_annotations": [
192      "@@@STEP_LOG_LINE@python.inline@@@@",
193      "@@@STEP_LOG_LINE@python.inline@import os@@@",
194      "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
195      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
196      "@@@STEP_LOG_LINE@python.inline@host   = sys.argv[1]@@@",
197      "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@",
198      "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@",
199      "@@@STEP_LOG_LINE@python.inline@  p = os.path.relpath(d, host)@@@",
200      "@@@STEP_LOG_LINE@python.inline@  if p != '.' and p.startswith('.'):@@@",
201      "@@@STEP_LOG_LINE@python.inline@    continue@@@",
202      "@@@STEP_LOG_LINE@python.inline@  for f in fs:@@@",
203      "@@@STEP_LOG_LINE@python.inline@    print os.path.join(p,f)@@@",
204      "@@@STEP_LOG_LINE@python.inline@    subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@",
205      "@@@STEP_LOG_LINE@python.inline@                           os.path.realpath(os.path.join(host, p, f)),@@@",
206      "@@@STEP_LOG_LINE@python.inline@                           os.path.join(device, p, f)])@@@",
207      "@@@STEP_LOG_END@python.inline@@@"
208    ]
209  },
210  {
211    "cmd": [
212      "/usr/bin/adb.1.0.35",
213      "push",
214      "[START_DIR]/tmp/SKP_VERSION",
215      "/sdcard/revenge_of_the_skiabot/SKP_VERSION"
216    ],
217    "cwd": "[START_DIR]/skia",
218    "env": {
219      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
220      "CHROME_HEADLESS": "1",
221      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
222    },
223    "infra_step": true,
224    "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION"
225  },
226  {
227    "cmd": [
228      "python",
229      "-u",
230      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
231      "--json-output",
232      "/path/to/tmp/json",
233      "copy",
234      "[START_DIR]/skia/infra/bots/assets/skimage/VERSION",
235      "/path/to/tmp/"
236    ],
237    "infra_step": true,
238    "name": "Get skimage VERSION"
239  },
240  {
241    "cmd": [
242      "python",
243      "-u",
244      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
245      "--json-output",
246      "/path/to/tmp/json",
247      "copy",
248      "42",
249      "[START_DIR]/tmp/SK_IMAGE_VERSION"
250    ],
251    "infra_step": true,
252    "name": "write SK_IMAGE_VERSION"
253  },
254  {
255    "cmd": [
256      "/usr/bin/adb.1.0.35",
257      "shell",
258      "cat",
259      "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
260    ],
261    "cwd": "[START_DIR]/skia",
262    "env": {
263      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
264      "CHROME_HEADLESS": "1",
265      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
266    },
267    "infra_step": true,
268    "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION",
269    "stdout": "/path/to/tmp/"
270  },
271  {
272    "cmd": [
273      "/usr/bin/adb.1.0.35",
274      "shell",
275      "rm",
276      "-f",
277      "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
278    ],
279    "cwd": "[START_DIR]/skia",
280    "env": {
281      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
282      "CHROME_HEADLESS": "1",
283      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
284    },
285    "infra_step": true,
286    "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
287  },
288  {
289    "cmd": [
290      "/usr/bin/adb.1.0.35",
291      "shell",
292      "rm",
293      "-rf",
294      "/sdcard/revenge_of_the_skiabot/images"
295    ],
296    "cwd": "[START_DIR]/skia",
297    "env": {
298      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
299      "CHROME_HEADLESS": "1",
300      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
301    },
302    "infra_step": true,
303    "name": "rm /sdcard/revenge_of_the_skiabot/images"
304  },
305  {
306    "cmd": [
307      "/usr/bin/adb.1.0.35",
308      "shell",
309      "mkdir",
310      "-p",
311      "/sdcard/revenge_of_the_skiabot/images"
312    ],
313    "cwd": "[START_DIR]/skia",
314    "env": {
315      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
316      "CHROME_HEADLESS": "1",
317      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
318    },
319    "infra_step": true,
320    "name": "mkdir /sdcard/revenge_of_the_skiabot/images"
321  },
322  {
323    "cmd": [
324      "python",
325      "-u",
326      "\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",
327      "[START_DIR]/skimage",
328      "/sdcard/revenge_of_the_skiabot/images"
329    ],
330    "env": {
331      "CHROME_HEADLESS": "1",
332      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
333    },
334    "infra_step": true,
335    "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images",
336    "~followup_annotations": [
337      "@@@STEP_LOG_LINE@python.inline@@@@",
338      "@@@STEP_LOG_LINE@python.inline@import os@@@",
339      "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
340      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
341      "@@@STEP_LOG_LINE@python.inline@host   = sys.argv[1]@@@",
342      "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@",
343      "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@",
344      "@@@STEP_LOG_LINE@python.inline@  p = os.path.relpath(d, host)@@@",
345      "@@@STEP_LOG_LINE@python.inline@  if p != '.' and p.startswith('.'):@@@",
346      "@@@STEP_LOG_LINE@python.inline@    continue@@@",
347      "@@@STEP_LOG_LINE@python.inline@  for f in fs:@@@",
348      "@@@STEP_LOG_LINE@python.inline@    print os.path.join(p,f)@@@",
349      "@@@STEP_LOG_LINE@python.inline@    subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@",
350      "@@@STEP_LOG_LINE@python.inline@                           os.path.realpath(os.path.join(host, p, f)),@@@",
351      "@@@STEP_LOG_LINE@python.inline@                           os.path.join(device, p, f)])@@@",
352      "@@@STEP_LOG_END@python.inline@@@"
353    ]
354  },
355  {
356    "cmd": [
357      "/usr/bin/adb.1.0.35",
358      "push",
359      "[START_DIR]/tmp/SK_IMAGE_VERSION",
360      "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
361    ],
362    "cwd": "[START_DIR]/skia",
363    "env": {
364      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
365      "CHROME_HEADLESS": "1",
366      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
367    },
368    "infra_step": true,
369    "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
370  },
371  {
372    "cmd": [
373      "python",
374      "-u",
375      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
376      "--json-output",
377      "/path/to/tmp/json",
378      "copy",
379      "[START_DIR]/skia/infra/bots/assets/svg/VERSION",
380      "/path/to/tmp/"
381    ],
382    "infra_step": true,
383    "name": "Get svg VERSION"
384  },
385  {
386    "cmd": [
387      "python",
388      "-u",
389      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
390      "--json-output",
391      "/path/to/tmp/json",
392      "copy",
393      "42",
394      "[START_DIR]/tmp/SVG_VERSION"
395    ],
396    "infra_step": true,
397    "name": "write SVG_VERSION"
398  },
399  {
400    "cmd": [
401      "/usr/bin/adb.1.0.35",
402      "shell",
403      "cat",
404      "/sdcard/revenge_of_the_skiabot/SVG_VERSION"
405    ],
406    "cwd": "[START_DIR]/skia",
407    "env": {
408      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
409      "CHROME_HEADLESS": "1",
410      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
411    },
412    "infra_step": true,
413    "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION",
414    "stdout": "/path/to/tmp/"
415  },
416  {
417    "cmd": [
418      "/usr/bin/adb.1.0.35",
419      "shell",
420      "rm",
421      "-f",
422      "/sdcard/revenge_of_the_skiabot/SVG_VERSION"
423    ],
424    "cwd": "[START_DIR]/skia",
425    "env": {
426      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
427      "CHROME_HEADLESS": "1",
428      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
429    },
430    "infra_step": true,
431    "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION"
432  },
433  {
434    "cmd": [
435      "/usr/bin/adb.1.0.35",
436      "shell",
437      "rm",
438      "-rf",
439      "/sdcard/revenge_of_the_skiabot/svgs"
440    ],
441    "cwd": "[START_DIR]/skia",
442    "env": {
443      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
444      "CHROME_HEADLESS": "1",
445      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
446    },
447    "infra_step": true,
448    "name": "rm /sdcard/revenge_of_the_skiabot/svgs"
449  },
450  {
451    "cmd": [
452      "/usr/bin/adb.1.0.35",
453      "shell",
454      "mkdir",
455      "-p",
456      "/sdcard/revenge_of_the_skiabot/svgs"
457    ],
458    "cwd": "[START_DIR]/skia",
459    "env": {
460      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
461      "CHROME_HEADLESS": "1",
462      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
463    },
464    "infra_step": true,
465    "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs"
466  },
467  {
468    "cmd": [
469      "python",
470      "-u",
471      "\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",
472      "[START_DIR]/svg",
473      "/sdcard/revenge_of_the_skiabot/svgs"
474    ],
475    "env": {
476      "CHROME_HEADLESS": "1",
477      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
478    },
479    "infra_step": true,
480    "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs",
481    "~followup_annotations": [
482      "@@@STEP_LOG_LINE@python.inline@@@@",
483      "@@@STEP_LOG_LINE@python.inline@import os@@@",
484      "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
485      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
486      "@@@STEP_LOG_LINE@python.inline@host   = sys.argv[1]@@@",
487      "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@",
488      "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@",
489      "@@@STEP_LOG_LINE@python.inline@  p = os.path.relpath(d, host)@@@",
490      "@@@STEP_LOG_LINE@python.inline@  if p != '.' and p.startswith('.'):@@@",
491      "@@@STEP_LOG_LINE@python.inline@    continue@@@",
492      "@@@STEP_LOG_LINE@python.inline@  for f in fs:@@@",
493      "@@@STEP_LOG_LINE@python.inline@    print os.path.join(p,f)@@@",
494      "@@@STEP_LOG_LINE@python.inline@    subprocess.check_call(['/usr/bin/adb.1.0.35', 'push',@@@",
495      "@@@STEP_LOG_LINE@python.inline@                           os.path.realpath(os.path.join(host, p, f)),@@@",
496      "@@@STEP_LOG_LINE@python.inline@                           os.path.join(device, p, f)])@@@",
497      "@@@STEP_LOG_END@python.inline@@@"
498    ]
499  },
500  {
501    "cmd": [
502      "/usr/bin/adb.1.0.35",
503      "push",
504      "[START_DIR]/tmp/SVG_VERSION",
505      "/sdcard/revenge_of_the_skiabot/SVG_VERSION"
506    ],
507    "cwd": "[START_DIR]/skia",
508    "env": {
509      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
510      "CHROME_HEADLESS": "1",
511      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
512    },
513    "infra_step": true,
514    "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION"
515  },
516  {
517    "cmd": [
518      "/usr/bin/adb.1.0.35",
519      "shell",
520      "rm",
521      "-rf",
522      "/sdcard/revenge_of_the_skiabot/perf"
523    ],
524    "cwd": "[START_DIR]/skia",
525    "env": {
526      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
527      "CHROME_HEADLESS": "1",
528      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
529    },
530    "infra_step": true,
531    "name": "rm /sdcard/revenge_of_the_skiabot/perf"
532  },
533  {
534    "cmd": [
535      "/usr/bin/adb.1.0.35",
536      "shell",
537      "mkdir",
538      "-p",
539      "/sdcard/revenge_of_the_skiabot/perf"
540    ],
541    "cwd": "[START_DIR]/skia",
542    "env": {
543      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
544      "CHROME_HEADLESS": "1",
545      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
546    },
547    "infra_step": true,
548    "name": "mkdir /sdcard/revenge_of_the_skiabot/perf"
549  },
550  {
551    "cmd": [
552      "python",
553      "-u",
554      "import os\nprint os.environ.get('SWARMING_TASK_ID', '')\n"
555    ],
556    "name": "get swarming task id",
557    "stdout": "/path/to/tmp/",
558    "~followup_annotations": [
559      "@@@STEP_LOG_LINE@python.inline@import os@@@",
560      "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_TASK_ID', '')@@@",
561      "@@@STEP_LOG_END@python.inline@@@"
562    ]
563  },
564  {
565    "cmd": [
566      "python",
567      "-u",
568      "\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",
569      "/usr/bin/adb.1.0.35",
570      "4",
571      "userspace"
572    ],
573    "env": {
574      "CHROME_HEADLESS": "1",
575      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
576    },
577    "infra_step": true,
578    "name": "Set CPU 4's governor to userspace",
579    "timeout": 30,
580    "~followup_annotations": [
581      "@@@STEP_LOG_LINE@python.inline@@@@",
582      "@@@STEP_LOG_LINE@python.inline@import os@@@",
583      "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
584      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
585      "@@@STEP_LOG_LINE@python.inline@import time@@@",
586      "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@",
587      "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@",
588      "@@@STEP_LOG_LINE@python.inline@gov = sys.argv[3]@@@",
589      "@@@STEP_LOG_LINE@python.inline@@@@",
590      "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@",
591      "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@",
592      "@@@STEP_LOG_LINE@python.inline@print log@@@",
593      "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@",
594      "@@@STEP_LOG_LINE@python.inline@  raise Exception('adb root failed')@@@",
595      "@@@STEP_LOG_LINE@python.inline@@@@",
596      "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@",
597      "@@@STEP_LOG_LINE@python.inline@    '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])@@@",
598      "@@@STEP_LOG_LINE@python.inline@actual_gov = subprocess.check_output([ADB, 'shell', 'cat '@@@",
599      "@@@STEP_LOG_LINE@python.inline@    '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()@@@",
600      "@@@STEP_LOG_LINE@python.inline@if actual_gov != gov:@@@",
601      "@@@STEP_LOG_LINE@python.inline@  raise Exception('(actual, expected) (%s, %s)'@@@",
602      "@@@STEP_LOG_LINE@python.inline@                  % (actual_gov, gov))@@@",
603      "@@@STEP_LOG_END@python.inline@@@"
604    ]
605  },
606  {
607    "cmd": [
608      "python",
609      "-u",
610      "\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",
611      "/usr/bin/adb.1.0.35",
612      "0.6",
613      "4"
614    ],
615    "env": {
616      "CHROME_HEADLESS": "1",
617      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
618    },
619    "infra_step": true,
620    "name": "Scale CPU 4 to 0.600000",
621    "timeout": 30,
622    "~followup_annotations": [
623      "@@@STEP_LOG_LINE@python.inline@@@@",
624      "@@@STEP_LOG_LINE@python.inline@import os@@@",
625      "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
626      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
627      "@@@STEP_LOG_LINE@python.inline@import time@@@",
628      "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@",
629      "@@@STEP_LOG_LINE@python.inline@target_percent = float(sys.argv[2])@@@",
630      "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[3])@@@",
631      "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@",
632      "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@",
633      "@@@STEP_LOG_LINE@python.inline@print log@@@",
634      "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@",
635      "@@@STEP_LOG_LINE@python.inline@  raise Exception('adb root failed')@@@",
636      "@@@STEP_LOG_LINE@python.inline@@@@",
637      "@@@STEP_LOG_LINE@python.inline@root = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu@@@",
638      "@@@STEP_LOG_LINE@python.inline@@@@",
639      "@@@STEP_LOG_LINE@python.inline@# All devices we test on give a list of their available frequencies.@@@",
640      "@@@STEP_LOG_LINE@python.inline@available_freqs = subprocess.check_output([ADB, 'shell',@@@",
641      "@@@STEP_LOG_LINE@python.inline@    'cat %s/scaling_available_frequencies' % root])@@@",
642      "@@@STEP_LOG_LINE@python.inline@@@@",
643      "@@@STEP_LOG_LINE@python.inline@# Check for message like '/system/bin/sh: file not found'@@@",
644      "@@@STEP_LOG_LINE@python.inline@if available_freqs and '/system/bin/sh' not in available_freqs:@@@",
645      "@@@STEP_LOG_LINE@python.inline@  available_freqs = sorted(@@@",
646      "@@@STEP_LOG_LINE@python.inline@      int(i) for i in available_freqs.strip().split())@@@",
647      "@@@STEP_LOG_LINE@python.inline@else:@@@",
648      "@@@STEP_LOG_LINE@python.inline@  raise Exception('Could not get list of available frequencies: %s' %@@@",
649      "@@@STEP_LOG_LINE@python.inline@                  available_freqs)@@@",
650      "@@@STEP_LOG_LINE@python.inline@@@@",
651      "@@@STEP_LOG_LINE@python.inline@maxfreq = available_freqs[-1]@@@",
652      "@@@STEP_LOG_LINE@python.inline@target = int(round(maxfreq * target_percent))@@@",
653      "@@@STEP_LOG_LINE@python.inline@freq = maxfreq@@@",
654      "@@@STEP_LOG_LINE@python.inline@for f in reversed(available_freqs):@@@",
655      "@@@STEP_LOG_LINE@python.inline@  if f <= target:@@@",
656      "@@@STEP_LOG_LINE@python.inline@    freq = f@@@",
657      "@@@STEP_LOG_LINE@python.inline@    break@@@",
658      "@@@STEP_LOG_LINE@python.inline@@@@",
659      "@@@STEP_LOG_LINE@python.inline@print 'Setting frequency to %d' % freq@@@",
660      "@@@STEP_LOG_LINE@python.inline@@@@",
661      "@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
662      "@@@STEP_LOG_LINE@python.inline@# We must set min first, because if we try to set max to be less than min@@@",
663      "@@@STEP_LOG_LINE@python.inline@# (which sometimes happens after certain devices reboot) it returns a@@@",
664      "@@@STEP_LOG_LINE@python.inline@# perplexing permissions error.@@@",
665      "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
666      "@@@STEP_LOG_LINE@python.inline@    '%s/scaling_min_freq' % root])@@@",
667      "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
668      "@@@STEP_LOG_LINE@python.inline@    '%s/scaling_max_freq' % (freq, root)])@@@",
669      "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
670      "@@@STEP_LOG_LINE@python.inline@    '%s/scaling_setspeed' % (freq, root)])@@@",
671      "@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
672      "@@@STEP_LOG_LINE@python.inline@actual_freq = subprocess.check_output([ADB, 'shell', 'cat '@@@",
673      "@@@STEP_LOG_LINE@python.inline@    '%s/scaling_cur_freq' % root]).strip()@@@",
674      "@@@STEP_LOG_LINE@python.inline@if actual_freq != str(freq):@@@",
675      "@@@STEP_LOG_LINE@python.inline@  raise Exception('(actual, expected) (%s, %d)'@@@",
676      "@@@STEP_LOG_LINE@python.inline@                  % (actual_freq, freq))@@@",
677      "@@@STEP_LOG_END@python.inline@@@"
678    ]
679  },
680  {
681    "cmd": [
682      "python",
683      "-u",
684      "\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",
685      "/usr/bin/adb.1.0.35",
686      "0",
687      "0"
688    ],
689    "env": {
690      "CHROME_HEADLESS": "1",
691      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
692    },
693    "infra_step": true,
694    "name": "Disabling CPU 0",
695    "timeout": 30,
696    "~followup_annotations": [
697      "@@@STEP_LOG_LINE@python.inline@@@@",
698      "@@@STEP_LOG_LINE@python.inline@import os@@@",
699      "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
700      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
701      "@@@STEP_LOG_LINE@python.inline@import time@@@",
702      "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@",
703      "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@",
704      "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@",
705      "@@@STEP_LOG_LINE@python.inline@@@@",
706      "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@",
707      "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@",
708      "@@@STEP_LOG_LINE@python.inline@print log@@@",
709      "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@",
710      "@@@STEP_LOG_LINE@python.inline@  raise Exception('adb root failed')@@@",
711      "@@@STEP_LOG_LINE@python.inline@@@@",
712      "@@@STEP_LOG_LINE@python.inline@# If we try to echo 1 to an already online cpu, adb returns exit code 1.@@@",
713      "@@@STEP_LOG_LINE@python.inline@# So, check the value before trying to write it.@@@",
714      "@@@STEP_LOG_LINE@python.inline@prior_status = subprocess.check_output([ADB, 'shell', 'cat '@@@",
715      "@@@STEP_LOG_LINE@python.inline@    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@",
716      "@@@STEP_LOG_LINE@python.inline@if prior_status == str(value):@@@",
717      "@@@STEP_LOG_LINE@python.inline@  print 'CPU %d online already %d' % (cpu, value)@@@",
718      "@@@STEP_LOG_LINE@python.inline@  sys.exit()@@@",
719      "@@@STEP_LOG_LINE@python.inline@@@@",
720      "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@",
721      "@@@STEP_LOG_LINE@python.inline@    '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@",
722      "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@",
723      "@@@STEP_LOG_LINE@python.inline@    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@",
724      "@@@STEP_LOG_LINE@python.inline@if actual_status != str(value):@@@",
725      "@@@STEP_LOG_LINE@python.inline@  raise Exception('(actual, expected) (%s, %d)'@@@",
726      "@@@STEP_LOG_LINE@python.inline@                  % (actual_status, value))@@@",
727      "@@@STEP_LOG_END@python.inline@@@"
728    ]
729  },
730  {
731    "cmd": [
732      "python",
733      "-u",
734      "\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",
735      "/usr/bin/adb.1.0.35",
736      "1",
737      "0"
738    ],
739    "env": {
740      "CHROME_HEADLESS": "1",
741      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
742    },
743    "infra_step": true,
744    "name": "Disabling CPU 1",
745    "timeout": 30,
746    "~followup_annotations": [
747      "@@@STEP_LOG_LINE@python.inline@@@@",
748      "@@@STEP_LOG_LINE@python.inline@import os@@@",
749      "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
750      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
751      "@@@STEP_LOG_LINE@python.inline@import time@@@",
752      "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@",
753      "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@",
754      "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@",
755      "@@@STEP_LOG_LINE@python.inline@@@@",
756      "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@",
757      "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@",
758      "@@@STEP_LOG_LINE@python.inline@print log@@@",
759      "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@",
760      "@@@STEP_LOG_LINE@python.inline@  raise Exception('adb root failed')@@@",
761      "@@@STEP_LOG_LINE@python.inline@@@@",
762      "@@@STEP_LOG_LINE@python.inline@# If we try to echo 1 to an already online cpu, adb returns exit code 1.@@@",
763      "@@@STEP_LOG_LINE@python.inline@# So, check the value before trying to write it.@@@",
764      "@@@STEP_LOG_LINE@python.inline@prior_status = subprocess.check_output([ADB, 'shell', 'cat '@@@",
765      "@@@STEP_LOG_LINE@python.inline@    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@",
766      "@@@STEP_LOG_LINE@python.inline@if prior_status == str(value):@@@",
767      "@@@STEP_LOG_LINE@python.inline@  print 'CPU %d online already %d' % (cpu, value)@@@",
768      "@@@STEP_LOG_LINE@python.inline@  sys.exit()@@@",
769      "@@@STEP_LOG_LINE@python.inline@@@@",
770      "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@",
771      "@@@STEP_LOG_LINE@python.inline@    '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@",
772      "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@",
773      "@@@STEP_LOG_LINE@python.inline@    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@",
774      "@@@STEP_LOG_LINE@python.inline@if actual_status != str(value):@@@",
775      "@@@STEP_LOG_LINE@python.inline@  raise Exception('(actual, expected) (%s, %d)'@@@",
776      "@@@STEP_LOG_LINE@python.inline@                  % (actual_status, value))@@@",
777      "@@@STEP_LOG_END@python.inline@@@"
778    ]
779  },
780  {
781    "cmd": [
782      "python",
783      "-u",
784      "\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",
785      "/usr/bin/adb.1.0.35",
786      "2",
787      "0"
788    ],
789    "env": {
790      "CHROME_HEADLESS": "1",
791      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
792    },
793    "infra_step": true,
794    "name": "Disabling CPU 2",
795    "timeout": 30,
796    "~followup_annotations": [
797      "@@@STEP_LOG_LINE@python.inline@@@@",
798      "@@@STEP_LOG_LINE@python.inline@import os@@@",
799      "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
800      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
801      "@@@STEP_LOG_LINE@python.inline@import time@@@",
802      "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@",
803      "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@",
804      "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@",
805      "@@@STEP_LOG_LINE@python.inline@@@@",
806      "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@",
807      "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@",
808      "@@@STEP_LOG_LINE@python.inline@print log@@@",
809      "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@",
810      "@@@STEP_LOG_LINE@python.inline@  raise Exception('adb root failed')@@@",
811      "@@@STEP_LOG_LINE@python.inline@@@@",
812      "@@@STEP_LOG_LINE@python.inline@# If we try to echo 1 to an already online cpu, adb returns exit code 1.@@@",
813      "@@@STEP_LOG_LINE@python.inline@# So, check the value before trying to write it.@@@",
814      "@@@STEP_LOG_LINE@python.inline@prior_status = subprocess.check_output([ADB, 'shell', 'cat '@@@",
815      "@@@STEP_LOG_LINE@python.inline@    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@",
816      "@@@STEP_LOG_LINE@python.inline@if prior_status == str(value):@@@",
817      "@@@STEP_LOG_LINE@python.inline@  print 'CPU %d online already %d' % (cpu, value)@@@",
818      "@@@STEP_LOG_LINE@python.inline@  sys.exit()@@@",
819      "@@@STEP_LOG_LINE@python.inline@@@@",
820      "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@",
821      "@@@STEP_LOG_LINE@python.inline@    '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@",
822      "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@",
823      "@@@STEP_LOG_LINE@python.inline@    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@",
824      "@@@STEP_LOG_LINE@python.inline@if actual_status != str(value):@@@",
825      "@@@STEP_LOG_LINE@python.inline@  raise Exception('(actual, expected) (%s, %d)'@@@",
826      "@@@STEP_LOG_LINE@python.inline@                  % (actual_status, value))@@@",
827      "@@@STEP_LOG_END@python.inline@@@"
828    ]
829  },
830  {
831    "cmd": [
832      "python",
833      "-u",
834      "\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",
835      "/usr/bin/adb.1.0.35",
836      "3",
837      "0"
838    ],
839    "env": {
840      "CHROME_HEADLESS": "1",
841      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
842    },
843    "infra_step": true,
844    "name": "Disabling CPU 3",
845    "timeout": 30,
846    "~followup_annotations": [
847      "@@@STEP_LOG_LINE@python.inline@@@@",
848      "@@@STEP_LOG_LINE@python.inline@import os@@@",
849      "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
850      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
851      "@@@STEP_LOG_LINE@python.inline@import time@@@",
852      "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@",
853      "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@",
854      "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@",
855      "@@@STEP_LOG_LINE@python.inline@@@@",
856      "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@",
857      "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@",
858      "@@@STEP_LOG_LINE@python.inline@print log@@@",
859      "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@",
860      "@@@STEP_LOG_LINE@python.inline@  raise Exception('adb root failed')@@@",
861      "@@@STEP_LOG_LINE@python.inline@@@@",
862      "@@@STEP_LOG_LINE@python.inline@# If we try to echo 1 to an already online cpu, adb returns exit code 1.@@@",
863      "@@@STEP_LOG_LINE@python.inline@# So, check the value before trying to write it.@@@",
864      "@@@STEP_LOG_LINE@python.inline@prior_status = subprocess.check_output([ADB, 'shell', 'cat '@@@",
865      "@@@STEP_LOG_LINE@python.inline@    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@",
866      "@@@STEP_LOG_LINE@python.inline@if prior_status == str(value):@@@",
867      "@@@STEP_LOG_LINE@python.inline@  print 'CPU %d online already %d' % (cpu, value)@@@",
868      "@@@STEP_LOG_LINE@python.inline@  sys.exit()@@@",
869      "@@@STEP_LOG_LINE@python.inline@@@@",
870      "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@",
871      "@@@STEP_LOG_LINE@python.inline@    '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@",
872      "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@",
873      "@@@STEP_LOG_LINE@python.inline@    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@",
874      "@@@STEP_LOG_LINE@python.inline@if actual_status != str(value):@@@",
875      "@@@STEP_LOG_LINE@python.inline@  raise Exception('(actual, expected) (%s, %d)'@@@",
876      "@@@STEP_LOG_LINE@python.inline@                  % (actual_status, value))@@@",
877      "@@@STEP_LOG_END@python.inline@@@"
878    ]
879  },
880  {
881    "cmd": [
882      "python",
883      "-u",
884      "\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",
885      "/usr/bin/adb.1.0.35",
886      "600000000"
887    ],
888    "env": {
889      "CHROME_HEADLESS": "1",
890      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
891    },
892    "infra_step": true,
893    "name": "Lock GPU to 600000000 (and other perf tweaks)",
894    "timeout": 30,
895    "~followup_annotations": [
896      "@@@STEP_LOG_LINE@python.inline@@@@",
897      "@@@STEP_LOG_LINE@python.inline@import os@@@",
898      "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
899      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
900      "@@@STEP_LOG_LINE@python.inline@import time@@@",
901      "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@",
902      "@@@STEP_LOG_LINE@python.inline@freq = sys.argv[2]@@@",
903      "@@@STEP_LOG_LINE@python.inline@idle_timer = \"10000\"@@@",
904      "@@@STEP_LOG_LINE@python.inline@@@@",
905      "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@",
906      "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@",
907      "@@@STEP_LOG_LINE@python.inline@print log@@@",
908      "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@",
909      "@@@STEP_LOG_LINE@python.inline@  raise Exception('adb root failed')@@@",
910      "@@@STEP_LOG_LINE@python.inline@@@@",
911      "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'stop', 'thermald'])@@@",
912      "@@@STEP_LOG_LINE@python.inline@@@@",
913      "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@",
914      "@@@STEP_LOG_LINE@python.inline@    '/sys/class/kgsl/kgsl-3d0/gpuclk' % freq])@@@",
915      "@@@STEP_LOG_LINE@python.inline@@@@",
916      "@@@STEP_LOG_LINE@python.inline@actual_freq = subprocess.check_output([ADB, 'shell', 'cat '@@@",
917      "@@@STEP_LOG_LINE@python.inline@    '/sys/class/kgsl/kgsl-3d0/gpuclk']).strip()@@@",
918      "@@@STEP_LOG_LINE@python.inline@if actual_freq != freq:@@@",
919      "@@@STEP_LOG_LINE@python.inline@  raise Exception('Frequency (actual, expected) (%s, %s)'@@@",
920      "@@@STEP_LOG_LINE@python.inline@                  % (actual_freq, freq))@@@",
921      "@@@STEP_LOG_LINE@python.inline@@@@",
922      "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@",
923      "@@@STEP_LOG_LINE@python.inline@    '/sys/class/kgsl/kgsl-3d0/idle_timer' % idle_timer])@@@",
924      "@@@STEP_LOG_LINE@python.inline@@@@",
925      "@@@STEP_LOG_LINE@python.inline@actual_timer = subprocess.check_output([ADB, 'shell', 'cat '@@@",
926      "@@@STEP_LOG_LINE@python.inline@    '/sys/class/kgsl/kgsl-3d0/idle_timer']).strip()@@@",
927      "@@@STEP_LOG_LINE@python.inline@if actual_timer != idle_timer:@@@",
928      "@@@STEP_LOG_LINE@python.inline@  raise Exception('idle_timer (actual, expected) (%s, %s)'@@@",
929      "@@@STEP_LOG_LINE@python.inline@                  % (actual_timer, idle_timer))@@@",
930      "@@@STEP_LOG_LINE@python.inline@@@@",
931      "@@@STEP_LOG_LINE@python.inline@for s in ['force_bus_on', 'force_rail_on', 'force_clk_on']:@@@",
932      "@@@STEP_LOG_LINE@python.inline@  subprocess.check_output([ADB, 'shell', 'echo \"1\" > '@@@",
933      "@@@STEP_LOG_LINE@python.inline@      '/sys/class/kgsl/kgsl-3d0/%s' % s])@@@",
934      "@@@STEP_LOG_LINE@python.inline@  actual_set = subprocess.check_output([ADB, 'shell', 'cat '@@@",
935      "@@@STEP_LOG_LINE@python.inline@      '/sys/class/kgsl/kgsl-3d0/%s' % s]).strip()@@@",
936      "@@@STEP_LOG_LINE@python.inline@  if actual_set != \"1\":@@@",
937      "@@@STEP_LOG_LINE@python.inline@    raise Exception('%s (actual, expected) (%s, 1)'@@@",
938      "@@@STEP_LOG_LINE@python.inline@                    % (s, actual_set))@@@",
939      "@@@STEP_LOG_END@python.inline@@@"
940    ]
941  },
942  {
943    "cmd": [
944      "/usr/bin/adb.1.0.35",
945      "push",
946      "[START_DIR]/build/nanobench",
947      "/data/local/tmp/"
948    ],
949    "cwd": "[START_DIR]/skia",
950    "env": {
951      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
952      "CHROME_HEADLESS": "1",
953      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
954    },
955    "infra_step": true,
956    "name": "push nanobench"
957  },
958  {
959    "cmd": [
960      "python",
961      "-u",
962      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
963      "--json-output",
964      "/path/to/tmp/json",
965      "copy",
966      "set -x; /data/local/tmp/nanobench -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/nanobench --svgs /sdcard/revenge_of_the_skiabot/svgs --pre_log --images --gpuStatsDump true --scales 1.0 1.1 --nocpu --config gles glessrgb glesmsaa4 --gpuThreads 0 --match ~blurroundrect ~patch_grid ~desk_carsvg ~keymobi_shop_mobileweb_ebay_com.skp ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123_1337000001.json --properties gitHash abc123 swarming_bot_id skia-bot-123 swarming_task_id 123456 --key arch arm64 compiler Clang cpu_or_gpu GPU cpu_or_gpu_value Adreno418 extra_config Android_NoGPUThreads model Nexus5x os Android; echo $? >/data/local/tmp/rc",
967      "[START_DIR]/tmp/nanobench.sh"
968    ],
969    "env": {
970      "CHROME_HEADLESS": "1",
971      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
972    },
973    "infra_step": true,
974    "name": "write nanobench.sh"
975  },
976  {
977    "cmd": [
978      "/usr/bin/adb.1.0.35",
979      "push",
980      "[START_DIR]/tmp/nanobench.sh",
981      "/data/local/tmp/"
982    ],
983    "cwd": "[START_DIR]/skia",
984    "env": {
985      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
986      "CHROME_HEADLESS": "1",
987      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
988    },
989    "infra_step": true,
990    "name": "push nanobench.sh"
991  },
992  {
993    "cmd": [
994      "/usr/bin/adb.1.0.35",
995      "logcat",
996      "-c"
997    ],
998    "cwd": "[START_DIR]/skia",
999    "env": {
1000      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
1001      "CHROME_HEADLESS": "1",
1002      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
1003    },
1004    "infra_step": true,
1005    "name": "clear log"
1006  },
1007  {
1008    "cmd": [
1009      "python",
1010      "-u",
1011      "\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",
1012      "/data/local/tmp/",
1013      "nanobench.sh"
1014    ],
1015    "env": {
1016      "CHROME_HEADLESS": "1",
1017      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
1018    },
1019    "name": "nanobench",
1020    "~followup_annotations": [
1021      "@@@STEP_LOG_LINE@python.inline@@@@",
1022      "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
1023      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
1024      "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@",
1025      "@@@STEP_LOG_LINE@python.inline@sh      = sys.argv[2]@@@",
1026      "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/usr/bin/adb.1.0.35', 'shell', 'sh', bin_dir + sh])@@@",
1027      "@@@STEP_LOG_LINE@python.inline@try:@@@",
1028      "@@@STEP_LOG_LINE@python.inline@  sys.exit(int(subprocess.check_output(['/usr/bin/adb.1.0.35', 'shell', 'cat',@@@",
1029      "@@@STEP_LOG_LINE@python.inline@                                        bin_dir + 'rc'])))@@@",
1030      "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@",
1031      "@@@STEP_LOG_LINE@python.inline@  print \"Couldn't read the return code.  Probably killed for OOM.\"@@@",
1032      "@@@STEP_LOG_LINE@python.inline@  sys.exit(1)@@@",
1033      "@@@STEP_LOG_END@python.inline@@@"
1034    ]
1035  },
1036  {
1037    "cmd": [
1038      "python",
1039      "-u",
1040      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
1041      "--json-output",
1042      "/path/to/tmp/json",
1043      "ensure-directory",
1044      "--mode",
1045      "0777",
1046      "[START_DIR]/[SWARM_OUT_DIR]"
1047    ],
1048    "infra_step": true,
1049    "name": "makedirs perf_dir"
1050  },
1051  {
1052    "cmd": [],
1053    "name": "adb pull"
1054  },
1055  {
1056    "cmd": [
1057      "/usr/bin/adb.1.0.35",
1058      "pull",
1059      "/sdcard/revenge_of_the_skiabot/perf",
1060      "[CLEANUP]/adb_pull_tmp_1"
1061    ],
1062    "cwd": "[START_DIR]/skia",
1063    "env": {
1064      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
1065      "CHROME_HEADLESS": "1",
1066      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
1067    },
1068    "infra_step": true,
1069    "name": "adb pull.pull /sdcard/revenge_of_the_skiabot/perf",
1070    "~followup_annotations": [
1071      "@@@STEP_NEST_LEVEL@1@@@"
1072    ]
1073  },
1074  {
1075    "cmd": [
1076      "python",
1077      "-u",
1078      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
1079      "--json-output",
1080      "/path/to/tmp/json",
1081      "glob",
1082      "[CLEANUP]/adb_pull_tmp_1",
1083      "perf/*"
1084    ],
1085    "infra_step": true,
1086    "name": "adb pull.list pulled files",
1087    "stdout": "/path/to/tmp/",
1088    "~followup_annotations": [
1089      "@@@STEP_NEST_LEVEL@1@@@",
1090      "@@@STEP_LOG_LINE@glob@[CLEANUP]/adb_pull_tmp_1/1.png@@@",
1091      "@@@STEP_LOG_LINE@glob@[CLEANUP]/adb_pull_tmp_1/2.png@@@",
1092      "@@@STEP_LOG_END@glob@@@"
1093    ]
1094  },
1095  {
1096    "cmd": [
1097      "python",
1098      "-u",
1099      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
1100      "--json-output",
1101      "/path/to/tmp/json",
1102      "copy",
1103      "[CLEANUP]/adb_pull_tmp_1/1.png",
1104      "[START_DIR]/[SWARM_OUT_DIR]"
1105    ],
1106    "infra_step": true,
1107    "name": "adb pull.copy 1.png",
1108    "~followup_annotations": [
1109      "@@@STEP_NEST_LEVEL@1@@@"
1110    ]
1111  },
1112  {
1113    "cmd": [
1114      "python",
1115      "-u",
1116      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
1117      "--json-output",
1118      "/path/to/tmp/json",
1119      "copy",
1120      "[CLEANUP]/adb_pull_tmp_1/2.png",
1121      "[START_DIR]/[SWARM_OUT_DIR]"
1122    ],
1123    "infra_step": true,
1124    "name": "adb pull.copy 2.png",
1125    "~followup_annotations": [
1126      "@@@STEP_NEST_LEVEL@1@@@"
1127    ]
1128  },
1129  {
1130    "cmd": [
1131      "python",
1132      "-u",
1133      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
1134      "--json-output",
1135      "/path/to/tmp/json",
1136      "rmtree",
1137      "[CLEANUP]/adb_pull_tmp_1"
1138    ],
1139    "infra_step": true,
1140    "name": "adb pull.rmtree [CLEANUP]/adb_pull_tmp_1",
1141    "~followup_annotations": [
1142      "@@@STEP_NEST_LEVEL@1@@@"
1143    ]
1144  },
1145  {
1146    "cmd": [
1147      "python",
1148      "-u",
1149      "\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",
1150      "[START_DIR]/build"
1151    ],
1152    "env": {
1153      "CHROME_HEADLESS": "1",
1154      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
1155    },
1156    "infra_step": true,
1157    "name": "dump log",
1158    "timeout": 300,
1159    "~followup_annotations": [
1160      "@@@STEP_LOG_LINE@python.inline@@@@",
1161      "@@@STEP_LOG_LINE@python.inline@import os@@@",
1162      "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
1163      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
1164      "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@",
1165      "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/usr/bin/adb.1.0.35', 'logcat', '-d'])@@@",
1166      "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@",
1167      "@@@STEP_LOG_LINE@python.inline@  tokens = line.split()@@@",
1168      "@@@STEP_LOG_LINE@python.inline@  if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@",
1169      "@@@STEP_LOG_LINE@python.inline@    addr, path = tokens[-2:]@@@",
1170      "@@@STEP_LOG_LINE@python.inline@    local = os.path.join(out, os.path.basename(path))@@@",
1171      "@@@STEP_LOG_LINE@python.inline@    if os.path.exists(local):@@@",
1172      "@@@STEP_LOG_LINE@python.inline@      sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@",
1173      "@@@STEP_LOG_LINE@python.inline@      line = line.replace(addr, addr + ' ' + sym.strip())@@@",
1174      "@@@STEP_LOG_LINE@python.inline@  print line@@@",
1175      "@@@STEP_LOG_END@python.inline@@@"
1176    ]
1177  },
1178  {
1179    "cmd": [
1180      "/usr/bin/adb.1.0.35",
1181      "kill-server"
1182    ],
1183    "cwd": "[START_DIR]/skia",
1184    "env": {
1185      "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/adbkey",
1186      "CHROME_HEADLESS": "1",
1187      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
1188    },
1189    "infra_step": true,
1190    "name": "kill adb server"
1191  },
1192  {
1193    "jsonResult": null,
1194    "name": "$result"
1195  }
1196]