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

Unified Diff: recipe_modules/shutil/example.expected/basic.json

Issue 2909983003: [loader] Make recipe engine support examples/ module subdir (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « recipe_modules/shutil/example.py ('k') | recipe_modules/shutil/examples/full.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/shutil/example.expected/basic.json
diff --git a/recipe_modules/shutil/example.expected/basic.json b/recipe_modules/shutil/example.expected/basic.json
deleted file mode 100644
index 7369c8c6c74a0fcac394de024611886db14cd48d..0000000000000000000000000000000000000000
--- a/recipe_modules/shutil/example.expected/basic.json
+++ /dev/null
@@ -1,235 +0,0 @@
-[
- {
- "cmd": [
- "python",
- "-u",
- "\nimport os\nimport sys\nos.remove(sys.argv[1])\n",
- "bar"
- ],
- "name": "foo",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@python.inline@@@@",
- "@@@STEP_LOG_LINE@python.inline@import os@@@",
- "@@@STEP_LOG_LINE@python.inline@import sys@@@",
- "@@@STEP_LOG_LINE@python.inline@os.remove(sys.argv[1])@@@",
- "@@@STEP_LOG_END@python.inline@@@"
- ]
- },
- {
- "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 shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "abcde",
- "tmp_file.txt"
- ],
- "name": "write_simple"
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "tmp_file.txt",
- "/path/to/tmp/"
- ],
- "name": "read_simple"
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "! ~&&",
- "tmp_file.txt"
- ],
- "name": "write_symbols"
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "tmp_file.txt",
- "/path/to/tmp/"
- ],
- "name": "read_symbols"
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "abcde fgh",
- "tmp_file.txt"
- ],
- "name": "write_spaces"
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "tmp_file.txt",
- "/path/to/tmp/"
- ],
- "name": "read_spaces"
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "ab\ncd\nefg\n",
- "tmp_file.txt"
- ],
- "name": "write_multiline"
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "tmp_file.txt",
- "/path/to/tmp/"
- ],
- "name": "read_multiline"
- },
- {
- "cmd": [
- "python",
- "-u",
- "\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",
- "[TMP_BASE]/copytree_example_tmp",
- "511"
- ],
- "name": "makedirs makedirs",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@python.inline@@@@",
- "@@@STEP_LOG_LINE@python.inline@import sys, os@@@",
- "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@",
- "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@",
- "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@",
- "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@",
- "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@",
- "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@",
- "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@",
- "@@@STEP_LOG_END@python.inline@@@"
- ]
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "some file content",
- "[TMP_BASE]/copytree_example_tmp/dummy_file"
- ],
- "name": "write [TMP_BASE]/copytree_example_tmp/dummy_file"
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport shutil\nimport sys\nshutil.copytree(sys.argv[1], sys.argv[2], symlinks=bool(sys.argv[3]))\n",
- "[TMP_BASE]/copytree_example_tmp",
- "[TMP_BASE]/copytree_example_tmp2",
- "0"
- ],
- "name": "copytree"
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "[TMP_BASE]/copytree_example_tmp2/dummy_file",
- "/path/to/tmp/"
- ],
- "name": "read [TMP_BASE]/copytree_example_tmp2/dummy_file"
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport glob\nimport sys\nwith open(sys.argv[1], 'w') as f:\n f.write('\\n'.join(glob.glob(sys.argv[2])))\n",
- "/path/to/tmp/",
- "[TMP_BASE]/copytree_example_tmp/*"
- ],
- "name": "glob"
- },
- {
- "cmd": [
- "python",
- "-u",
- "RECIPE_MODULE[recipe_engine::shutil]/resources/rmtree.py",
- "[TMP_BASE]/copytree_example_tmp"
- ],
- "name": "cleanup"
- },
- {
- "cmd": [
- "python",
- "-u",
- "RECIPE_MODULE[recipe_engine::shutil]/resources/rmtree.py",
- "[TMP_BASE]/copytree_example_tmp2"
- ],
- "name": "cleanup2"
- },
- {
- "name": "$result",
- "recipe_result": null,
- "status_code": 0
- }
-]
« no previous file with comments | « recipe_modules/shutil/example.py ('k') | recipe_modules/shutil/examples/full.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698