libv8 6.3.292.48.1 → 6.7.288.46.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +10 -34
- data/CHANGELOG.md +16 -0
- data/README.md +9 -63
- data/Rakefile +2 -2
- data/ext/libv8/builder.rb +22 -87
- data/ext/libv8/extconf.rb +1 -1
- data/ext/libv8/paths.rb +5 -18
- data/lib/libv8/version.rb +1 -1
- data/spec/location_spec.rb +1 -2
- data/spec/spec_helper.rb +0 -1
- data/vendor/depot_tools/.gitattributes +1 -2
- data/vendor/depot_tools/OWNERS +0 -1
- data/vendor/depot_tools/PRESUBMIT.py +11 -6
- data/vendor/depot_tools/README.md +0 -1
- data/vendor/depot_tools/WATCHLISTS +0 -6
- data/vendor/depot_tools/auth.py +129 -87
- data/vendor/depot_tools/autoninja +11 -1
- data/vendor/depot_tools/autoninja.bat +7 -1
- data/vendor/depot_tools/autoninja.py +14 -6
- data/vendor/depot_tools/bootstrap/win/manifest.txt +1 -1
- data/vendor/depot_tools/bootstrap/win/manifest_bleeding_edge.txt +1 -1
- data/vendor/depot_tools/cipd +23 -2
- data/vendor/depot_tools/cipd.bat +2 -2
- data/vendor/depot_tools/cipd_client_version +1 -1
- data/vendor/depot_tools/cipd_manifest.txt +17 -7
- data/vendor/depot_tools/cit.py +7 -6
- data/vendor/depot_tools/cpplint.py +195 -35
- data/vendor/depot_tools/detect_host_arch.py +51 -0
- data/vendor/depot_tools/download_from_google_storage.py +85 -26
- data/vendor/depot_tools/fetch.py +11 -6
- data/vendor/depot_tools/fetch_configs/chromium.py +0 -1
- data/vendor/depot_tools/fetch_configs/goma_client.py +41 -0
- data/vendor/depot_tools/fetch_configs/infra.py +0 -1
- data/vendor/depot_tools/fetch_configs/infra_internal.py +0 -1
- data/vendor/depot_tools/gclient-new-workdir.py +4 -0
- data/vendor/depot_tools/gclient.py +732 -476
- data/vendor/depot_tools/gclient_eval.py +569 -58
- data/vendor/depot_tools/gclient_scm.py +258 -46
- data/vendor/depot_tools/gclient_utils.py +17 -1
- data/vendor/depot_tools/gerrit_util.py +46 -13
- data/vendor/depot_tools/git_cache.py +0 -2
- data/vendor/depot_tools/git_cl.py +176 -335
- data/vendor/depot_tools/git_common.py +19 -16
- data/vendor/depot_tools/git_footers.py +19 -5
- data/vendor/depot_tools/git_hyper_blame.py +9 -3
- data/vendor/depot_tools/git_new_branch.py +15 -3
- data/vendor/depot_tools/git_upstream_diff.py +7 -2
- data/vendor/depot_tools/gsutil.py +1 -1
- data/vendor/depot_tools/infra/config/cq.cfg +1 -2
- data/vendor/depot_tools/infra/config/recipes.cfg +1 -1
- data/vendor/depot_tools/luci-auth +13 -0
- data/vendor/depot_tools/luci-auth.bat +8 -0
- data/vendor/depot_tools/man/html/depot_tools.html +0 -8
- data/vendor/depot_tools/man/html/git-upstream-diff.html +20 -3
- data/vendor/depot_tools/man/man1/git-upstream-diff.1 +27 -6
- data/vendor/depot_tools/man/man7/depot_tools.7 +0 -5
- data/vendor/depot_tools/man/man7/depot_tools_tutorial.7 +2 -2
- data/vendor/depot_tools/man/src/git-upstream-diff.txt +21 -3
- data/vendor/depot_tools/man/src/make_docs.sh +6 -0
- data/vendor/depot_tools/my_activity.py +283 -93
- data/vendor/depot_tools/owners.py +9 -4
- data/vendor/depot_tools/owners_finder.py +7 -3
- data/vendor/depot_tools/post_build_ninja_summary.py +322 -0
- data/vendor/depot_tools/presubmit_canned_checks.py +91 -106
- data/vendor/depot_tools/presubmit_support.py +219 -157
- data/vendor/depot_tools/prpc +13 -0
- data/vendor/depot_tools/prpc.bat +8 -0
- data/vendor/depot_tools/recipes/OWNERS +3 -1
- data/vendor/depot_tools/recipes/README.recipes.md +70 -111
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/__init__.py +12 -5
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/api.py +36 -68
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json +0 -8
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/{trychange_oauth2_json.json → no_apply_patch_on_gclient.json} +64 -10
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/{no_shallow.json → shallow.json} +1 -1
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob.json +0 -8
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_empty_revision.json +0 -8
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json +0 -6
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json +0 -7
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json +0 -6
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle_deprecated.json +44 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/{trychange_oauth2_buildbot.json → tryjob_gerrit_branch_heads.json} +51 -5
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json +0 -8
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json +48 -8
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.py +19 -26
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/resources/bot_update.py +193 -155
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/test_api.py +9 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/api.py +2 -7
- data/vendor/depot_tools/recipes/recipe_modules/gclient/config.py +31 -5
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/basic.json +37 -19
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/buildbot.json +37 -19
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/revision.json +37 -19
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/tryserver.json +37 -23
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.py +4 -0
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/api.py +40 -8
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/examples/full.expected/basic.json +3 -3
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/examples/full.py +6 -3
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/OWNERS +0 -1
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/__init__.py +0 -1
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/api.py +7 -56
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch.json +0 -1
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.py +15 -16
- data/vendor/depot_tools/recipes/recipes.py +4 -2
- data/vendor/depot_tools/recipes/trigger_recipe_roller.txt +12 -0
- data/vendor/depot_tools/roll_dep.py +35 -37
- data/vendor/depot_tools/support/chromite_wrapper +1 -1
- data/vendor/depot_tools/third_party/logilab/astroid/README.chromium +3 -3
- data/vendor/depot_tools/third_party/logilab/astroid/__pkginfo__.py +2 -2
- data/vendor/depot_tools/third_party/logilab/astroid/astpeephole.py +86 -0
- data/vendor/depot_tools/third_party/logilab/astroid/bases.py +53 -66
- data/vendor/depot_tools/third_party/logilab/astroid/brain/py2pytest.py +31 -31
- data/vendor/depot_tools/third_party/logilab/astroid/brain/pynose.py +39 -16
- data/vendor/depot_tools/third_party/logilab/astroid/brain/pysix_moves.py +225 -189
- data/vendor/depot_tools/third_party/logilab/astroid/inference.py +45 -41
- data/vendor/depot_tools/third_party/logilab/astroid/manager.py +1 -0
- data/vendor/depot_tools/third_party/logilab/astroid/modutils.py +2 -2
- data/vendor/depot_tools/third_party/logilab/astroid/node_classes.py +3 -2
- data/vendor/depot_tools/third_party/logilab/astroid/nodes.py +1 -0
- data/vendor/depot_tools/third_party/logilab/astroid/protocols.py +57 -3
- data/vendor/depot_tools/third_party/logilab/astroid/raw_building.py +1 -1
- data/vendor/depot_tools/third_party/logilab/astroid/rebuilder.py +21 -1
- data/vendor/depot_tools/third_party/logilab/astroid/scoped_nodes.py +58 -33
- data/vendor/depot_tools/third_party/pylint/README.chromium +2 -2
- data/vendor/depot_tools/third_party/pylint/__pkginfo__.py +3 -3
- data/vendor/depot_tools/third_party/pylint/checkers/base.py +6 -18
- data/vendor/depot_tools/third_party/pylint/checkers/classes.py +64 -63
- data/vendor/depot_tools/third_party/pylint/checkers/design_analysis.py +25 -57
- data/vendor/depot_tools/third_party/pylint/checkers/format.py +14 -10
- data/vendor/depot_tools/third_party/pylint/checkers/python3.py +142 -37
- data/vendor/depot_tools/third_party/pylint/checkers/spelling.py +10 -1
- data/vendor/depot_tools/third_party/pylint/checkers/stdlib.py +50 -7
- data/vendor/depot_tools/third_party/pylint/checkers/strings.py +1 -1
- data/vendor/depot_tools/third_party/pylint/epylint.py +2 -1
- data/vendor/depot_tools/third_party/pylint/gui.py +1 -1
- data/vendor/depot_tools/third_party/pylint/lint.py +88 -23
- data/vendor/depot_tools/third_party/pylint/reporters/html.py +37 -5
- data/vendor/depot_tools/third_party/pylint/testutils.py +1 -1
- data/vendor/depot_tools/third_party/pylint/utils.py +5 -0
- data/vendor/depot_tools/vpython +31 -1
- data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +35 -2
- data/vendor/depot_tools/win_toolchain/package_from_installed.py +0 -15
- data/vendor/depot_tools/yapf +17 -0
- data/vendor/depot_tools/{apply_issue.bat → yapf.bat} +2 -2
- metadata +16 -58
- data/ext/libv8/compiler.rb +0 -39
- data/ext/libv8/compiler/apple_llvm.rb +0 -22
- data/ext/libv8/compiler/clang.rb +0 -22
- data/ext/libv8/compiler/gcc.rb +0 -22
- data/ext/libv8/compiler/generic_compiler.rb +0 -66
- data/ext/libv8/make.rb +0 -13
- data/ext/libv8/patcher.rb +0 -21
- data/patches/0001-Build-a-standalone-static-library.patch +0 -26
- data/patches/0002-Don-t-compile-unnecessary-stuff.patch +0 -85
- data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +0 -25
- data/patches/0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch +0 -25
- data/patches/0005-Remove-TryInstallOptimizedCode.patch +0 -321
- data/patches/mingw-generate-makefiles.sh +0 -97
- data/spec/compiler/apple_llvm_spec.rb +0 -37
- data/spec/compiler/clang_spec.rb +0 -37
- data/spec/compiler/gcc_spec.rb +0 -37
- data/spec/compiler/generic_compiler_spec.rb +0 -50
- data/spec/compiler_spec.rb +0 -45
- data/spec/support/compiler_helpers.rb +0 -47
- data/vendor/depot_tools/apply_issue +0 -8
- data/vendor/depot_tools/apply_issue.py +0 -315
- data/vendor/depot_tools/man/html/git-cherry-pick-upload.html +0 -815
- data/vendor/depot_tools/man/man1/git-cherry-pick-upload.1 +0 -80
- data/vendor/depot_tools/man/src/_git-cherry-pick-upload_desc.helper.txt +0 -1
- data/vendor/depot_tools/man/src/git-cherry-pick-upload.demo.1.sh +0 -17
- data/vendor/depot_tools/man/src/git-cherry-pick-upload.txt +0 -35
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2.json +0 -8
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2_json_win.json +0 -196
- data/vendor/depot_tools/recipes/recipe_modules/rietveld/__init__.py +0 -6
- data/vendor/depot_tools/recipes/recipe_modules/rietveld/api.py +0 -97
- data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.expected/basic.json +0 -8
- data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.expected/buildbot.json +0 -30
- data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.expected/no_auth.json +0 -27
- data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.py +0 -38
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_rietveld_patch.json +0 -69
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_rietveld_patch_new.json +0 -69
- data/vendor/depot_tools/third_party/cq_client/OWNERS +0 -2
- data/vendor/depot_tools/third_party/cq_client/README.depot_tools.md +0 -2
- data/vendor/depot_tools/third_party/cq_client/README.md +0 -59
- data/vendor/depot_tools/third_party/cq_client/__init__.py +0 -3
- data/vendor/depot_tools/third_party/cq_client/v1/__init__.py +0 -3
- data/vendor/depot_tools/third_party/cq_client/v1/cq.pb.go +0 -810
- data/vendor/depot_tools/third_party/cq_client/v1/cq.proto +0 -281
- data/vendor/depot_tools/third_party/cq_client/v1/cq_pb2.py +0 -794
- data/vendor/depot_tools/third_party/cq_client/v1/testdata/cq_both.cfg +0 -71
- data/vendor/depot_tools/third_party/cq_client/v1/testdata/cq_gerrit.cfg +0 -58
- data/vendor/depot_tools/third_party/cq_client/v1/testdata/cq_rietveld.cfg +0 -60
- data/vendor/depot_tools/third_party/cq_client/v2/__init__.py +0 -3
- data/vendor/depot_tools/third_party/cq_client/v2/cq.pb.go +0 -792
- data/vendor/depot_tools/third_party/cq_client/v2/cq.proto +0 -270
- data/vendor/depot_tools/third_party/cq_client/v2/cq_pb2.py +0 -841
data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/tryserver.json
CHANGED
@@ -6,10 +6,12 @@
|
|
6
6
|
"RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
|
7
7
|
"config",
|
8
8
|
"--spec",
|
9
|
-
"cache_dir = '[ROOT]/git_cache'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]"
|
9
|
+
"cache_dir = '[ROOT]/git_cache'\nsolutions = [{'custom_vars': {'string_var': 'string_val', 'true_var': True}, 'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]"
|
10
10
|
],
|
11
|
-
"
|
12
|
-
"PATH":
|
11
|
+
"env_suffixes": {
|
12
|
+
"PATH": [
|
13
|
+
"RECIPE_PACKAGE_REPO[depot_tools]"
|
14
|
+
]
|
13
15
|
},
|
14
16
|
"infra_step": true,
|
15
17
|
"name": "gclient setup"
|
@@ -30,13 +32,13 @@
|
|
30
32
|
"--with_branch_heads",
|
31
33
|
"--with_tags",
|
32
34
|
"--delete_unversioned_trees",
|
33
|
-
"--revision",
|
34
|
-
"src@HEAD",
|
35
35
|
"--output-json",
|
36
36
|
"/path/to/tmp/json"
|
37
37
|
],
|
38
|
-
"
|
39
|
-
"PATH":
|
38
|
+
"env_suffixes": {
|
39
|
+
"PATH": [
|
40
|
+
"RECIPE_PACKAGE_REPO[depot_tools]"
|
41
|
+
]
|
40
42
|
},
|
41
43
|
"infra_step": true,
|
42
44
|
"name": "gclient sync",
|
@@ -62,8 +64,10 @@
|
|
62
64
|
"user.name",
|
63
65
|
"local_bot"
|
64
66
|
],
|
65
|
-
"
|
66
|
-
"PATH":
|
67
|
+
"env_suffixes": {
|
68
|
+
"PATH": [
|
69
|
+
"RECIPE_PACKAGE_REPO[depot_tools]"
|
70
|
+
]
|
67
71
|
},
|
68
72
|
"infra_step": true,
|
69
73
|
"name": "gclient recurse (git config user.name)"
|
@@ -79,8 +83,10 @@
|
|
79
83
|
"user.email",
|
80
84
|
"local_bot@example.com"
|
81
85
|
],
|
82
|
-
"
|
83
|
-
"PATH":
|
86
|
+
"env_suffixes": {
|
87
|
+
"PATH": [
|
88
|
+
"RECIPE_PACKAGE_REPO[depot_tools]"
|
89
|
+
]
|
84
90
|
},
|
85
91
|
"infra_step": true,
|
86
92
|
"name": "gclient recurse (git config user.email)"
|
@@ -95,8 +101,10 @@
|
|
95
101
|
"cache_dir = '[CACHE]/git'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'Angle', 'url': 'https://chromium.googlesource.com/angle/angle.git'}]"
|
96
102
|
],
|
97
103
|
"cwd": "[START_DIR]/src/third_party",
|
98
|
-
"
|
99
|
-
"PATH":
|
104
|
+
"env_suffixes": {
|
105
|
+
"PATH": [
|
106
|
+
"RECIPE_PACKAGE_REPO[depot_tools]"
|
107
|
+
]
|
100
108
|
},
|
101
109
|
"infra_step": true,
|
102
110
|
"name": "[spec: Angle] gclient setup"
|
@@ -118,15 +126,15 @@
|
|
118
126
|
"--with_tags",
|
119
127
|
"--delete_unversioned_trees",
|
120
128
|
"--revision",
|
121
|
-
"Angle@HEAD",
|
122
|
-
"--revision",
|
123
129
|
"src/third_party/angle@refs/heads/lkgr",
|
124
130
|
"--output-json",
|
125
131
|
"/path/to/tmp/json"
|
126
132
|
],
|
127
133
|
"cwd": "[START_DIR]/src/third_party",
|
128
|
-
"
|
129
|
-
"PATH":
|
134
|
+
"env_suffixes": {
|
135
|
+
"PATH": [
|
136
|
+
"RECIPE_PACKAGE_REPO[depot_tools]"
|
137
|
+
]
|
130
138
|
},
|
131
139
|
"infra_step": true,
|
132
140
|
"name": "[spec: Angle] gclient sync",
|
@@ -157,8 +165,10 @@
|
|
157
165
|
"local_bot"
|
158
166
|
],
|
159
167
|
"cwd": "[START_DIR]/src/third_party",
|
160
|
-
"
|
161
|
-
"PATH":
|
168
|
+
"env_suffixes": {
|
169
|
+
"PATH": [
|
170
|
+
"RECIPE_PACKAGE_REPO[depot_tools]"
|
171
|
+
]
|
162
172
|
},
|
163
173
|
"infra_step": true,
|
164
174
|
"name": "[spec: Angle] gclient recurse (git config user.name)"
|
@@ -175,8 +185,10 @@
|
|
175
185
|
"local_bot@example.com"
|
176
186
|
],
|
177
187
|
"cwd": "[START_DIR]/src/third_party",
|
178
|
-
"
|
179
|
-
"PATH":
|
188
|
+
"env_suffixes": {
|
189
|
+
"PATH": [
|
190
|
+
"RECIPE_PACKAGE_REPO[depot_tools]"
|
191
|
+
]
|
180
192
|
},
|
181
193
|
"infra_step": true,
|
182
194
|
"name": "[spec: Angle] gclient recurse (git config user.email)"
|
@@ -213,8 +225,10 @@
|
|
213
225
|
"runhooks"
|
214
226
|
],
|
215
227
|
"cwd": "[START_DIR]/src",
|
216
|
-
"
|
217
|
-
"PATH":
|
228
|
+
"env_suffixes": {
|
229
|
+
"PATH": [
|
230
|
+
"RECIPE_PACKAGE_REPO[depot_tools]"
|
231
|
+
]
|
218
232
|
},
|
219
233
|
"name": "gclient runhooks"
|
220
234
|
},
|
@@ -13,6 +13,7 @@ DEPS = [
|
|
13
13
|
|
14
14
|
TEST_CONFIGS = [
|
15
15
|
'android',
|
16
|
+
'angle',
|
16
17
|
'boringssl',
|
17
18
|
'build_internal',
|
18
19
|
'build_internal_scripts_slave',
|
@@ -25,6 +26,7 @@ TEST_CONFIGS = [
|
|
25
26
|
'gyp',
|
26
27
|
'infra',
|
27
28
|
'infradata_master_manager',
|
29
|
+
'infradata_config',
|
28
30
|
'internal_deps',
|
29
31
|
'luci_gae',
|
30
32
|
'luci_go',
|
@@ -39,6 +41,7 @@ TEST_CONFIGS = [
|
|
39
41
|
'wasm_llvm',
|
40
42
|
'webports',
|
41
43
|
'with_branch_heads',
|
44
|
+
'with_tags',
|
42
45
|
]
|
43
46
|
|
44
47
|
|
@@ -51,6 +54,7 @@ def RunSteps(api):
|
|
51
54
|
soln.name = 'src'
|
52
55
|
soln.url = 'https://chromium.googlesource.com/chromium/src.git'
|
53
56
|
soln.revision = api.properties.get('revision')
|
57
|
+
soln.custom_vars = {'string_var': 'string_val', 'true_var': True}
|
54
58
|
src_cfg.parent_got_revision_mapping['parent_got_revision'] = 'got_revision'
|
55
59
|
api.gclient.c = src_cfg
|
56
60
|
api.gclient.checkout()
|
@@ -7,6 +7,10 @@ from recipe_engine import recipe_api
|
|
7
7
|
class GerritApi(recipe_api.RecipeApi):
|
8
8
|
"""Module for interact with gerrit endpoints"""
|
9
9
|
|
10
|
+
def __init__(self, *args, **kwargs):
|
11
|
+
super(GerritApi, self).__init__(*args, **kwargs)
|
12
|
+
self._changes_target_branch_cache = {}
|
13
|
+
|
10
14
|
def __call__(self, name, cmd, infra_step=True, **kwargs):
|
11
15
|
"""Wrapper for easy calling of gerrit_utils steps."""
|
12
16
|
assert isinstance(cmd, (list, tuple))
|
@@ -65,10 +69,13 @@ class GerritApi(recipe_api.RecipeApi):
|
|
65
69
|
revision = step_result.json.output.get('revision')
|
66
70
|
return revision
|
67
71
|
|
68
|
-
def get_change_destination_branch(
|
72
|
+
def get_change_destination_branch(
|
73
|
+
self, host, change, name=None, step_test_data=None):
|
69
74
|
"""
|
70
75
|
Get the upstream branch for a given CL.
|
71
76
|
|
77
|
+
Result is cached.
|
78
|
+
|
72
79
|
Args:
|
73
80
|
host: Gerrit host to query.
|
74
81
|
change: The change number.
|
@@ -76,19 +83,25 @@ class GerritApi(recipe_api.RecipeApi):
|
|
76
83
|
Returns:
|
77
84
|
the name of the branch
|
78
85
|
"""
|
79
|
-
assert int(change)
|
80
|
-
|
86
|
+
assert int(change), change
|
87
|
+
change = int(change)
|
88
|
+
branch = self._changes_target_branch_cache.get((host, change))
|
89
|
+
if branch is not None:
|
90
|
+
return branch
|
81
91
|
changes = self.get_changes(
|
82
92
|
host,
|
83
93
|
[('change', change)],
|
84
94
|
limit=1,
|
85
|
-
|
95
|
+
name=name or 'get_change_destination_branch',
|
96
|
+
step_test_data=step_test_data,
|
86
97
|
)
|
87
98
|
if not changes or 'branch' not in changes[0]:
|
88
99
|
self.m.step.active_result.presentation.status = self.m.step.EXCEPTION
|
89
100
|
raise self.m.step.InfraFailure(
|
90
101
|
'Error quering for branch of CL %s' % change)
|
91
|
-
|
102
|
+
branch = changes[0]['branch']
|
103
|
+
self._changes_target_branch_cache[(host, change)] = branch
|
104
|
+
return branch
|
92
105
|
|
93
106
|
def get_change_description(self, host, change, patchset):
|
94
107
|
"""
|
@@ -102,6 +115,22 @@ class GerritApi(recipe_api.RecipeApi):
|
|
102
115
|
Returns:
|
103
116
|
The description corresponding to given CL and patchset.
|
104
117
|
"""
|
118
|
+
ri = self.get_revision_info(host, change, patchset)
|
119
|
+
return ri['commit']['message']
|
120
|
+
|
121
|
+
def get_revision_info(self, host, change, patchset):
|
122
|
+
"""
|
123
|
+
Returns the info for a given patchset of a given change.
|
124
|
+
|
125
|
+
Args:
|
126
|
+
host: Gerrit host to query.
|
127
|
+
change: The change number.
|
128
|
+
patchset: The patchset number.
|
129
|
+
|
130
|
+
Returns:
|
131
|
+
A dict for the target revision as documented here:
|
132
|
+
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#list-changes
|
133
|
+
"""
|
105
134
|
assert int(change), change
|
106
135
|
assert int(patchset), patchset
|
107
136
|
cls = self.get_changes(
|
@@ -113,14 +142,14 @@ class GerritApi(recipe_api.RecipeApi):
|
|
113
142
|
for ri in cl['revisions'].itervalues():
|
114
143
|
# TODO(tandrii): add support for patchset=='current'.
|
115
144
|
if str(ri['_number']) == str(patchset):
|
116
|
-
return ri
|
145
|
+
return ri
|
117
146
|
|
118
147
|
raise self.m.step.InfraFailure(
|
119
148
|
'Error querying for CL description: host:%r change:%r; patchset:%r' % (
|
120
149
|
host, change, patchset))
|
121
150
|
|
122
151
|
def get_changes(self, host, query_params, start=None, limit=None,
|
123
|
-
o_params=None, **kwargs):
|
152
|
+
o_params=None, step_test_data=None, **kwargs):
|
124
153
|
"""
|
125
154
|
Query changes for the given host.
|
126
155
|
|
@@ -133,6 +162,7 @@ class GerritApi(recipe_api.RecipeApi):
|
|
133
162
|
limit: Maximum number of results to return.
|
134
163
|
o_params: A list of additional output specifiers, as documented here:
|
135
164
|
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#list-changes
|
165
|
+
step_test_data: Optional mock test data for the underlying gerrit client.
|
136
166
|
Returns:
|
137
167
|
A list of change dicts as documented here:
|
138
168
|
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#list-changes
|
@@ -150,10 +180,12 @@ class GerritApi(recipe_api.RecipeApi):
|
|
150
180
|
args += ['-p', '%s=%s' % (k, v)]
|
151
181
|
for v in (o_params or []):
|
152
182
|
args += ['-o', v]
|
183
|
+
if not step_test_data:
|
184
|
+
step_test_data = lambda: self.test_api.get_one_change_response_data()
|
153
185
|
|
154
186
|
return self(
|
155
187
|
kwargs.pop('name', 'changes'),
|
156
188
|
args,
|
157
|
-
step_test_data=
|
189
|
+
step_test_data=step_test_data,
|
158
190
|
**kwargs
|
159
191
|
).json.output
|
@@ -213,7 +213,7 @@
|
|
213
213
|
"--limit",
|
214
214
|
"1",
|
215
215
|
"-p",
|
216
|
-
"change=
|
216
|
+
"change=122"
|
217
217
|
],
|
218
218
|
"env": {
|
219
219
|
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
|
@@ -239,7 +239,7 @@
|
|
239
239
|
"--limit",
|
240
240
|
"1",
|
241
241
|
"-p",
|
242
|
-
"change=
|
242
|
+
"change=122",
|
243
243
|
"-o",
|
244
244
|
"ALL_REVISIONS",
|
245
245
|
"-o",
|
@@ -276,7 +276,7 @@
|
|
276
276
|
},
|
277
277
|
{
|
278
278
|
"name": "$result",
|
279
|
-
"reason": "2 out of 2 aggregated steps failed. Failures: Error quering for branch of CL
|
279
|
+
"reason": "2 out of 2 aggregated steps failed. Failures: Error quering for branch of CL 122, Error querying for CL description: host:'https://chromium-review.googlesource.com' change:122; patchset:3",
|
280
280
|
"recipe_result": null,
|
281
281
|
"status_code": 1
|
282
282
|
}
|
@@ -36,14 +36,17 @@ def RunSteps(api):
|
|
36
36
|
api.gerrit.get_change_description(
|
37
37
|
host, change=123, patchset=1)
|
38
38
|
|
39
|
-
api.gerrit.get_change_destination_branch(host, change=123)
|
39
|
+
first = api.gerrit.get_change_destination_branch(host, change=123)
|
40
|
+
# Second call returns cached data.
|
41
|
+
second = api.gerrit.get_change_destination_branch(host, change=123)
|
42
|
+
assert first == second
|
40
43
|
|
41
44
|
with api.step.defer_results():
|
42
45
|
api.gerrit.get_change_destination_branch(
|
43
|
-
host, change=
|
46
|
+
host, change=122, name='missing_cl')
|
44
47
|
|
45
48
|
api.gerrit.get_change_description(
|
46
|
-
host, change=
|
49
|
+
host, change=122, patchset=3)
|
47
50
|
|
48
51
|
|
49
52
|
def GenTests(api):
|
@@ -16,16 +16,8 @@ class TryserverApi(recipe_api.RecipeApi):
|
|
16
16
|
|
17
17
|
@property
|
18
18
|
def is_tryserver(self):
|
19
|
-
"""Returns true iff we
|
20
|
-
return (
|
21
|
-
self.can_apply_issue or self.is_patch_in_git or self.is_gerrit_issue)
|
22
|
-
|
23
|
-
@property
|
24
|
-
def can_apply_issue(self):
|
25
|
-
"""Returns true iff the properties exist to apply_issue from rietveld."""
|
26
|
-
return (self.m.properties.get('rietveld')
|
27
|
-
and 'issue' in self.m.properties
|
28
|
-
and 'patchset' in self.m.properties)
|
19
|
+
"""Returns true iff we have a change to check out."""
|
20
|
+
return (self.is_patch_in_git or self.is_gerrit_issue)
|
29
21
|
|
30
22
|
@property
|
31
23
|
def is_gerrit_issue(self):
|
@@ -43,7 +35,7 @@ class TryserverApi(recipe_api.RecipeApi):
|
|
43
35
|
self.m.properties.get('patch_repo_url') and
|
44
36
|
self.m.properties.get('patch_ref'))
|
45
37
|
|
46
|
-
def get_files_affected_by_patch(self, patch_root
|
38
|
+
def get_files_affected_by_patch(self, patch_root, **kwargs):
|
47
39
|
"""Returns list of paths to files affected by the patch.
|
48
40
|
|
49
41
|
Argument:
|
@@ -51,16 +43,7 @@ class TryserverApi(recipe_api.RecipeApi):
|
|
51
43
|
api.gclient.calculate_patch_root(patch_project)
|
52
44
|
|
53
45
|
Returned paths will be relative to to patch_root.
|
54
|
-
|
55
|
-
TODO(tandrii): remove this doc.
|
56
|
-
Unless you use patch_root=None, in which case old behavior is used
|
57
|
-
which returns paths relative to checkout aka solution[0].name.
|
58
46
|
"""
|
59
|
-
# patch_root must be set! None is for backwards compataibility and will be
|
60
|
-
# removed.
|
61
|
-
if patch_root is None:
|
62
|
-
return self._old_get_files_affected_by_patch()
|
63
|
-
|
64
47
|
cwd = self.m.context.cwd or self.m.path['start_dir'].join(patch_root)
|
65
48
|
with self.m.context(cwd=cwd):
|
66
49
|
step_result = self.m.git(
|
@@ -79,29 +62,6 @@ class TryserverApi(recipe_api.RecipeApi):
|
|
79
62
|
step_result.presentation.logs['files'] = paths
|
80
63
|
return paths
|
81
64
|
|
82
|
-
|
83
|
-
def _old_get_files_affected_by_patch(self):
|
84
|
-
issue_root = self.m.rietveld.calculate_issue_root()
|
85
|
-
cwd = self.m.path['checkout'].join(issue_root) if issue_root else None
|
86
|
-
|
87
|
-
with self.m.context(cwd=cwd):
|
88
|
-
step_result = self.m.git(
|
89
|
-
'-c', 'core.quotePath=false', 'diff', '--cached', '--name-only',
|
90
|
-
name='git diff to analyze patch',
|
91
|
-
stdout=self.m.raw_io.output(),
|
92
|
-
step_test_data=lambda:
|
93
|
-
self.m.raw_io.test_api.stream_output('foo.cc'))
|
94
|
-
paths = step_result.stdout.split()
|
95
|
-
if issue_root:
|
96
|
-
paths = [self.m.path.join(issue_root, path) for path in paths]
|
97
|
-
if self.m.platform.is_win:
|
98
|
-
# Looks like "analyze" wants POSIX slashes even on Windows (since git
|
99
|
-
# uses that format even on Windows).
|
100
|
-
paths = [path.replace('\\', '/') for path in paths]
|
101
|
-
|
102
|
-
step_result.presentation.logs['files'] = paths
|
103
|
-
return paths
|
104
|
-
|
105
65
|
def set_subproject_tag(self, subproject_tag):
|
106
66
|
"""Adds a subproject tag to the build.
|
107
67
|
|
@@ -188,19 +148,10 @@ class TryserverApi(recipe_api.RecipeApi):
|
|
188
148
|
git-footers documentation for more information.
|
189
149
|
"""
|
190
150
|
if patch_text is None:
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
self.m.properties['patch_set'])
|
196
|
-
elif self.can_apply_issue:
|
197
|
-
patch_url = (
|
198
|
-
self.m.properties['rietveld'].rstrip('/') + '/' +
|
199
|
-
str(self.m.properties['issue']))
|
200
|
-
patch_text = self.m.git_cl.get_description(
|
201
|
-
patch_url=patch_url, codereview='rietveld').stdout
|
202
|
-
else: # pragma: no cover
|
203
|
-
raise recipe_api.StepFailure('Unknown patch storage.')
|
151
|
+
patch_text = self.m.gerrit.get_change_description(
|
152
|
+
self.m.properties['patch_gerrit_url'],
|
153
|
+
self.m.properties['patch_issue'],
|
154
|
+
self.m.properties['patch_set'])
|
204
155
|
|
205
156
|
result = self.m.python(
|
206
157
|
'parse description', self.package_repo_resource('git_footers.py'),
|
@@ -28,7 +28,7 @@ def RunSteps(api):
|
|
28
28
|
'Foo', api.properties['patch_text']))])
|
29
29
|
return
|
30
30
|
|
31
|
-
if api.tryserver.
|
31
|
+
if api.tryserver.is_gerrit_issue:
|
32
32
|
api.tryserver.get_footers()
|
33
33
|
api.tryserver.get_files_affected_by_patch(
|
34
34
|
api.properties.get('test_patch_root'))
|
@@ -50,30 +50,29 @@ def RunSteps(api):
|
|
50
50
|
def GenTests(api):
|
51
51
|
description_step = api.override_step_data(
|
52
52
|
'git_cl description', stdout=api.raw_io.output_text('foobar'))
|
53
|
+
# The 'test_patch_root' property used below is just so that these
|
54
|
+
# tests can avoid using the gclient module to calculate the
|
55
|
+
# patch root. Normal users would use gclient.calculate_patch_root().
|
53
56
|
yield (api.test('with_git_patch') +
|
54
57
|
api.properties(
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
58
|
+
path_config='buildbot',
|
59
|
+
patch_storage='git',
|
60
|
+
patch_project='v8',
|
61
|
+
patch_repo_url='http://patch.url/',
|
62
|
+
patch_ref='johndoe#123.diff',
|
63
|
+
test_patch_root='v8'))
|
60
64
|
|
61
65
|
yield (api.test('with_git_patch_luci') +
|
62
66
|
api.properties(
|
63
67
|
patch_storage='git',
|
64
68
|
patch_project='v8',
|
65
69
|
patch_repo_url='http://patch.url/',
|
66
|
-
patch_ref='johndoe#123.diff'
|
67
|
-
|
68
|
-
yield (api.test('with_rietveld_patch') +
|
69
|
-
api.properties.tryserver() +
|
70
|
-
description_step)
|
71
|
-
|
72
|
-
yield (api.test('with_wrong_patch') + api.platform('win', 32))
|
70
|
+
patch_ref='johndoe#123.diff',
|
71
|
+
test_patch_root='v8'))
|
73
72
|
|
74
|
-
yield (api.test('
|
75
|
-
api.
|
76
|
-
|
73
|
+
yield (api.test('with_wrong_patch') +
|
74
|
+
api.platform('win', 32) +
|
75
|
+
api.properties(test_patch_root=''))
|
77
76
|
|
78
77
|
yield (api.test('with_gerrit_patch') +
|
79
78
|
api.properties.tryserver(gerrit_project='infra/infra'))
|