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

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

Issue 1101673005: Extract functions from path recipe module so that step can depend on it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 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 | 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",
7 "/fake/dir",
8 "/path/to/tmp/json"
9 ],
10 "name": "listdir fake dir",
11 "~followup_annotations": [
12 "@@@STEP_LOG_LINE@json.output@[@@@",
13 "@@@STEP_LOG_LINE@json.output@ \"file 1\", @@@",
14 "@@@STEP_LOG_LINE@json.output@ \"file 2\"@@@",
15 "@@@STEP_LOG_LINE@json.output@]@@@",
16 "@@@STEP_LOG_END@json.output@@@",
17 "@@@STEP_LOG_LINE@python.inline@@@@",
18 "@@@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@ 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_END@python.inline@@@"
23 ]
24 },
25 {
26 "cmd": [
27 "some",
28 "command"
29 ],
30 "name": "manipulate file 1"
31 },
32 {
33 "cmd": [
34 "some",
35 "command"
36 ],
37 "name": "manipulate file 2"
38 },
39 {
40 "cmd": [
41 "echo",
42 "[TMP_BASE]/prefix_a_tmp_1"
43 ],
44 "name": "print prefix_a"
45 },
46 {
47 "cmd": [
48 "echo",
49 "[TMP_BASE]/prefix_b_tmp_2"
50 ],
51 "name": "print prefix_b"
52 },
53 {
54 "cmd": [
55 "python",
56 "-u",
57 "\nimport sys\nfrom common import chromium_utils\n\nchromium_utils.RemoveF ilesWildcards(sys.argv[1], root=sys.argv[2])\n",
58 "*.o",
59 "[SLAVE_BUILD]"
60 ],
61 "name": "rmwildcard *.o in [SLAVE_BUILD]",
62 "~followup_annotations": [
63 "@@@STEP_LOG_LINE@python.inline@@@@",
64 "@@@STEP_LOG_LINE@python.inline@import sys@@@",
65 "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils@@@",
66 "@@@STEP_LOG_LINE@python.inline@@@@",
67 "@@@STEP_LOG_LINE@python.inline@chromium_utils.RemoveFilesWildcards(sys.ar gv[1], root=sys.argv[2])@@@",
68 "@@@STEP_LOG_END@python.inline@@@"
69 ]
70 },
71 {
72 "cmd": [
73 "python",
74 "-u",
6 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", 75 "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
7 "abcde", 76 "abcde",
8 "tmp_file.txt" 77 "tmp_file.txt"
9 ], 78 ],
10 "name": "write_simple" 79 "name": "write_simple"
11 }, 80 },
12 { 81 {
13 "cmd": [ 82 "cmd": [
14 "python", 83 "python",
15 "-u", 84 "-u",
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 "@@@STEP_LOG_LINE@python.inline@@@@", 240 "@@@STEP_LOG_LINE@python.inline@@@@",
172 "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", 241 "@@@STEP_LOG_LINE@python.inline@import os, sys@@@",
173 "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils@@@", 242 "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils@@@",
174 "@@@STEP_LOG_LINE@python.inline@@@@", 243 "@@@STEP_LOG_LINE@python.inline@@@@",
175 "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", 244 "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@",
176 "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[ 1])@@@", 245 "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[ 1])@@@",
177 "@@@STEP_LOG_END@python.inline@@@" 246 "@@@STEP_LOG_END@python.inline@@@"
178 ] 247 ]
179 } 248 }
180 ] 249 ]
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/file/example.py ('k') | scripts/slave/recipe_modules/file/test_api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698