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

Unified Diff: recipe_modules/json/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/json/example.py ('k') | recipe_modules/json/example.resources/cool_script.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/json/example.expected/basic.json
diff --git a/recipe_modules/json/example.expected/basic.json b/recipe_modules/json/example.expected/basic.json
deleted file mode 100644
index cb98dfb4a92457fb7f64aa80b8604e50bbe20c72..0000000000000000000000000000000000000000
--- a/recipe_modules/json/example.expected/basic.json
+++ /dev/null
@@ -1,150 +0,0 @@
-[
- {
- "cmd": [
- "echo",
- "[1, 2, 3]"
- ],
- "name": "echo1",
- "stdout": "/path/to/tmp/json",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@json.output@[@@@",
- "@@@STEP_LOG_LINE@json.output@ 1, @@@",
- "@@@STEP_LOG_LINE@json.output@ 2, @@@",
- "@@@STEP_LOG_LINE@json.output@ 3@@@",
- "@@@STEP_LOG_LINE@json.output@]@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "echo",
- "{\"cool\": [1, 2, 3], \"hello\": \"world\"}"
- ],
- "name": "echo_dumps_property"
- },
- {
- "cmd": [
- "echo",
- "[2, 3, 4]"
- ],
- "name": "echo2",
- "stdout": "/path/to/tmp/json",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@json.output@[@@@",
- "@@@STEP_LOG_LINE@json.output@ 2, @@@",
- "@@@STEP_LOG_LINE@json.output@ 3, @@@",
- "@@@STEP_LOG_LINE@json.output@ 4@@@",
- "@@@STEP_LOG_LINE@json.output@]@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport json\nimport sys\nwith open(sys.argv[1], 'w') as f:\n f.write(json.dumps([1, 2, 3]))\nwith open(sys.argv[2], 'w') as f:\n f.write(json.dumps(['x', 'y', '\\xef\\xbb\\xbf\\xef\\xbd\\x9a']))\n",
- "/path/to/tmp/json",
- "/path/to/tmp/json"
- ],
- "name": "foo",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@json.output[1]@[@@@",
- "@@@STEP_LOG_LINE@json.output[1]@ 1, @@@",
- "@@@STEP_LOG_LINE@json.output[1]@ 2, @@@",
- "@@@STEP_LOG_LINE@json.output[1]@ 3@@@",
- "@@@STEP_LOG_LINE@json.output[1]@]@@@",
- "@@@STEP_LOG_END@json.output[1]@@@",
- "@@@STEP_LOG_LINE@json.output[2]@[@@@",
- "@@@STEP_LOG_LINE@json.output[2]@ \"x\", @@@",
- "@@@STEP_LOG_LINE@json.output[2]@ \"y\", @@@",
- "@@@STEP_LOG_LINE@json.output[2]@ \"\\ufeff\\uff5a\"@@@",
- "@@@STEP_LOG_LINE@json.output[2]@]@@@",
- "@@@STEP_LOG_END@json.output[2]@@@",
- "@@@STEP_LOG_LINE@python.inline@@@@",
- "@@@STEP_LOG_LINE@python.inline@import json@@@",
- "@@@STEP_LOG_LINE@python.inline@import sys@@@",
- "@@@STEP_LOG_LINE@python.inline@with open(sys.argv[1], 'w') as f:@@@",
- "@@@STEP_LOG_LINE@python.inline@ f.write(json.dumps([1, 2, 3]))@@@",
- "@@@STEP_LOG_LINE@python.inline@with open(sys.argv[2], 'w') as f:@@@",
- "@@@STEP_LOG_LINE@python.inline@ f.write(json.dumps(['x', 'y', '\\xef\\xbb\\xbf\\xef\\xbd\\x9a']))@@@",
- "@@@STEP_LOG_END@python.inline@@@"
- ]
- },
- {
- "cmd": [
- "cat",
- "{\"x\": 1, \"y\": 2}"
- ],
- "name": "json through",
- "stdout": "/path/to/tmp/json",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"x\": 1, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"y\": 2@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "cat",
- "{\"x\": 1, \"y\": 2}"
- ],
- "name": "write json to file",
- "stdout": "[TMP_BASE]/temp.json"
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "[TMP_BASE]/temp.json",
- "/path/to/tmp/json"
- ],
- "name": "read json from file we just wrote",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"x\": 1, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"y\": 2@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "python",
- "RECIPE[recipe_engine::json:example].resources/cool_script.py",
- "{\"x\":1,\"y\":2}",
- "[TMP_BASE]/leak.json"
- ],
- "name": "leaking json",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"x\": 1, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"y\": 2@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "python",
- "RECIPE[recipe_engine::json:example].resources/cool_script.py",
- "{\"here is some total\ngarbage",
- "/path/to/tmp/json"
- ],
- "name": "invalid json",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@json.output (invalid)@{\"here is some total@@@",
- "@@@STEP_LOG_LINE@json.output (invalid)@garbage@@@",
- "@@@STEP_LOG_END@json.output (invalid)@@@",
- "@@@STEP_LOG_LINE@json.output (exception)@Invalid control character at: line 1 column 21 (char 20)@@@",
- "@@@STEP_LOG_END@json.output (exception)@@@"
- ]
- },
- {
- "name": "$result",
- "recipe_result": null,
- "status_code": 0
- }
-]
« no previous file with comments | « recipe_modules/json/example.py ('k') | recipe_modules/json/example.resources/cool_script.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698