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

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

Issue 1917243002: Revert "build: roll infra_paths changes" (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 8 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
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]/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]/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 # Error? See https://crbu g.com/584783.\n\nchromium_utils.RemoveFilesWildcards(sys.argv[1], root=sys.argv[ 2])\n", 62 "\nimport sys\nfrom common import chromium_utils # Error? See https://crbu g.com/584783.\n\nchromium_utils.RemoveFilesWildcards(sys.argv[1], root=sys.argv[ 2])\n",
58 "*.o", 63 "*.o",
59 "[CWD]" 64 "[SLAVE_BUILD]"
60 ], 65 ],
61 "name": "rmwildcard *.o in [CWD]", 66 "cwd": "[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 # Error? See https://crbug.com/584783.@@@", 71 "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@",
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 "[CWD]/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 "[CWD]/copytree_example_tmp/dummy_file" 194 "[SLAVE_BUILD]/copytree_example_tmp/dummy_file"
180 ], 195 ],
181 "name": "write [CWD]/copytree_example_tmp/dummy_file" 196 "cwd": "[SLAVE_BUILD]",
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], sy mlinks=bool(sys.argv[3]))\n", 203 "\nimport shutil\nimport sys\nshutil.copytree(sys.argv[1], sys.argv[2], sy mlinks=bool(sys.argv[3]))\n",
188 "[CWD]/copytree_example_tmp", 204 "[SLAVE_BUILD]/copytree_example_tmp",
189 "[CWD]/copytree_example_tmp2", 205 "[SLAVE_BUILD]/copytree_example_tmp2",
190 "0" 206 "0"
191 ], 207 ],
208 "cwd": "[SLAVE_BUILD]",
192 "name": "copytree" 209 "name": "copytree"
193 }, 210 },
194 { 211 {
195 "cmd": [ 212 "cmd": [
196 "python", 213 "python",
197 "-u", 214 "-u",
198 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", 215 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
199 "[CWD]/copytree_example_tmp2/dummy_file", 216 "[SLAVE_BUILD]/copytree_example_tmp2/dummy_file",
200 "/path/to/tmp/" 217 "/path/to/tmp/"
201 ], 218 ],
202 "name": "read [CWD]/copytree_example_tmp2/dummy_file" 219 "cwd": "[SLAVE_BUILD]",
220 "name": "read [SLAVE_BUILD]/copytree_example_tmp2/dummy_file"
203 }, 221 },
204 { 222 {
205 "cmd": [ 223 "cmd": [
206 "python", 224 "python",
207 "-u", 225 "-u",
208 "\nimport glob\nimport sys\nwith open(sys.argv[1], 'w') as f:\n f.write(' \\n'.join(glob.glob(sys.argv[2])))\n", 226 "\nimport glob\nimport sys\nwith open(sys.argv[1], 'w') as f:\n f.write(' \\n'.join(glob.glob(sys.argv[2])))\n",
209 "/path/to/tmp/", 227 "/path/to/tmp/",
210 "[CWD]/copytree_example_tmp/*" 228 "[SLAVE_BUILD]/copytree_example_tmp/*"
211 ], 229 ],
230 "cwd": "[SLAVE_BUILD]",
212 "name": "glob" 231 "name": "glob"
213 }, 232 },
214 { 233 {
215 "cmd": [ 234 "cmd": [
216 "python", 235 "python",
217 "-u", 236 "-u",
218 "\nimport os, sys\nfrom common import chromium_utils # Error? See https:// crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveD irectory(sys.argv[1])\n", 237 "\nimport os, sys\nfrom common import chromium_utils # Error? See https:// crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveD irectory(sys.argv[1])\n",
219 "[CWD]/copytree_example_tmp" 238 "[SLAVE_BUILD]/copytree_example_tmp"
220 ], 239 ],
240 "cwd": "[SLAVE_BUILD]",
221 "name": "rmtree cleanup", 241 "name": "rmtree cleanup",
222 "~followup_annotations": [ 242 "~followup_annotations": [
223 "@@@STEP_LOG_LINE@python.inline@@@@", 243 "@@@STEP_LOG_LINE@python.inline@@@@",
224 "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", 244 "@@@STEP_LOG_LINE@python.inline@import os, sys@@@",
225 "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", 245 "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@",
226 "@@@STEP_LOG_LINE@python.inline@@@@", 246 "@@@STEP_LOG_LINE@python.inline@@@@",
227 "@@@STEP_LOG_LINE@python.inline@@@@", 247 "@@@STEP_LOG_LINE@python.inline@@@@",
228 "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", 248 "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@",
229 "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[ 1])@@@", 249 "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[ 1])@@@",
230 "@@@STEP_LOG_END@python.inline@@@" 250 "@@@STEP_LOG_END@python.inline@@@"
231 ] 251 ]
232 }, 252 },
233 { 253 {
234 "cmd": [ 254 "cmd": [
235 "python", 255 "python",
236 "-u", 256 "-u",
237 "\nimport os, sys\nfrom common import chromium_utils # Error? See https:// crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveD irectory(sys.argv[1])\n", 257 "\nimport os, sys\nfrom common import chromium_utils # Error? See https:// crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveD irectory(sys.argv[1])\n",
238 "[CWD]/copytree_example_tmp2" 258 "[SLAVE_BUILD]/copytree_example_tmp2"
239 ], 259 ],
260 "cwd": "[SLAVE_BUILD]",
240 "name": "rmtree cleanup2", 261 "name": "rmtree cleanup2",
241 "~followup_annotations": [ 262 "~followup_annotations": [
242 "@@@STEP_LOG_LINE@python.inline@@@@", 263 "@@@STEP_LOG_LINE@python.inline@@@@",
243 "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", 264 "@@@STEP_LOG_LINE@python.inline@import os, sys@@@",
244 "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", 265 "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@",
245 "@@@STEP_LOG_LINE@python.inline@@@@", 266 "@@@STEP_LOG_LINE@python.inline@@@@",
246 "@@@STEP_LOG_LINE@python.inline@@@@", 267 "@@@STEP_LOG_LINE@python.inline@@@@",
247 "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", 268 "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@",
248 "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[ 1])@@@", 269 "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[ 1])@@@",
249 "@@@STEP_LOG_END@python.inline@@@" 270 "@@@STEP_LOG_END@python.inline@@@"
250 ] 271 ]
251 }, 272 },
252 { 273 {
253 "name": "$result", 274 "name": "$result",
254 "recipe_result": null, 275 "recipe_result": null,
255 "status_code": 0 276 "status_code": 0
256 } 277 }
257 ] 278 ]
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/file/example.py ('k') | scripts/slave/recipe_modules/filter/example.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698