OLD | NEW |
1 [ | 1 [ |
2 { | 2 { |
3 "cmd": [ | 3 "cmd": [ |
4 "python", | 4 "python", |
5 "-u", | 5 "-u", |
6 "\nimport os\nimport sys\nos.remove(sys.argv[1])\n", | 6 "\nimport os\nimport sys\nos.remove(sys.argv[1])\n", |
7 "bar" | 7 "bar" |
8 ], | 8 ], |
9 "cwd": "[SLAVE_BUILD]", | |
10 "name": "foo", | 9 "name": "foo", |
11 "~followup_annotations": [ | 10 "~followup_annotations": [ |
12 "@@@STEP_LOG_LINE@python.inline@@@@", | 11 "@@@STEP_LOG_LINE@python.inline@@@@", |
13 "@@@STEP_LOG_LINE@python.inline@import os@@@", | 12 "@@@STEP_LOG_LINE@python.inline@import os@@@", |
14 "@@@STEP_LOG_LINE@python.inline@import sys@@@", | 13 "@@@STEP_LOG_LINE@python.inline@import sys@@@", |
15 "@@@STEP_LOG_LINE@python.inline@os.remove(sys.argv[1])@@@", | 14 "@@@STEP_LOG_LINE@python.inline@os.remove(sys.argv[1])@@@", |
16 "@@@STEP_LOG_END@python.inline@@@" | 15 "@@@STEP_LOG_END@python.inline@@@" |
17 ] | 16 ] |
18 }, | 17 }, |
19 { | 18 { |
20 "cmd": [ | 19 "cmd": [ |
21 "python", | 20 "python", |
22 "-u", | 21 "-u", |
23 "\nimport json, os, sys\nif os.path.exists(sys.argv[1]) and os.path.isdir(
sys.argv[1]):\n with open(sys.argv[2], 'w') as f:\n json.dump(os.listdir(sys
.argv[1]), f)\n", | 22 "\nimport json, os, sys\nif os.path.exists(sys.argv[1]) and os.path.isdir(
sys.argv[1]):\n with open(sys.argv[2], 'w') as f:\n json.dump(os.listdir(sys
.argv[1]), f)\n", |
24 "/fake/dir", | 23 "/fake/dir", |
25 "/path/to/tmp/json" | 24 "/path/to/tmp/json" |
26 ], | 25 ], |
27 "cwd": "[SLAVE_BUILD]", | |
28 "name": "listdir fake dir", | 26 "name": "listdir fake dir", |
29 "~followup_annotations": [ | 27 "~followup_annotations": [ |
30 "@@@STEP_LOG_LINE@json.output@[@@@", | 28 "@@@STEP_LOG_LINE@json.output@[@@@", |
31 "@@@STEP_LOG_LINE@json.output@ \"file 1\", @@@", | 29 "@@@STEP_LOG_LINE@json.output@ \"file 1\", @@@", |
32 "@@@STEP_LOG_LINE@json.output@ \"file 2\"@@@", | 30 "@@@STEP_LOG_LINE@json.output@ \"file 2\"@@@", |
33 "@@@STEP_LOG_LINE@json.output@]@@@", | 31 "@@@STEP_LOG_LINE@json.output@]@@@", |
34 "@@@STEP_LOG_END@json.output@@@", | 32 "@@@STEP_LOG_END@json.output@@@", |
35 "@@@STEP_LOG_LINE@python.inline@@@@", | 33 "@@@STEP_LOG_LINE@python.inline@@@@", |
36 "@@@STEP_LOG_LINE@python.inline@import json, os, sys@@@", | 34 "@@@STEP_LOG_LINE@python.inline@import json, os, sys@@@", |
37 "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]) and os.path
.isdir(sys.argv[1]):@@@", | 35 "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]) and os.path
.isdir(sys.argv[1]):@@@", |
38 "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[2], 'w') as f:@@@", | 36 "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[2], 'w') as f:@@@", |
39 "@@@STEP_LOG_LINE@python.inline@ json.dump(os.listdir(sys.argv[1]), f)@
@@", | 37 "@@@STEP_LOG_LINE@python.inline@ json.dump(os.listdir(sys.argv[1]), f)@
@@", |
40 "@@@STEP_LOG_END@python.inline@@@" | 38 "@@@STEP_LOG_END@python.inline@@@" |
41 ] | 39 ] |
42 }, | 40 }, |
43 { | 41 { |
44 "cmd": [ | 42 "cmd": [ |
45 "some", | 43 "some", |
46 "command" | 44 "command" |
47 ], | 45 ], |
48 "cwd": "[SLAVE_BUILD]", | |
49 "name": "manipulate file 1" | 46 "name": "manipulate file 1" |
50 }, | 47 }, |
51 { | 48 { |
52 "cmd": [ | 49 "cmd": [ |
53 "some", | 50 "some", |
54 "command" | 51 "command" |
55 ], | 52 ], |
56 "cwd": "[SLAVE_BUILD]", | |
57 "name": "manipulate file 2" | 53 "name": "manipulate file 2" |
58 }, | 54 }, |
59 { | 55 { |
60 "cmd": [ | 56 "cmd": [ |
61 "echo", | 57 "echo", |
62 "[TMP_BASE]/prefix_a_tmp_1" | 58 "[TMP]/prefix_a_tmp_1" |
63 ], | 59 ], |
64 "cwd": "[SLAVE_BUILD]", | |
65 "name": "print prefix_a" | 60 "name": "print prefix_a" |
66 }, | 61 }, |
67 { | 62 { |
68 "cmd": [ | 63 "cmd": [ |
69 "echo", | 64 "echo", |
70 "[TMP_BASE]/prefix_b_tmp_2" | 65 "[TMP]/prefix_b_tmp_2" |
71 ], | 66 ], |
72 "cwd": "[SLAVE_BUILD]", | |
73 "name": "print prefix_b" | 67 "name": "print prefix_b" |
74 }, | 68 }, |
75 { | 69 { |
76 "cmd": [ | 70 "cmd": [ |
77 "python", | 71 "python", |
78 "-u", | 72 "-u", |
79 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", | 73 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", |
80 "abcde", | 74 "abcde", |
81 "tmp_file.txt" | 75 "tmp_file.txt" |
82 ], | 76 ], |
83 "cwd": "[SLAVE_BUILD]", | |
84 "name": "write_simple" | 77 "name": "write_simple" |
85 }, | 78 }, |
86 { | 79 { |
87 "cmd": [ | 80 "cmd": [ |
88 "python", | 81 "python", |
89 "-u", | 82 "-u", |
90 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", | 83 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", |
91 "tmp_file.txt", | 84 "tmp_file.txt", |
92 "/path/to/tmp/" | 85 "/path/to/tmp/" |
93 ], | 86 ], |
94 "cwd": "[SLAVE_BUILD]", | |
95 "name": "read_simple" | 87 "name": "read_simple" |
96 }, | 88 }, |
97 { | 89 { |
98 "cmd": [ | 90 "cmd": [ |
99 "python", | 91 "python", |
100 "-u", | 92 "-u", |
101 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", | 93 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", |
102 "! ~&&", | 94 "! ~&&", |
103 "tmp_file.txt" | 95 "tmp_file.txt" |
104 ], | 96 ], |
105 "cwd": "[SLAVE_BUILD]", | |
106 "name": "write_symbols" | 97 "name": "write_symbols" |
107 }, | 98 }, |
108 { | 99 { |
109 "cmd": [ | 100 "cmd": [ |
110 "python", | 101 "python", |
111 "-u", | 102 "-u", |
112 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", | 103 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", |
113 "tmp_file.txt", | 104 "tmp_file.txt", |
114 "/path/to/tmp/" | 105 "/path/to/tmp/" |
115 ], | 106 ], |
116 "cwd": "[SLAVE_BUILD]", | |
117 "name": "read_symbols" | 107 "name": "read_symbols" |
118 }, | 108 }, |
119 { | 109 { |
120 "cmd": [ | 110 "cmd": [ |
121 "python", | 111 "python", |
122 "-u", | 112 "-u", |
123 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", | 113 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", |
124 "abcde fgh", | 114 "abcde fgh", |
125 "tmp_file.txt" | 115 "tmp_file.txt" |
126 ], | 116 ], |
127 "cwd": "[SLAVE_BUILD]", | |
128 "name": "write_spaces" | 117 "name": "write_spaces" |
129 }, | 118 }, |
130 { | 119 { |
131 "cmd": [ | 120 "cmd": [ |
132 "python", | 121 "python", |
133 "-u", | 122 "-u", |
134 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", | 123 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", |
135 "tmp_file.txt", | 124 "tmp_file.txt", |
136 "/path/to/tmp/" | 125 "/path/to/tmp/" |
137 ], | 126 ], |
138 "cwd": "[SLAVE_BUILD]", | |
139 "name": "read_spaces" | 127 "name": "read_spaces" |
140 }, | 128 }, |
141 { | 129 { |
142 "cmd": [ | 130 "cmd": [ |
143 "python", | 131 "python", |
144 "-u", | 132 "-u", |
145 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", | 133 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", |
146 "ab\ncd\nefg\n", | 134 "ab\ncd\nefg\n", |
147 "tmp_file.txt" | 135 "tmp_file.txt" |
148 ], | 136 ], |
149 "cwd": "[SLAVE_BUILD]", | |
150 "name": "write_multiline" | 137 "name": "write_multiline" |
151 }, | 138 }, |
152 { | 139 { |
153 "cmd": [ | 140 "cmd": [ |
154 "python", | 141 "python", |
155 "-u", | 142 "-u", |
156 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", | 143 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", |
157 "tmp_file.txt", | 144 "tmp_file.txt", |
158 "/path/to/tmp/" | 145 "/path/to/tmp/" |
159 ], | 146 ], |
160 "cwd": "[SLAVE_BUILD]", | |
161 "name": "read_multiline" | 147 "name": "read_multiline" |
162 }, | 148 }, |
163 { | 149 { |
164 "cmd": [ | 150 "cmd": [ |
165 "python", | 151 "python", |
166 "-u", | 152 "-u", |
167 "\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", | 153 "\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", |
168 "[SLAVE_BUILD]/copytree_example_tmp", | 154 "[TMP]/copytree_example_tmp", |
169 "511" | 155 "511" |
170 ], | 156 ], |
171 "cwd": "[SLAVE_BUILD]", | |
172 "name": "makedirs makedirs", | 157 "name": "makedirs makedirs", |
173 "~followup_annotations": [ | 158 "~followup_annotations": [ |
174 "@@@STEP_LOG_LINE@python.inline@@@@", | 159 "@@@STEP_LOG_LINE@python.inline@@@@", |
175 "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", | 160 "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", |
176 "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", | 161 "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", |
177 "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", | 162 "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", |
178 "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", | 163 "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", |
179 "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", | 164 "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", |
180 "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" %
path@@@", | 165 "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" %
path@@@", |
181 "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", | 166 "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", |
182 "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", | 167 "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", |
183 "@@@STEP_LOG_END@python.inline@@@" | 168 "@@@STEP_LOG_END@python.inline@@@" |
184 ] | 169 ] |
185 }, | 170 }, |
186 { | 171 { |
187 "cmd": [ | 172 "cmd": [ |
188 "python", | 173 "python", |
189 "-u", | 174 "-u", |
190 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", | 175 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", |
191 "some file content", | 176 "some file content", |
192 "[SLAVE_BUILD]/copytree_example_tmp/dummy_file" | 177 "[TMP]/copytree_example_tmp/dummy_file" |
193 ], | 178 ], |
194 "cwd": "[SLAVE_BUILD]", | 179 "name": "write [TMP]/copytree_example_tmp/dummy_file" |
195 "name": "write [SLAVE_BUILD]/copytree_example_tmp/dummy_file" | |
196 }, | 180 }, |
197 { | 181 { |
198 "cmd": [ | 182 "cmd": [ |
199 "python", | 183 "python", |
200 "-u", | 184 "-u", |
201 "\nimport shutil\nimport sys\nshutil.copytree(sys.argv[1], sys.argv[2], sy
mlinks=bool(sys.argv[3]))\n", | 185 "\nimport shutil\nimport sys\nshutil.copytree(sys.argv[1], sys.argv[2], sy
mlinks=bool(sys.argv[3]))\n", |
202 "[SLAVE_BUILD]/copytree_example_tmp", | 186 "[TMP]/copytree_example_tmp", |
203 "[SLAVE_BUILD]/copytree_example_tmp2", | 187 "[TMP]/copytree_example_tmp2", |
204 "0" | 188 "0" |
205 ], | 189 ], |
206 "cwd": "[SLAVE_BUILD]", | |
207 "name": "copytree" | 190 "name": "copytree" |
208 }, | 191 }, |
209 { | 192 { |
210 "cmd": [ | 193 "cmd": [ |
211 "python", | 194 "python", |
212 "-u", | 195 "-u", |
213 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", | 196 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", |
214 "[SLAVE_BUILD]/copytree_example_tmp2/dummy_file", | 197 "[TMP]/copytree_example_tmp2/dummy_file", |
215 "/path/to/tmp/" | 198 "/path/to/tmp/" |
216 ], | 199 ], |
217 "cwd": "[SLAVE_BUILD]", | 200 "name": "read [TMP]/copytree_example_tmp2/dummy_file" |
218 "name": "read [SLAVE_BUILD]/copytree_example_tmp2/dummy_file" | |
219 }, | 201 }, |
220 { | 202 { |
221 "cmd": [ | 203 "cmd": [ |
222 "python", | 204 "python", |
223 "-u", | 205 "-u", |
224 "\nimport glob\nimport sys\nwith open(sys.argv[1], 'w') as f:\n f.write('
\\n'.join(glob.glob(sys.argv[2])))\n", | 206 "\nimport glob\nimport sys\nwith open(sys.argv[1], 'w') as f:\n f.write('
\\n'.join(glob.glob(sys.argv[2])))\n", |
225 "/path/to/tmp/", | 207 "/path/to/tmp/", |
226 "[SLAVE_BUILD]/copytree_example_tmp/*" | 208 "[TMP]/copytree_example_tmp/*" |
227 ], | 209 ], |
228 "cwd": "[SLAVE_BUILD]", | |
229 "name": "glob" | 210 "name": "glob" |
230 }, | 211 }, |
231 { | 212 { |
232 "cmd": [ | 213 "cmd": [ |
233 "python", | 214 "python", |
234 "-u", | 215 "-u", |
235 "\nimport shutil, sys\nshutil.rmtree(sys.argv[1])\n", | 216 "\nimport shutil, sys\nshutil.rmtree(sys.argv[1])\n", |
236 "[SLAVE_BUILD]/copytree_example_tmp" | 217 "[TMP]/copytree_example_tmp" |
237 ], | 218 ], |
238 "cwd": "[SLAVE_BUILD]", | |
239 "name": "cleanup", | 219 "name": "cleanup", |
240 "~followup_annotations": [ | 220 "~followup_annotations": [ |
241 "@@@STEP_LOG_LINE@python.inline@@@@", | 221 "@@@STEP_LOG_LINE@python.inline@@@@", |
242 "@@@STEP_LOG_LINE@python.inline@import shutil, sys@@@", | 222 "@@@STEP_LOG_LINE@python.inline@import shutil, sys@@@", |
243 "@@@STEP_LOG_LINE@python.inline@shutil.rmtree(sys.argv[1])@@@", | 223 "@@@STEP_LOG_LINE@python.inline@shutil.rmtree(sys.argv[1])@@@", |
244 "@@@STEP_LOG_END@python.inline@@@" | 224 "@@@STEP_LOG_END@python.inline@@@" |
245 ] | 225 ] |
246 }, | 226 }, |
247 { | 227 { |
248 "cmd": [ | 228 "cmd": [ |
249 "python", | 229 "python", |
250 "-u", | 230 "-u", |
251 "\nimport shutil, sys\nshutil.rmtree(sys.argv[1])\n", | 231 "\nimport shutil, sys\nshutil.rmtree(sys.argv[1])\n", |
252 "[SLAVE_BUILD]/copytree_example_tmp2" | 232 "[TMP]/copytree_example_tmp2" |
253 ], | 233 ], |
254 "cwd": "[SLAVE_BUILD]", | |
255 "name": "cleanup2", | 234 "name": "cleanup2", |
256 "~followup_annotations": [ | 235 "~followup_annotations": [ |
257 "@@@STEP_LOG_LINE@python.inline@@@@", | 236 "@@@STEP_LOG_LINE@python.inline@@@@", |
258 "@@@STEP_LOG_LINE@python.inline@import shutil, sys@@@", | 237 "@@@STEP_LOG_LINE@python.inline@import shutil, sys@@@", |
259 "@@@STEP_LOG_LINE@python.inline@shutil.rmtree(sys.argv[1])@@@", | 238 "@@@STEP_LOG_LINE@python.inline@shutil.rmtree(sys.argv[1])@@@", |
260 "@@@STEP_LOG_END@python.inline@@@" | 239 "@@@STEP_LOG_END@python.inline@@@" |
261 ] | 240 ] |
262 }, | 241 }, |
263 { | 242 { |
264 "name": "$result", | 243 "name": "$result", |
265 "recipe_result": null, | 244 "recipe_result": null, |
266 "status_code": 0 | 245 "status_code": 0 |
267 } | 246 } |
268 ] | 247 ] |
OLD | NEW |