83400b5f362a50183858991b2e79433e35c546f4
[platform/upstream/libSkiaSharp.git] /
1 [
2   {
3     "cmd": [
4       "adb",
5       "reboot"
6     ],
7     "cwd": "[START_DIR]/skia",
8     "infra_step": true,
9     "name": "rebooting device"
10   },
11   {
12     "cmd": [
13       "python",
14       "-u",
15       "\nimport subprocess\nimport sys\nimport time\n\nkicks = 0\nwhile True:\n\n  times = 0\n  while times < 30:\n    print 'Waiting for the device to be connected and ready.'\n    try:\n      times += 1\n      output = subprocess.check_output(['adb', 'shell',\n                                        'getprop', 'sys.boot_completed'])\n      if '1' in output:\n        print 'Connected'\n        sys.exit(0)\n    except subprocess.CalledProcessError:\n      # no device connected/authorized yet\n      pass\n    time.sleep(5)\n  if kicks >= 3:\n    break\n  print 'Giving the device a \"kick\" by trying to reboot it.'\n  kicks += 1\n  print subprocess.check_output(['adb', 'reboot'])\n\nprint 'Timed out waiting for device'\nsys.exit(1)\n"
16     ],
17     "infra_step": true,
18     "name": "wait for device",
19     "~followup_annotations": [
20       "@@@STEP_LOG_LINE@python.inline@@@@",
21       "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
22       "@@@STEP_LOG_LINE@python.inline@import sys@@@",
23       "@@@STEP_LOG_LINE@python.inline@import time@@@",
24       "@@@STEP_LOG_LINE@python.inline@@@@",
25       "@@@STEP_LOG_LINE@python.inline@kicks = 0@@@",
26       "@@@STEP_LOG_LINE@python.inline@while True:@@@",
27       "@@@STEP_LOG_LINE@python.inline@@@@",
28       "@@@STEP_LOG_LINE@python.inline@  times = 0@@@",
29       "@@@STEP_LOG_LINE@python.inline@  while times < 30:@@@",
30       "@@@STEP_LOG_LINE@python.inline@    print 'Waiting for the device to be connected and ready.'@@@",
31       "@@@STEP_LOG_LINE@python.inline@    try:@@@",
32       "@@@STEP_LOG_LINE@python.inline@      times += 1@@@",
33       "@@@STEP_LOG_LINE@python.inline@      output = subprocess.check_output(['adb', 'shell',@@@",
34       "@@@STEP_LOG_LINE@python.inline@                                        'getprop', 'sys.boot_completed'])@@@",
35       "@@@STEP_LOG_LINE@python.inline@      if '1' in output:@@@",
36       "@@@STEP_LOG_LINE@python.inline@        print 'Connected'@@@",
37       "@@@STEP_LOG_LINE@python.inline@        sys.exit(0)@@@",
38       "@@@STEP_LOG_LINE@python.inline@    except subprocess.CalledProcessError:@@@",
39       "@@@STEP_LOG_LINE@python.inline@      # no device connected/authorized yet@@@",
40       "@@@STEP_LOG_LINE@python.inline@      pass@@@",
41       "@@@STEP_LOG_LINE@python.inline@    time.sleep(5)@@@",
42       "@@@STEP_LOG_LINE@python.inline@  if kicks >= 3:@@@",
43       "@@@STEP_LOG_LINE@python.inline@    break@@@",
44       "@@@STEP_LOG_LINE@python.inline@  print 'Giving the device a \"kick\" by trying to reboot it.'@@@",
45       "@@@STEP_LOG_LINE@python.inline@  kicks += 1@@@",
46       "@@@STEP_LOG_LINE@python.inline@  print subprocess.check_output(['adb', 'reboot'])@@@",
47       "@@@STEP_LOG_LINE@python.inline@@@@",
48       "@@@STEP_LOG_LINE@python.inline@print 'Timed out waiting for device'@@@",
49       "@@@STEP_LOG_LINE@python.inline@sys.exit(1)@@@",
50       "@@@STEP_LOG_END@python.inline@@@"
51     ]
52   },
53   {
54     "cmd": [
55       "adb",
56       "shell",
57       "mkdir",
58       "-p",
59       "/sdcard/revenge_of_the_skiabot/resources"
60     ],
61     "cwd": "[START_DIR]/skia",
62     "infra_step": true,
63     "name": "mkdir /sdcard/revenge_of_the_skiabot/resources"
64   },
65   {
66     "cmd": [
67       "python",
68       "-u",
69       "\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",
70       "[START_DIR]/skia/resources",
71       "/sdcard/revenge_of_the_skiabot/resources"
72     ],
73     "infra_step": true,
74     "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources",
75     "~followup_annotations": [
76       "@@@STEP_LOG_LINE@python.inline@@@@",
77       "@@@STEP_LOG_LINE@python.inline@import os@@@",
78       "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
79       "@@@STEP_LOG_LINE@python.inline@import sys@@@",
80       "@@@STEP_LOG_LINE@python.inline@host   = sys.argv[1]@@@",
81       "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@",
82       "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@",
83       "@@@STEP_LOG_LINE@python.inline@  p = os.path.relpath(d, host)@@@",
84       "@@@STEP_LOG_LINE@python.inline@  if p != '.' and p.startswith('.'):@@@",
85       "@@@STEP_LOG_LINE@python.inline@    continue@@@",
86       "@@@STEP_LOG_LINE@python.inline@  for f in fs:@@@",
87       "@@@STEP_LOG_LINE@python.inline@    print os.path.join(p,f)@@@",
88       "@@@STEP_LOG_LINE@python.inline@    subprocess.check_call(['adb', 'push',@@@",
89       "@@@STEP_LOG_LINE@python.inline@                           os.path.realpath(os.path.join(host, p, f)),@@@",
90       "@@@STEP_LOG_LINE@python.inline@                           os.path.join(device, p, f)])@@@",
91       "@@@STEP_LOG_END@python.inline@@@"
92     ]
93   },
94   {
95     "cmd": [
96       "python",
97       "-u",
98       "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
99       "[START_DIR]/skia/infra/bots/assets/skp/VERSION",
100       "/path/to/tmp/"
101     ],
102     "infra_step": true,
103     "name": "Get downloaded SKP VERSION"
104   },
105   {
106     "cmd": [
107       "python",
108       "-u",
109       "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
110       "42",
111       "[START_DIR]/tmp/SKP_VERSION"
112     ],
113     "infra_step": true,
114     "name": "write SKP_VERSION"
115   },
116   {
117     "cmd": [
118       "adb",
119       "shell",
120       "cat",
121       "/sdcard/revenge_of_the_skiabot/SKP_VERSION"
122     ],
123     "cwd": "[START_DIR]/skia",
124     "infra_step": true,
125     "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION",
126     "stdout": "/path/to/tmp/"
127   },
128   {
129     "cmd": [
130       "adb",
131       "shell",
132       "rm",
133       "-f",
134       "/sdcard/revenge_of_the_skiabot/SKP_VERSION"
135     ],
136     "cwd": "[START_DIR]/skia",
137     "infra_step": true,
138     "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION"
139   },
140   {
141     "cmd": [
142       "adb",
143       "shell",
144       "rm",
145       "-rf",
146       "/sdcard/revenge_of_the_skiabot/skps"
147     ],
148     "cwd": "[START_DIR]/skia",
149     "infra_step": true,
150     "name": "rm /sdcard/revenge_of_the_skiabot/skps"
151   },
152   {
153     "cmd": [
154       "adb",
155       "shell",
156       "mkdir",
157       "-p",
158       "/sdcard/revenge_of_the_skiabot/skps"
159     ],
160     "cwd": "[START_DIR]/skia",
161     "infra_step": true,
162     "name": "mkdir /sdcard/revenge_of_the_skiabot/skps"
163   },
164   {
165     "cmd": [
166       "python",
167       "-u",
168       "\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",
169       "[START_DIR]/skp",
170       "/sdcard/revenge_of_the_skiabot/skps"
171     ],
172     "infra_step": true,
173     "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps",
174     "~followup_annotations": [
175       "@@@STEP_LOG_LINE@python.inline@@@@",
176       "@@@STEP_LOG_LINE@python.inline@import os@@@",
177       "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
178       "@@@STEP_LOG_LINE@python.inline@import sys@@@",
179       "@@@STEP_LOG_LINE@python.inline@host   = sys.argv[1]@@@",
180       "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@",
181       "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@",
182       "@@@STEP_LOG_LINE@python.inline@  p = os.path.relpath(d, host)@@@",
183       "@@@STEP_LOG_LINE@python.inline@  if p != '.' and p.startswith('.'):@@@",
184       "@@@STEP_LOG_LINE@python.inline@    continue@@@",
185       "@@@STEP_LOG_LINE@python.inline@  for f in fs:@@@",
186       "@@@STEP_LOG_LINE@python.inline@    print os.path.join(p,f)@@@",
187       "@@@STEP_LOG_LINE@python.inline@    subprocess.check_call(['adb', 'push',@@@",
188       "@@@STEP_LOG_LINE@python.inline@                           os.path.realpath(os.path.join(host, p, f)),@@@",
189       "@@@STEP_LOG_LINE@python.inline@                           os.path.join(device, p, f)])@@@",
190       "@@@STEP_LOG_END@python.inline@@@"
191     ]
192   },
193   {
194     "cmd": [
195       "adb",
196       "push",
197       "[START_DIR]/tmp/SKP_VERSION",
198       "/sdcard/revenge_of_the_skiabot/SKP_VERSION"
199     ],
200     "cwd": "[START_DIR]/skia",
201     "infra_step": true,
202     "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION"
203   },
204   {
205     "cmd": [
206       "python",
207       "-u",
208       "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
209       "[START_DIR]/skia/infra/bots/assets/skimage/VERSION",
210       "/path/to/tmp/"
211     ],
212     "infra_step": true,
213     "name": "Get downloaded skimage VERSION"
214   },
215   {
216     "cmd": [
217       "python",
218       "-u",
219       "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
220       "42",
221       "[START_DIR]/tmp/SK_IMAGE_VERSION"
222     ],
223     "infra_step": true,
224     "name": "write SK_IMAGE_VERSION"
225   },
226   {
227     "cmd": [
228       "adb",
229       "shell",
230       "cat",
231       "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
232     ],
233     "cwd": "[START_DIR]/skia",
234     "infra_step": true,
235     "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION",
236     "stdout": "/path/to/tmp/"
237   },
238   {
239     "cmd": [
240       "adb",
241       "shell",
242       "rm",
243       "-f",
244       "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
245     ],
246     "cwd": "[START_DIR]/skia",
247     "infra_step": true,
248     "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
249   },
250   {
251     "cmd": [
252       "adb",
253       "shell",
254       "rm",
255       "-rf",
256       "/sdcard/revenge_of_the_skiabot/images"
257     ],
258     "cwd": "[START_DIR]/skia",
259     "infra_step": true,
260     "name": "rm /sdcard/revenge_of_the_skiabot/images"
261   },
262   {
263     "cmd": [
264       "adb",
265       "shell",
266       "mkdir",
267       "-p",
268       "/sdcard/revenge_of_the_skiabot/images"
269     ],
270     "cwd": "[START_DIR]/skia",
271     "infra_step": true,
272     "name": "mkdir /sdcard/revenge_of_the_skiabot/images"
273   },
274   {
275     "cmd": [
276       "python",
277       "-u",
278       "\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",
279       "[START_DIR]/skimage",
280       "/sdcard/revenge_of_the_skiabot/images"
281     ],
282     "infra_step": true,
283     "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images",
284     "~followup_annotations": [
285       "@@@STEP_LOG_LINE@python.inline@@@@",
286       "@@@STEP_LOG_LINE@python.inline@import os@@@",
287       "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
288       "@@@STEP_LOG_LINE@python.inline@import sys@@@",
289       "@@@STEP_LOG_LINE@python.inline@host   = sys.argv[1]@@@",
290       "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@",
291       "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@",
292       "@@@STEP_LOG_LINE@python.inline@  p = os.path.relpath(d, host)@@@",
293       "@@@STEP_LOG_LINE@python.inline@  if p != '.' and p.startswith('.'):@@@",
294       "@@@STEP_LOG_LINE@python.inline@    continue@@@",
295       "@@@STEP_LOG_LINE@python.inline@  for f in fs:@@@",
296       "@@@STEP_LOG_LINE@python.inline@    print os.path.join(p,f)@@@",
297       "@@@STEP_LOG_LINE@python.inline@    subprocess.check_call(['adb', 'push',@@@",
298       "@@@STEP_LOG_LINE@python.inline@                           os.path.realpath(os.path.join(host, p, f)),@@@",
299       "@@@STEP_LOG_LINE@python.inline@                           os.path.join(device, p, f)])@@@",
300       "@@@STEP_LOG_END@python.inline@@@"
301     ]
302   },
303   {
304     "cmd": [
305       "adb",
306       "push",
307       "[START_DIR]/tmp/SK_IMAGE_VERSION",
308       "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
309     ],
310     "cwd": "[START_DIR]/skia",
311     "infra_step": true,
312     "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
313   },
314   {
315     "cmd": [
316       "python",
317       "-u",
318       "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
319       "[START_DIR]/skia/infra/bots/assets/svg/VERSION",
320       "/path/to/tmp/"
321     ],
322     "infra_step": true,
323     "name": "Get downloaded SVG VERSION"
324   },
325   {
326     "cmd": [
327       "python",
328       "-u",
329       "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
330       "42",
331       "[START_DIR]/tmp/SVG_VERSION"
332     ],
333     "infra_step": true,
334     "name": "write SVG_VERSION"
335   },
336   {
337     "cmd": [
338       "adb",
339       "shell",
340       "cat",
341       "/sdcard/revenge_of_the_skiabot/SVG_VERSION"
342     ],
343     "cwd": "[START_DIR]/skia",
344     "infra_step": true,
345     "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION",
346     "stdout": "/path/to/tmp/"
347   },
348   {
349     "cmd": [
350       "adb",
351       "shell",
352       "rm",
353       "-f",
354       "/sdcard/revenge_of_the_skiabot/SVG_VERSION"
355     ],
356     "cwd": "[START_DIR]/skia",
357     "infra_step": true,
358     "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION"
359   },
360   {
361     "cmd": [
362       "adb",
363       "shell",
364       "rm",
365       "-rf",
366       "/sdcard/revenge_of_the_skiabot/svgs"
367     ],
368     "cwd": "[START_DIR]/skia",
369     "infra_step": true,
370     "name": "rm /sdcard/revenge_of_the_skiabot/svgs"
371   },
372   {
373     "cmd": [
374       "adb",
375       "shell",
376       "mkdir",
377       "-p",
378       "/sdcard/revenge_of_the_skiabot/svgs"
379     ],
380     "cwd": "[START_DIR]/skia",
381     "infra_step": true,
382     "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs"
383   },
384   {
385     "cmd": [
386       "python",
387       "-u",
388       "\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",
389       "[START_DIR]/svg",
390       "/sdcard/revenge_of_the_skiabot/svgs"
391     ],
392     "infra_step": true,
393     "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs",
394     "~followup_annotations": [
395       "@@@STEP_LOG_LINE@python.inline@@@@",
396       "@@@STEP_LOG_LINE@python.inline@import os@@@",
397       "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
398       "@@@STEP_LOG_LINE@python.inline@import sys@@@",
399       "@@@STEP_LOG_LINE@python.inline@host   = sys.argv[1]@@@",
400       "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@",
401       "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@",
402       "@@@STEP_LOG_LINE@python.inline@  p = os.path.relpath(d, host)@@@",
403       "@@@STEP_LOG_LINE@python.inline@  if p != '.' and p.startswith('.'):@@@",
404       "@@@STEP_LOG_LINE@python.inline@    continue@@@",
405       "@@@STEP_LOG_LINE@python.inline@  for f in fs:@@@",
406       "@@@STEP_LOG_LINE@python.inline@    print os.path.join(p,f)@@@",
407       "@@@STEP_LOG_LINE@python.inline@    subprocess.check_call(['adb', 'push',@@@",
408       "@@@STEP_LOG_LINE@python.inline@                           os.path.realpath(os.path.join(host, p, f)),@@@",
409       "@@@STEP_LOG_LINE@python.inline@                           os.path.join(device, p, f)])@@@",
410       "@@@STEP_LOG_END@python.inline@@@"
411     ]
412   },
413   {
414     "cmd": [
415       "adb",
416       "push",
417       "[START_DIR]/tmp/SVG_VERSION",
418       "/sdcard/revenge_of_the_skiabot/SVG_VERSION"
419     ],
420     "cwd": "[START_DIR]/skia",
421     "infra_step": true,
422     "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION"
423   },
424   {
425     "cmd": [
426       "adb",
427       "shell",
428       "rm",
429       "-rf",
430       "/sdcard/revenge_of_the_skiabot/perf"
431     ],
432     "cwd": "[START_DIR]/skia",
433     "infra_step": true,
434     "name": "rm /sdcard/revenge_of_the_skiabot/perf"
435   },
436   {
437     "cmd": [
438       "adb",
439       "shell",
440       "mkdir",
441       "-p",
442       "/sdcard/revenge_of_the_skiabot/perf"
443     ],
444     "cwd": "[START_DIR]/skia",
445     "infra_step": true,
446     "name": "mkdir /sdcard/revenge_of_the_skiabot/perf"
447   },
448   {
449     "cmd": [
450       "adb",
451       "push",
452       "[START_DIR]/out/Release/nanobench",
453       "/data/local/tmp/"
454     ],
455     "cwd": "[START_DIR]/skia",
456     "infra_step": true,
457     "name": "push nanobench"
458   },
459   {
460     "cmd": [
461       "python",
462       "-u",
463       "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
464       "set -x; /data/local/tmp/nanobench --undefok -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 --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 nonrendering hwui f16 srgb gles --match ~blurroundrect ~patch_grid ~desk_carsvg ~desk_unicodetable ~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 build_number 5 --key arch x86 compiler Clang cpu_or_gpu GPU cpu_or_gpu_value PowerVR extra_config GN_Android model NexusPlayer os Android; echo $? >/data/local/tmp/rc",
465       "[START_DIR]/tmp/nanobench.sh"
466     ],
467     "infra_step": true,
468     "name": "write nanobench.sh"
469   },
470   {
471     "cmd": [
472       "adb",
473       "push",
474       "[START_DIR]/tmp/nanobench.sh",
475       "/data/local/tmp/"
476     ],
477     "cwd": "[START_DIR]/skia",
478     "infra_step": true,
479     "name": "push nanobench.sh"
480   },
481   {
482     "cmd": [
483       "adb",
484       "logcat",
485       "-c"
486     ],
487     "cwd": "[START_DIR]/skia",
488     "infra_step": true,
489     "name": "clear log"
490   },
491   {
492     "cmd": [
493       "python",
494       "-u",
495       "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh      = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n  sys.exit(int(subprocess.check_output(['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",
496       "/data/local/tmp/",
497       "nanobench.sh"
498     ],
499     "name": "nanobench",
500     "~followup_annotations": [
501       "@@@STEP_LOG_LINE@python.inline@@@@",
502       "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
503       "@@@STEP_LOG_LINE@python.inline@import sys@@@",
504       "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@",
505       "@@@STEP_LOG_LINE@python.inline@sh      = sys.argv[2]@@@",
506       "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@",
507       "@@@STEP_LOG_LINE@python.inline@try:@@@",
508       "@@@STEP_LOG_LINE@python.inline@  sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@",
509       "@@@STEP_LOG_LINE@python.inline@                                        bin_dir + 'rc'])))@@@",
510       "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@",
511       "@@@STEP_LOG_LINE@python.inline@  print \"Couldn't read the return code.  Probably killed for OOM.\"@@@",
512       "@@@STEP_LOG_LINE@python.inline@  sys.exit(1)@@@",
513       "@@@STEP_LOG_END@python.inline@@@"
514     ]
515   },
516   {
517     "cmd": [
518       "python",
519       "-u",
520       "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n  if os.path.exists(path):\n    print \"%s exists but is not a dir\" % path\n    sys.exit(1)\n  os.makedirs(path, mode)\n",
521       "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android/data",
522       "511"
523     ],
524     "name": "makedirs perf_dir",
525     "~followup_annotations": [
526       "@@@STEP_LOG_LINE@python.inline@@@@",
527       "@@@STEP_LOG_LINE@python.inline@import sys, os@@@",
528       "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@",
529       "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@",
530       "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@",
531       "@@@STEP_LOG_LINE@python.inline@  if os.path.exists(path):@@@",
532       "@@@STEP_LOG_LINE@python.inline@    print \"%s exists but is not a dir\" % path@@@",
533       "@@@STEP_LOG_LINE@python.inline@    sys.exit(1)@@@",
534       "@@@STEP_LOG_LINE@python.inline@  os.makedirs(path, mode)@@@",
535       "@@@STEP_LOG_END@python.inline@@@"
536     ]
537   },
538   {
539     "cmd": [
540       "adb",
541       "pull",
542       "/sdcard/revenge_of_the_skiabot/perf",
543       "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android/data"
544     ],
545     "cwd": "[START_DIR]/skia",
546     "infra_step": true,
547     "name": "pull /sdcard/revenge_of_the_skiabot/perf [CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android/data"
548   },
549   {
550     "cmd": [
551       "python",
552       "-u",
553       "\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",
554       "[START_DIR]/out/Release"
555     ],
556     "infra_step": true,
557     "name": "dump log",
558     "~followup_annotations": [
559       "@@@STEP_LOG_LINE@python.inline@@@@",
560       "@@@STEP_LOG_LINE@python.inline@import os@@@",
561       "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
562       "@@@STEP_LOG_LINE@python.inline@import sys@@@",
563       "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@",
564       "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@",
565       "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@",
566       "@@@STEP_LOG_LINE@python.inline@  tokens = line.split()@@@",
567       "@@@STEP_LOG_LINE@python.inline@  if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@",
568       "@@@STEP_LOG_LINE@python.inline@    addr, path = tokens[-2:]@@@",
569       "@@@STEP_LOG_LINE@python.inline@    local = os.path.join(out, os.path.basename(path))@@@",
570       "@@@STEP_LOG_LINE@python.inline@    if os.path.exists(local):@@@",
571       "@@@STEP_LOG_LINE@python.inline@      sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@",
572       "@@@STEP_LOG_LINE@python.inline@      line = line.replace(addr, addr + ' ' + sym.strip())@@@",
573       "@@@STEP_LOG_LINE@python.inline@  print line@@@",
574       "@@@STEP_LOG_END@python.inline@@@"
575     ]
576   },
577   {
578     "cmd": [
579       "adb",
580       "kill-server"
581     ],
582     "cwd": "[START_DIR]/skia",
583     "infra_step": true,
584     "name": "kill adb server"
585   },
586   {
587     "name": "$result",
588     "recipe_result": null,
589     "status_code": 0
590   }
591 ]