4f62b1e4d8714af0452b8acab1c139fd4d123129
[platform/upstream/libSkiaSharp.git] /
1 [
2   {
3     "cmd": [
4       "python",
5       "-u",
6       "\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",
7       "[SLAVE_BUILD]/tmp",
8       "511"
9     ],
10     "name": "makedirs tmp_dir",
11     "~followup_annotations": [
12       "@@@STEP_LOG_LINE@python.inline@@@@",
13       "@@@STEP_LOG_LINE@python.inline@import sys, os@@@",
14       "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@",
15       "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@",
16       "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@",
17       "@@@STEP_LOG_LINE@python.inline@  if os.path.exists(path):@@@",
18       "@@@STEP_LOG_LINE@python.inline@    print \"%s exists but is not a dir\" % path@@@",
19       "@@@STEP_LOG_LINE@python.inline@    sys.exit(1)@@@",
20       "@@@STEP_LOG_LINE@python.inline@  os.makedirs(path, mode)@@@",
21       "@@@STEP_LOG_END@python.inline@@@"
22     ]
23   },
24   {
25     "cmd": [
26       "adb",
27       "shell",
28       "mkdir",
29       "-p",
30       "/sdcard/revenge_of_the_skiabot/resources"
31     ],
32     "cwd": "[SLAVE_BUILD]/skia",
33     "name": "mkdir /sdcard/revenge_of_the_skiabot/resources"
34   },
35   {
36     "cmd": [
37       "python",
38       "-u",
39       "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
40       "[SLAVE_BUILD]/skia/infra/bots/assets/skp/VERSION",
41       "/path/to/tmp/"
42     ],
43     "name": "Get downloaded SKP VERSION"
44   },
45   {
46     "cmd": [
47       "python",
48       "-u",
49       "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
50       "42",
51       "[SLAVE_BUILD]/tmp/SKP_VERSION"
52     ],
53     "name": "write SKP_VERSION"
54   },
55   {
56     "cmd": [
57       "adb",
58       "shell",
59       "cat",
60       "/sdcard/revenge_of_the_skiabot/SKP_VERSION"
61     ],
62     "cwd": "[SLAVE_BUILD]/skia",
63     "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION",
64     "stdout": "/path/to/tmp/"
65   },
66   {
67     "cmd": [
68       "adb",
69       "shell",
70       "rm",
71       "-f",
72       "/sdcard/revenge_of_the_skiabot/SKP_VERSION"
73     ],
74     "cwd": "[SLAVE_BUILD]/skia",
75     "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION"
76   },
77   {
78     "cmd": [
79       "adb",
80       "shell",
81       "rm",
82       "-rf",
83       "/sdcard/revenge_of_the_skiabot/skps"
84     ],
85     "cwd": "[SLAVE_BUILD]/skia",
86     "name": "rm /sdcard/revenge_of_the_skiabot/skps"
87   },
88   {
89     "cmd": [
90       "adb",
91       "shell",
92       "mkdir",
93       "-p",
94       "/sdcard/revenge_of_the_skiabot/skps"
95     ],
96     "cwd": "[SLAVE_BUILD]/skia",
97     "name": "mkdir /sdcard/revenge_of_the_skiabot/skps"
98   },
99   {
100     "cmd": [
101       "python",
102       "-u",
103       "\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",
104       "[SLAVE_BUILD]/skp",
105       "/sdcard/revenge_of_the_skiabot/skps"
106     ],
107     "cwd": "[SLAVE_BUILD]/skia",
108     "name": "push [SLAVE_BUILD]/skp/* /sdcard/revenge_of_the_skiabot/skps",
109     "~followup_annotations": [
110       "@@@STEP_LOG_LINE@python.inline@@@@",
111       "@@@STEP_LOG_LINE@python.inline@import os@@@",
112       "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
113       "@@@STEP_LOG_LINE@python.inline@import sys@@@",
114       "@@@STEP_LOG_LINE@python.inline@host   = sys.argv[1]@@@",
115       "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@",
116       "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@",
117       "@@@STEP_LOG_LINE@python.inline@  p = os.path.relpath(d, host)@@@",
118       "@@@STEP_LOG_LINE@python.inline@  if p != '.' and p.startswith('.'):@@@",
119       "@@@STEP_LOG_LINE@python.inline@    continue@@@",
120       "@@@STEP_LOG_LINE@python.inline@  for f in fs:@@@",
121       "@@@STEP_LOG_LINE@python.inline@    print os.path.join(p,f)@@@",
122       "@@@STEP_LOG_LINE@python.inline@    subprocess.check_call(['adb', 'push',@@@",
123       "@@@STEP_LOG_LINE@python.inline@                           os.path.realpath(os.path.join(host, p, f)),@@@",
124       "@@@STEP_LOG_LINE@python.inline@                           os.path.join(device, p, f)])@@@",
125       "@@@STEP_LOG_END@python.inline@@@"
126     ]
127   },
128   {
129     "cmd": [
130       "adb",
131       "push",
132       "[SLAVE_BUILD]/tmp/SKP_VERSION",
133       "/sdcard/revenge_of_the_skiabot/SKP_VERSION"
134     ],
135     "cwd": "[SLAVE_BUILD]/skia",
136     "name": "push [SLAVE_BUILD]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION"
137   },
138   {
139     "cmd": [
140       "adb",
141       "push",
142       "[SLAVE_BUILD]/out/Release/skpbench",
143       "/data/local/tmp/"
144     ],
145     "cwd": "[SLAVE_BUILD]/skia",
146     "name": "push skpbench"
147   },
148   {
149     "cmd": [
150       "python",
151       "-u",
152       "[SLAVE_BUILD]/skia/tools/skpbench/skpbench.py",
153       "/data/local/tmp/skpbench",
154       "/sdcard/revenge_of_the_skiabot/skps",
155       "--adb",
156       "--resultsfile",
157       "[CUSTOM_[SWARM_OUT_DIR]]/table",
158       "--config",
159       "gpu,esinst4"
160     ],
161     "name": "skpbench"
162   },
163   {
164     "cmd": [
165       "python",
166       "-u",
167       "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n"
168     ],
169     "name": "get swarming bot id",
170     "stdout": "/path/to/tmp/",
171     "~followup_annotations": [
172       "@@@STEP_LOG_LINE@python.inline@import os@@@",
173       "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@",
174       "@@@STEP_LOG_END@python.inline@@@"
175     ]
176   },
177   {
178     "cmd": [
179       "python",
180       "-u",
181       "import os\nprint os.environ.get('SWARMING_TASK_ID', '')\n"
182     ],
183     "name": "get swarming task id",
184     "stdout": "/path/to/tmp/",
185     "~followup_annotations": [
186       "@@@STEP_LOG_LINE@python.inline@import os@@@",
187       "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_TASK_ID', '')@@@",
188       "@@@STEP_LOG_END@python.inline@@@"
189     ]
190   },
191   {
192     "cmd": [
193       "python",
194       "-u",
195       "\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",
196       "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench/data",
197       "511"
198     ],
199     "name": "makedirs perf_dir",
200     "~followup_annotations": [
201       "@@@STEP_LOG_LINE@python.inline@@@@",
202       "@@@STEP_LOG_LINE@python.inline@import sys, os@@@",
203       "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@",
204       "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@",
205       "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@",
206       "@@@STEP_LOG_LINE@python.inline@  if os.path.exists(path):@@@",
207       "@@@STEP_LOG_LINE@python.inline@    print \"%s exists but is not a dir\" % path@@@",
208       "@@@STEP_LOG_LINE@python.inline@    sys.exit(1)@@@",
209       "@@@STEP_LOG_LINE@python.inline@  os.makedirs(path, mode)@@@",
210       "@@@STEP_LOG_END@python.inline@@@"
211     ]
212   },
213   {
214     "cmd": [
215       "python",
216       "-u",
217       "[SLAVE_BUILD]/skia/tools/skpbench/skiaperf.py",
218       "[CUSTOM_[SWARM_OUT_DIR]]/table",
219       "--properties",
220       "gitHash",
221       "abc123",
222       "build_number",
223       "5",
224       "no_buildbot",
225       "True",
226       "swarming_bot_id",
227       "skia-bot-123",
228       "swarming_task_id",
229       "123456",
230       "--outfile",
231       "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench/data/skpbench_abc123_1337000001.json",
232       "--key",
233       "arch",
234       "arm64",
235       "compiler",
236       "Clang",
237       "cpu_or_gpu",
238       "GPU",
239       "cpu_or_gpu_value",
240       "TegraX1",
241       "extra_config",
242       "GN_Android_Skpbench",
243       "model",
244       "PixelC",
245       "os",
246       "Android"
247     ],
248     "name": "Parse skpbench output into Perf json"
249   },
250   {
251     "cmd": [
252       "python",
253       "-u",
254       "\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",
255       "[SLAVE_BUILD]/out/Release"
256     ],
257     "name": "dump log",
258     "~followup_annotations": [
259       "@@@STEP_LOG_LINE@python.inline@@@@",
260       "@@@STEP_LOG_LINE@python.inline@import os@@@",
261       "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
262       "@@@STEP_LOG_LINE@python.inline@import sys@@@",
263       "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@",
264       "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@",
265       "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@",
266       "@@@STEP_LOG_LINE@python.inline@  tokens = line.split()@@@",
267       "@@@STEP_LOG_LINE@python.inline@  if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@",
268       "@@@STEP_LOG_LINE@python.inline@    addr, path = tokens[-2:]@@@",
269       "@@@STEP_LOG_LINE@python.inline@    local = os.path.join(out, os.path.basename(path))@@@",
270       "@@@STEP_LOG_LINE@python.inline@    if os.path.exists(local):@@@",
271       "@@@STEP_LOG_LINE@python.inline@      sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@",
272       "@@@STEP_LOG_LINE@python.inline@      line = line.replace(addr, addr + ' ' + sym.strip())@@@",
273       "@@@STEP_LOG_LINE@python.inline@  print line@@@",
274       "@@@STEP_LOG_END@python.inline@@@"
275     ]
276   },
277   {
278     "cmd": [
279       "adb",
280       "kill-server"
281     ],
282     "cwd": "[SLAVE_BUILD]/skia",
283     "name": "kill adb server"
284   },
285   {
286     "name": "$result",
287     "recipe_result": null,
288     "status_code": 0
289   }
290 ]