blob: 5a54a616b7abd02b4f0d5c8eaad93ad89c31199b [file] [log] [blame]
Kevin Lubickb03b5ac2016-11-14 13:42:27 -05001[
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",
Ravi Mistry9bcca6a2016-11-21 16:06:19 -05007 "[START_DIR]/tmp",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -05008 "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 ],
Ravi Mistry9bcca6a2016-11-21 16:06:19 -050032 "cwd": "[START_DIR]/skia",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -050033 "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",
Ravi Mistry9bcca6a2016-11-21 16:06:19 -050040 "[START_DIR]/skia/infra/bots/assets/skp/VERSION",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -050041 "/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",
Ravi Mistry9bcca6a2016-11-21 16:06:19 -050051 "[START_DIR]/tmp/SKP_VERSION"
Kevin Lubickb03b5ac2016-11-14 13:42:27 -050052 ],
53 "name": "write SKP_VERSION"
54 },
55 {
56 "cmd": [
57 "adb",
58 "shell",
59 "cat",
60 "/sdcard/revenge_of_the_skiabot/SKP_VERSION"
61 ],
Ravi Mistry9bcca6a2016-11-21 16:06:19 -050062 "cwd": "[START_DIR]/skia",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -050063 "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 ],
Ravi Mistry9bcca6a2016-11-21 16:06:19 -050074 "cwd": "[START_DIR]/skia",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -050075 "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 ],
Ravi Mistry9bcca6a2016-11-21 16:06:19 -050085 "cwd": "[START_DIR]/skia",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -050086 "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 ],
Ravi Mistry9bcca6a2016-11-21 16:06:19 -050096 "cwd": "[START_DIR]/skia",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -050097 "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",
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500104 "[START_DIR]/skp",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500105 "/sdcard/revenge_of_the_skiabot/skps"
106 ],
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500107 "cwd": "[START_DIR]/skia",
108 "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500109 "~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",
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500132 "[START_DIR]/tmp/SKP_VERSION",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500133 "/sdcard/revenge_of_the_skiabot/SKP_VERSION"
134 ],
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500135 "cwd": "[START_DIR]/skia",
136 "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION"
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500137 },
138 {
139 "cmd": [
140 "adb",
141 "push",
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500142 "[START_DIR]/out/Release/skpbench",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500143 "/data/local/tmp/"
144 ],
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500145 "cwd": "[START_DIR]/skia",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500146 "name": "push skpbench"
147 },
148 {
149 "cmd": [
150 "python",
151 "-u",
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500152 "[START_DIR]/skia/tools/skpbench/skpbench.py",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500153 "/data/local/tmp/skpbench",
154 "/sdcard/revenge_of_the_skiabot/skps",
155 "--adb",
156 "--resultsfile",
157 "[CUSTOM_[SWARM_OUT_DIR]]/table",
158 "--config",
Kevin Lubickcb677662016-11-16 14:07:17 -0500159 "vk"
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500160 ],
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",
Kevin Lubickcb677662016-11-16 14:07:17 -0500196 "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Vulkan_Skpbench/data",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500197 "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",
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500217 "[START_DIR]/skia/tools/skpbench/skiaperf.py",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500218 "[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",
Kevin Lubickcb677662016-11-16 14:07:17 -0500231 "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Vulkan_Skpbench/data/skpbench_abc123_1337000001.json",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500232 "--key",
233 "arch",
234 "arm64",
235 "compiler",
236 "Clang",
237 "cpu_or_gpu",
Kevin Lubickcb677662016-11-16 14:07:17 -0500238 "GPU",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500239 "cpu_or_gpu_value",
240 "TegraX1",
241 "extra_config",
Kevin Lubickcb677662016-11-16 14:07:17 -0500242 "GN_Android_Vulkan_Skpbench",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500243 "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",
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500255 "[START_DIR]/out/Release"
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500256 ],
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 ],
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500282 "cwd": "[START_DIR]/skia",
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500283 "name": "kill adb server"
284 },
285 {
286 "name": "$result",
287 "recipe_result": null,
288 "status_code": 0
289 }
290]