Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: scripts/slave/recipe_modules/file/example.expected/file_io.json

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

Powered by Google App Engine
This is Rietveld 408576698