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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/file/example.expected/file_io.json
diff --git a/scripts/slave/recipe_modules/file/example.expected/file_io.json b/scripts/slave/recipe_modules/file/example.expected/file_io.json
index fbc9fa691dae684b8ea6323bc4073884d5185a7d..10448e8336e42b531ce607d97324ca111019f23e 100644
--- a/scripts/slave/recipe_modules/file/example.expected/file_io.json
+++ b/scripts/slave/recipe_modules/file/example.expected/file_io.json
@@ -3,6 +3,75 @@
"cmd": [
"python",
"-u",
+ "\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",
+ "/fake/dir",
+ "/path/to/tmp/json"
+ ],
+ "name": "listdir fake dir",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@json.output@[@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"file 1\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"file 2\"@@@",
+ "@@@STEP_LOG_LINE@json.output@]@@@",
+ "@@@STEP_LOG_END@json.output@@@",
+ "@@@STEP_LOG_LINE@python.inline@@@@",
+ "@@@STEP_LOG_LINE@python.inline@import json, os, sys@@@",
+ "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]) and os.path.isdir(sys.argv[1]):@@@",
+ "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[2], 'w') as f:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ json.dump(os.listdir(sys.argv[1]), f)@@@",
+ "@@@STEP_LOG_END@python.inline@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "some",
+ "command"
+ ],
+ "name": "manipulate file 1"
+ },
+ {
+ "cmd": [
+ "some",
+ "command"
+ ],
+ "name": "manipulate file 2"
+ },
+ {
+ "cmd": [
+ "echo",
+ "[TMP_BASE]/prefix_a_tmp_1"
+ ],
+ "name": "print prefix_a"
+ },
+ {
+ "cmd": [
+ "echo",
+ "[TMP_BASE]/prefix_b_tmp_2"
+ ],
+ "name": "print prefix_b"
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "\nimport sys\nfrom common import chromium_utils\n\nchromium_utils.RemoveFilesWildcards(sys.argv[1], root=sys.argv[2])\n",
+ "*.o",
+ "[SLAVE_BUILD]"
+ ],
+ "name": "rmwildcard *.o in [SLAVE_BUILD]",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@python.inline@@@@",
+ "@@@STEP_LOG_LINE@python.inline@import sys@@@",
+ "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils@@@",
+ "@@@STEP_LOG_LINE@python.inline@@@@",
+ "@@@STEP_LOG_LINE@python.inline@chromium_utils.RemoveFilesWildcards(sys.argv[1], root=sys.argv[2])@@@",
+ "@@@STEP_LOG_END@python.inline@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
"\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
"abcde",
"tmp_file.txt"
« 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