| Index: scripts/slave/recipes/infra/git_cl.expected/sane.json
|
| diff --git a/scripts/slave/recipes/infra/git_cl.expected/sane.json b/scripts/slave/recipes/infra/git_cl.expected/sane.json
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..238fa5a1fdffeac24e350565c68f63e4916d5ee6
|
| --- /dev/null
|
| +++ b/scripts/slave/recipes/infra/git_cl.expected/sane.json
|
| @@ -0,0 +1,355 @@
|
| +[
|
| + {
|
| + "cmd": [
|
| + "python",
|
| + "-u",
|
| + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
|
| + "--master",
|
| + "chromium.infra",
|
| + "--builder",
|
| + "depot_tools Gerrit Git Cl",
|
| + "--slave",
|
| + "TestSlavename",
|
| + "--spec",
|
| + "cache_dir = '[ROOT]/git_cache'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'depot_tools', 'url': 'https://chromium.googlesource.com/chromium/tools/depot_tools.git'}]",
|
| + "--root",
|
| + "depot_tools",
|
| + "--revision_mapping_file",
|
| + "{\"depot_tools\": \"got_revision\"}",
|
| + "--git-cache-dir",
|
| + "[GIT_CACHE]",
|
| + "--output_json",
|
| + "/path/to/tmp/json",
|
| + "--revision",
|
| + "depot_tools@deadbeaf",
|
| + "--force",
|
| + "--output_manifest"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]",
|
| + "env": {
|
| + "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
|
| + },
|
| + "name": "bot_update",
|
| + "~followup_annotations": [
|
| + "@@@STEP_TEXT@Some step text@@@",
|
| + "@@@STEP_LOG_LINE@json.output@{@@@",
|
| + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@",
|
| + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@",
|
| + "@@@STEP_LOG_LINE@json.output@ \"depot_tools\": \"deadbeaf\"@@@",
|
| + "@@@STEP_LOG_LINE@json.output@ }, @@@",
|
| + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@",
|
| + "@@@STEP_LOG_LINE@json.output@ \"depot_tools\": {@@@",
|
| + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/depot_tools.git\", @@@",
|
| + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"59bbfb4465019d8ed83bfe88fef566922953452a\"@@@",
|
| + "@@@STEP_LOG_LINE@json.output@ }@@@",
|
| + "@@@STEP_LOG_LINE@json.output@ }, @@@",
|
| + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@",
|
| + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"depot_tools\", @@@",
|
| + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@",
|
| + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"59bbfb4465019d8ed83bfe88fef566922953452a\", @@@",
|
| + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#91780}\"@@@",
|
| + "@@@STEP_LOG_LINE@json.output@ }, @@@",
|
| + "@@@STEP_LOG_LINE@json.output@ \"root\": \"depot_tools\", @@@",
|
| + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@",
|
| + "@@@STEP_LOG_LINE@json.output@}@@@",
|
| + "@@@STEP_LOG_END@json.output@@@",
|
| + "@@@SET_BUILD_PROPERTY@got_revision@\"59bbfb4465019d8ed83bfe88fef566922953452a\"@@@",
|
| + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#91780}\"@@@"
|
| + ]
|
| + },
|
| + {
|
| + "cmd": [
|
| + "python",
|
| + "-u",
|
| + "\nimport shutil, sys, os\nshutil.rmtree(sys.argv[1], ignore_errors=True)\n",
|
| + "[SLAVE_BUILD]/test_repo"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]",
|
| + "name": "remove repo workaround for http://crbug.com/589201",
|
| + "~followup_annotations": [
|
| + "@@@STEP_LOG_LINE@python.inline@@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@import shutil, sys, os@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@shutil.rmtree(sys.argv[1], ignore_errors=True)@@@",
|
| + "@@@STEP_LOG_END@python.inline@@@"
|
| + ]
|
| + },
|
| + {
|
| + "cmd": [
|
| + "python",
|
| + "-u",
|
| + "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
|
| + "--path",
|
| + "[SLAVE_BUILD]/test_repo",
|
| + "--url",
|
| + "https://chromium.googlesource.com/playground/gerrit-cq/normal"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]",
|
| + "name": "git setup"
|
| + },
|
| + {
|
| + "cmd": [
|
| + "git",
|
| + "retry",
|
| + "fetch",
|
| + "origin",
|
| + "master"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]/test_repo",
|
| + "name": "git fetch"
|
| + },
|
| + {
|
| + "cmd": [
|
| + "git",
|
| + "checkout",
|
| + "-f",
|
| + "FETCH_HEAD"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]/test_repo",
|
| + "name": "git checkout"
|
| + },
|
| + {
|
| + "cmd": [
|
| + "git",
|
| + "rev-parse",
|
| + "HEAD"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]/test_repo",
|
| + "name": "read revision",
|
| + "stdout": "/path/to/tmp/",
|
| + "~followup_annotations": [
|
| + "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@"
|
| + ]
|
| + },
|
| + {
|
| + "cmd": [
|
| + "git",
|
| + "clean",
|
| + "-f",
|
| + "-d",
|
| + "-x"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]/test_repo",
|
| + "name": "git clean"
|
| + },
|
| + {
|
| + "cmd": [
|
| + "git",
|
| + "submodule",
|
| + "sync"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]/test_repo",
|
| + "name": "submodule sync"
|
| + },
|
| + {
|
| + "cmd": [
|
| + "git",
|
| + "submodule",
|
| + "update",
|
| + "--init",
|
| + "--recursive"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]/test_repo",
|
| + "name": "submodule update"
|
| + },
|
| + {
|
| + "cmd": [
|
| + "python",
|
| + "-u",
|
| + "\nimport os, sys\n# TODO(tandrii): Windows :(\nnetrc = os.path.expanduser('~/.netrc')\nif os.path.exists(netrc):\n with open(netrc, 'r') as f:\n for l in f:\n l = l.strip()\n if l.startswith('#') or 'chromium.googlesource.com' not in l:\n continue\n login = l.split()[3]\n assert login.startswith('git-')\n # example: git-tandrii.chromium.org\n user, domain = login[len('git-'):].split('.', 1)\n print '%s@%s' % (user, domain)\n sys.exit(0)\nprint 'NOT FOUND'\n"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]",
|
| + "name": "check netrc for chromium.googlesource.com",
|
| + "stdout": "/path/to/tmp/out",
|
| + "~followup_annotations": [
|
| + "@@@STEP_LOG_LINE@python.inline@@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@# TODO(tandrii): Windows :(@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@netrc = os.path.expanduser('~/.netrc')@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(netrc):@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@ with open(netrc, 'r') as f:@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@ for l in f:@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@ l = l.strip()@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@ if l.startswith('#') or 'chromium.googlesource.com' not in l:@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@ continue@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@ login = l.split()[3]@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@ assert login.startswith('git-')@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@ # example: git-tandrii.chromium.org@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@ user, domain = login[len('git-'):].split('.', 1)@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@ print '%s@%s' % (user, domain)@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@ sys.exit(0)@@@",
|
| + "@@@STEP_LOG_LINE@python.inline@print 'NOT FOUND'@@@",
|
| + "@@@STEP_LOG_END@python.inline@@@"
|
| + ]
|
| + },
|
| + {
|
| + "cmd": [
|
| + "git",
|
| + "config",
|
| + "--local",
|
| + "user.email",
|
| + "user@chromium.org"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]/test_repo",
|
| + "env": {
|
| + "PATH": "[SLAVE_BUILD]/depot_tools:%(PATH)s"
|
| + },
|
| + "name": "git config"
|
| + },
|
| + {
|
| + "cmd": [
|
| + "git",
|
| + "config",
|
| + "--local",
|
| + "user.name",
|
| + "user"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]/test_repo",
|
| + "env": {
|
| + "PATH": "[SLAVE_BUILD]/depot_tools:%(PATH)s"
|
| + },
|
| + "name": "git config (2)"
|
| + },
|
| + {
|
| + "cmd": [
|
| + "git",
|
| + "cl",
|
| + "--version",
|
| + "-v",
|
| + "-v"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]/test_repo",
|
| + "env": {
|
| + "PATH": "[SLAVE_BUILD]/depot_tools:%(PATH)s"
|
| + },
|
| + "name": "version"
|
| + },
|
| + {
|
| + "cmd": [
|
| + "git",
|
| + "branch",
|
| + "-D",
|
| + "feature",
|
| + "refs/heads/git_cl_uploads/feature"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]/test_repo",
|
| + "env": {
|
| + "PATH": "[SLAVE_BUILD]/depot_tools:%(PATH)s"
|
| + },
|
| + "name": "delete old feature branch"
|
| + },
|
| + {
|
| + "cmd": [
|
| + "python",
|
| + "-u",
|
| + "\nimport os\nimport sys\nos.remove(sys.argv[1])\n",
|
| + "[SLAVE_BUILD]/test_repo/.git/hooks/commit-msg"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]",
|
| + "name": "remove hooks",
|
| + "~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": [
|
| + "git",
|
| + "new-branch",
|
| + "feature"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]/test_repo",
|
| + "env": {
|
| + "PATH": "[SLAVE_BUILD]/depot_tools:%(PATH)s"
|
| + },
|
| + "name": "git new-branch"
|
| + },
|
| + {
|
| + "cmd": [
|
| + "python",
|
| + "-u",
|
| + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
|
| + "chromium.infra-depot_tools Gerrit Git Cl-571",
|
| + "[SLAVE_BUILD]/test_repo/patchset.data"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]",
|
| + "name": "hack hack"
|
| + },
|
| + {
|
| + "cmd": [
|
| + "git",
|
| + "add",
|
| + "patchset.data"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]/test_repo",
|
| + "env": {
|
| + "PATH": "[SLAVE_BUILD]/depot_tools:%(PATH)s"
|
| + },
|
| + "name": "git add"
|
| + },
|
| + {
|
| + "cmd": [
|
| + "git",
|
| + "commit",
|
| + "-m",
|
| + "Normal message."
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]/test_repo",
|
| + "env": {
|
| + "PATH": "[SLAVE_BUILD]/depot_tools:%(PATH)s"
|
| + },
|
| + "name": "git commit"
|
| + },
|
| + {
|
| + "cmd": [
|
| + "git",
|
| + "cl",
|
| + "upload",
|
| + "--squash",
|
| + "-f",
|
| + "-v",
|
| + "-v"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]/test_repo",
|
| + "env": {
|
| + "PATH": "[SLAVE_BUILD]/depot_tools:%(PATH)s"
|
| + },
|
| + "name": "git cl upload"
|
| + },
|
| + {
|
| + "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",
|
| + "[SLAVE_BUILD]/test_repo/.git/hooks",
|
| + "/path/to/tmp/json"
|
| + ],
|
| + "cwd": "[SLAVE_BUILD]",
|
| + "name": "listdir check hooks",
|
| + "~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": [],
|
| + "cwd": "[SLAVE_BUILD]",
|
| + "name": "First stage is over. SUCCESS!"
|
| + },
|
| + {
|
| + "name": "$result",
|
| + "recipe_result": null,
|
| + "status_code": 0
|
| + }
|
| +]
|
|
|