libv8 5.1.281.59.1 → 5.2.361.43.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +0 -7
  3. data/CHANGELOG.md +9 -1
  4. data/README.md +41 -23
  5. data/Rakefile +1 -1
  6. data/ext/libv8/builder.rb +1 -1
  7. data/ext/libv8/compiler/apple_llvm.rb +5 -4
  8. data/ext/libv8/compiler/clang.rb +5 -4
  9. data/ext/libv8/compiler/gcc.rb +5 -4
  10. data/ext/libv8/compiler/generic_compiler.rb +11 -1
  11. data/lib/libv8/version.rb +1 -1
  12. data/patches/0001-Build-a-standalone-static-library.patch +26 -0
  13. data/patches/{0002-Disable-building-tests.patch → 0002-Don-t-compile-unnecessary-stuff.patch} +31 -34
  14. data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +10 -10
  15. data/patches/0004-Reinterpret-thread-hash-for-FreeBSD-too.patch +25 -0
  16. data/release/armhf-linux/Vagrantfile +95 -0
  17. data/release/armhf-linux/initrd.img +0 -0
  18. data/release/armhf-linux/vmlinuz +0 -0
  19. data/release/{x86_64-freebsd10 → x86_64-freebsd-10}/Vagrantfile +3 -1
  20. data/spec/compiler/apple_llvm_spec.rb +10 -3
  21. data/spec/compiler/clang_spec.rb +7 -0
  22. data/spec/compiler_spec.rb +1 -1
  23. data/spec/support/compiler_helpers.rb +3 -1
  24. data/vendor/depot_tools/{README → README.md} +33 -12
  25. data/vendor/depot_tools/checkout.py +7 -2
  26. data/vendor/depot_tools/cit.py +51 -13
  27. data/vendor/depot_tools/cpplint.py +27 -5
  28. data/vendor/depot_tools/git_cl.py +370 -290
  29. data/vendor/depot_tools/git_common.py +133 -28
  30. data/vendor/depot_tools/git_drover.py +29 -2
  31. data/vendor/depot_tools/git_map.py +2 -2
  32. data/vendor/depot_tools/git_map_branches.py +9 -5
  33. data/vendor/depot_tools/git_rebase_update.py +3 -3
  34. data/vendor/depot_tools/git_upstream_diff.py +1 -1
  35. data/vendor/depot_tools/infra/config/OWNERS +1 -0
  36. data/vendor/depot_tools/infra/config/cq.cfg +8 -3
  37. data/vendor/depot_tools/infra/config/recipes.cfg +1 -1
  38. data/vendor/depot_tools/man/html/depot_tools.html +10 -2
  39. data/vendor/depot_tools/man/html/depot_tools_tutorial.html +14 -15
  40. data/vendor/depot_tools/man/html/git-auto-svn.html +2 -2
  41. data/vendor/depot_tools/man/html/git-cherry-pick-upload.html +2 -11
  42. data/vendor/depot_tools/man/html/git-drover.html +19 -17
  43. data/vendor/depot_tools/man/html/git-footers.html +2 -2
  44. data/vendor/depot_tools/man/html/git-freeze.html +17 -4
  45. data/vendor/depot_tools/man/html/git-hyper-blame.html +2 -2
  46. data/vendor/depot_tools/man/html/git-map-branches.html +2 -2
  47. data/vendor/depot_tools/man/html/git-map.html +3 -3
  48. data/vendor/depot_tools/man/html/git-mark-merge-base.html +2 -2
  49. data/vendor/depot_tools/man/html/git-nav-downstream.html +7 -7
  50. data/vendor/depot_tools/man/html/git-nav-upstream.html +4 -4
  51. data/vendor/depot_tools/man/html/git-new-branch.html +2 -2
  52. data/vendor/depot_tools/man/html/git-rebase-update.html +2 -2
  53. data/vendor/depot_tools/man/html/git-rename-branch.html +2 -2
  54. data/vendor/depot_tools/man/html/git-reparent-branch.html +2 -2
  55. data/vendor/depot_tools/man/html/git-retry.html +2 -2
  56. data/vendor/depot_tools/man/html/git-squash-branch.html +4 -4
  57. data/vendor/depot_tools/man/html/git-thaw.html +2 -2
  58. data/vendor/depot_tools/man/html/git-upstream-diff.html +2 -2
  59. data/vendor/depot_tools/man/man1/git-auto-svn.1 +4 -4
  60. data/vendor/depot_tools/man/man1/git-cherry-pick-upload.1 +5 -14
  61. data/vendor/depot_tools/man/man1/git-drover.1 +21 -19
  62. data/vendor/depot_tools/man/man1/git-footers.1 +5 -5
  63. data/vendor/depot_tools/man/man1/git-freeze.1 +12 -6
  64. data/vendor/depot_tools/man/man1/git-hyper-blame.1 +4 -4
  65. data/vendor/depot_tools/man/man1/git-map-branches.1 +5 -7
  66. data/vendor/depot_tools/man/man1/git-map.1 +5 -5
  67. data/vendor/depot_tools/man/man1/git-mark-merge-base.1 +4 -4
  68. data/vendor/depot_tools/man/man1/git-nav-downstream.1 +9 -9
  69. data/vendor/depot_tools/man/man1/git-nav-upstream.1 +6 -6
  70. data/vendor/depot_tools/man/man1/git-new-branch.1 +4 -4
  71. data/vendor/depot_tools/man/man1/git-rebase-update.1 +4 -4
  72. data/vendor/depot_tools/man/man1/git-rename-branch.1 +4 -4
  73. data/vendor/depot_tools/man/man1/git-reparent-branch.1 +4 -4
  74. data/vendor/depot_tools/man/man1/git-retry.1 +4 -4
  75. data/vendor/depot_tools/man/man1/git-squash-branch.1 +6 -6
  76. data/vendor/depot_tools/man/man1/git-thaw.1 +4 -4
  77. data/vendor/depot_tools/man/man1/git-upstream-diff.1 +4 -4
  78. data/vendor/depot_tools/man/man7/depot_tools.7 +9 -4
  79. data/vendor/depot_tools/man/man7/depot_tools_tutorial.7 +14 -15
  80. data/vendor/depot_tools/man/src/depot_tools_tutorial.txt +1 -2
  81. data/vendor/depot_tools/man/src/git-freeze.txt +15 -0
  82. data/vendor/depot_tools/man/src/make_docs.sh +4 -4
  83. data/vendor/depot_tools/owners.py +50 -46
  84. data/vendor/depot_tools/owners_finder.py +6 -19
  85. data/vendor/depot_tools/presubmit_canned_checks.py +2 -1
  86. data/vendor/depot_tools/presubmit_support.py +8 -10
  87. data/vendor/depot_tools/recipe_modules/bot_update/api.py +69 -55
  88. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail.json +1 -0
  89. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json +1 -0
  90. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json +1 -0
  91. data/vendor/depot_tools/recipe_modules/bot_update/resources/bot_update.py +2 -0
  92. data/vendor/depot_tools/recipe_modules/gclient/api.py +0 -17
  93. data/vendor/depot_tools/recipe_modules/gclient/config.py +9 -8
  94. data/vendor/depot_tools/recipe_modules/gclient/example.py +1 -1
  95. data/vendor/depot_tools/recipe_modules/git/api.py +20 -4
  96. data/vendor/depot_tools/recipe_modules/git/example.expected/can_fail_build.json +1 -0
  97. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output_fails_build.json +1 -0
  98. data/vendor/depot_tools/recipe_modules/git/example.expected/git-cache-checkout.json +189 -0
  99. data/vendor/depot_tools/recipe_modules/git/example.expected/platform_win.json +2 -1
  100. data/vendor/depot_tools/recipe_modules/git/example.expected/rebase_failed.json +1 -0
  101. data/vendor/depot_tools/recipe_modules/git/example.py +6 -1
  102. data/vendor/depot_tools/recipe_modules/git_cl/api.py +13 -0
  103. data/vendor/depot_tools/recipe_modules/git_cl/example.expected/basic.json +17 -0
  104. data/vendor/depot_tools/recipe_modules/git_cl/example.py +3 -0
  105. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_linux.json +14 -0
  106. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_mac.json +14 -0
  107. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_win.json +14 -0
  108. data/vendor/depot_tools/recipe_modules/infra_paths/example.py +1 -1
  109. data/vendor/depot_tools/recipe_modules/infra_paths/path_config.py +23 -10
  110. data/vendor/depot_tools/recipe_modules/tryserver/api.py +5 -3
  111. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_git_patch.json +1 -0
  112. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch.json +1 -0
  113. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch_new.json +1 -0
  114. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_svn_patch.json +1 -0
  115. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch.json +3 -1
  116. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch_new.json +3 -1
  117. data/vendor/depot_tools/recipes.py +56 -27
  118. data/vendor/depot_tools/rietveld.py +10 -0
  119. data/vendor/depot_tools/third_party/httplib2/README.chromium +3 -3
  120. data/vendor/depot_tools/third_party/httplib2/__init__.py +31 -15
  121. data/vendor/depot_tools/third_party/upload.py +54 -45
  122. data/vendor/depot_tools/update_depot_tools +16 -70
  123. data/vendor/depot_tools/update_depot_tools.bat +4 -18
  124. data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +10 -6
  125. metadata +15 -8
  126. data/patches/0001-Build-standalone-static-library.patch +0 -26
  127. data/vendor/depot_tools/git_utils/git-tree-prune +0 -122
@@ -23,7 +23,7 @@ class OwnersFinder(object):
23
23
  indentation = 0
24
24
 
25
25
  def __init__(self, files, local_root, author,
26
- fopen, os_path, glob,
26
+ fopen, os_path,
27
27
  email_postfix='@chromium.org',
28
28
  disable_color=False):
29
29
  self.email_postfix = email_postfix
@@ -34,7 +34,7 @@ class OwnersFinder(object):
34
34
  self.COLOR_GREY = ''
35
35
  self.COLOR_RESET = ''
36
36
 
37
- self.db = owners_module.Database(local_root, fopen, os_path, glob)
37
+ self.db = owners_module.Database(local_root, fopen, os_path)
38
38
  self.db.load_data_needed_for(files)
39
39
 
40
40
  self.os_path = os_path
@@ -43,28 +43,15 @@ class OwnersFinder(object):
43
43
 
44
44
  filtered_files = files
45
45
 
46
- # Eliminate files that author himself can review.
47
- if author:
48
- if author in self.db.owned_by:
49
- for dir_name in self.db.owned_by[author]:
50
- filtered_files = [
51
- file_name for file_name in filtered_files
52
- if not file_name.startswith(dir_name)]
53
-
54
- filtered_files = list(filtered_files)
55
-
56
- # Eliminate files that everyone can review.
57
- if owners_module.EVERYONE in self.db.owned_by:
58
- for dir_name in self.db.owned_by[owners_module.EVERYONE]:
59
- filtered_files = filter(
60
- lambda file_name: not file_name.startswith(dir_name),
61
- filtered_files)
46
+ # Eliminate files that the author can review.
47
+ filtered_files = list(self.db.files_not_covered_by(
48
+ filtered_files, [author] if author else []))
62
49
 
63
50
  # If some files are eliminated.
64
51
  if len(filtered_files) != len(files):
65
52
  files = filtered_files
66
53
  # Reload the database.
67
- self.db = owners_module.Database(local_root, fopen, os_path, glob)
54
+ self.db = owners_module.Database(local_root, fopen, os_path)
68
55
  self.db.load_data_needed_for(files)
69
56
 
70
57
  self.all_possible_owners = self.db.all_possible_owners(files, None)
@@ -1170,7 +1170,8 @@ def CheckGNFormatted(input_api, output_api):
1170
1170
  affected_files = input_api.AffectedFiles(
1171
1171
  include_deletes=False,
1172
1172
  file_filter=lambda x: x.LocalPath().endswith('.gn') or
1173
- x.LocalPath().endswith('.gni'))
1173
+ x.LocalPath().endswith('.gni') or
1174
+ x.LocalPath().endswith('.typemap'))
1174
1175
  warnings = []
1175
1176
  for f in affected_files:
1176
1177
  cmd = ['gn', 'format', '--dry-run', f.AbsoluteLocalPath()]
@@ -16,7 +16,7 @@ import cpplint
16
16
  import cPickle # Exposed through the API.
17
17
  import cStringIO # Exposed through the API.
18
18
  import contextlib
19
- import fnmatch
19
+ import fnmatch # Exposed through the API.
20
20
  import glob
21
21
  import inspect
22
22
  import itertools
@@ -244,13 +244,10 @@ class GerritAccessor(object):
244
244
  return self.GetChangeInfo(issue)['owner']['email']
245
245
 
246
246
  def GetChangeReviewers(self, issue, approving_only=True):
247
- # Gerrit has 'approved' sub-section, but it only lists 1 approver.
248
- # So, if we look only for approvers, we have to look at all anyway.
249
- # Also, assume LGTM means Code-Review label == 2. Other configurations
250
- # aren't supported.
251
- return [r['email']
252
- for r in self.GetChangeInfo(issue)['labels']['Code-Review']['all']
253
- if not approving_only or '2' == str(r.get('value', 0))]
247
+ cr = self.GetChangeInfo(issue)['labels']['Code-Review']
248
+ max_value = max(int(k) for k in cr['values'].keys())
249
+ return [r['email'] for r in cr['all']
250
+ if not approving_only or r.get('value', 0) == max_value]
254
251
 
255
252
 
256
253
  class OutputApi(object):
@@ -348,6 +345,7 @@ class InputApi(object):
348
345
  self.cPickle = cPickle
349
346
  self.cpplint = cpplint
350
347
  self.cStringIO = cStringIO
348
+ self.fnmatch = fnmatch
351
349
  self.glob = glob.glob
352
350
  self.json = json
353
351
  self.logging = logging.getLogger('PRESUBMIT')
@@ -389,7 +387,7 @@ class InputApi(object):
389
387
  # TODO(dpranke): figure out a list of all approved owners for a repo
390
388
  # in order to be able to handle wildcard OWNERS files?
391
389
  self.owners_db = owners.Database(change.RepositoryRoot(),
392
- fopen=file, os_path=self.os_path, glob=self.glob)
390
+ fopen=file, os_path=self.os_path)
393
391
  self.verbose = verbose
394
392
  self.Command = CommandData
395
393
 
@@ -1828,4 +1826,4 @@ if __name__ == '__main__':
1828
1826
  sys.exit(main())
1829
1827
  except KeyboardInterrupt:
1830
1828
  sys.stderr.write('interrupted\n')
1831
- sys.exit(1)
1829
+ sys.exit(2)
@@ -57,12 +57,14 @@ class BotUpdateApi(recipe_api.RecipeApi):
57
57
  patch=True, update_presentation=True,
58
58
  force=False, patch_root=None, no_shallow=False,
59
59
  with_branch_heads=False, refs=None,
60
- patch_oauth2=False,
60
+ patch_oauth2=False, use_site_config_creds=True,
61
61
  output_manifest=True, clobber=False,
62
62
  root_solution_revision=None, rietveld=None, issue=None,
63
63
  patchset=None, gerrit_no_reset=False, **kwargs):
64
64
  """
65
65
  Args:
66
+ use_site_config_creds: If the oauth2 credentials are in the buildbot
67
+ site_config. See crbug.com/624212 for more information.
66
68
  gclient_config: The gclient configuration to use when running bot_update.
67
69
  If omitted, the current gclient configuration is used.
68
70
  rietveld: The rietveld server to use. If omitted, will infer from
@@ -119,10 +121,16 @@ class BotUpdateApi(recipe_api.RecipeApi):
119
121
  # Point to the oauth2 auth files if specified.
120
122
  # These paths are where the bots put their credential files.
121
123
  if patch_oauth2:
122
- email_file = self.m.path['build'].join(
123
- 'site_config', '.rietveld_client_email')
124
- key_file = self.m.path['build'].join(
125
- 'site_config', '.rietveld_secret_key')
124
+ # TODO(martiniss): remove this hack :(. crbug.com/624212
125
+ if use_site_config_creds:
126
+ email_file = self.m.path['build'].join(
127
+ 'site_config', '.rietveld_client_email')
128
+ key_file = self.m.path['build'].join(
129
+ 'site_config', '.rietveld_secret_key')
130
+ else: #pragma: no cover
131
+ #TODO(martiniss): make this use path.join, so it works on windows
132
+ email_file = '/creds/rietveld/client_email'
133
+ key_file = '/creds/rietveld/secret_key'
126
134
  else:
127
135
  email_file = key_file = None
128
136
 
@@ -223,61 +231,67 @@ class BotUpdateApi(recipe_api.RecipeApi):
223
231
  name += ' - %s' % suffix
224
232
 
225
233
  # Ah hah! Now that everything is in place, lets run bot_update!
234
+ step_result = None
226
235
  try:
227
236
  # 87 and 88 are the 'patch failure' codes for patch download and patch
228
237
  # apply, respectively. We don't actually use the error codes, and instead
229
238
  # rely on emitted json to determine cause of failure.
230
- self(name, cmd, step_test_data=step_test_data,
239
+ step_result = self(name, cmd, step_test_data=step_test_data,
231
240
  ok_ret=(0, 87, 88), **kwargs)
241
+ except self.m.step.StepFailure as f:
242
+ step_result = f.result
243
+ raise
232
244
  finally:
233
- step_result = self.m.step.active_result
234
- self._last_returned_properties = step_result.json.output.get(
235
- 'properties', {})
236
-
237
- if update_presentation:
238
- # Set properties such as got_revision.
239
- for prop_name, prop_value in self.last_returned_properties.iteritems():
240
- step_result.presentation.properties[prop_name] = prop_value
241
- # Add helpful step description in the step UI.
242
- if 'step_text' in step_result.json.output:
243
- step_text = step_result.json.output['step_text']
244
- step_result.presentation.step_text = step_text
245
- # Add log line output.
246
- if 'log_lines' in step_result.json.output:
247
- for log_name, log_lines in step_result.json.output['log_lines']:
248
- step_result.presentation.logs[log_name] = log_lines.splitlines()
249
-
250
- # Set the "checkout" path for the main solution.
251
- # This is used by the Chromium module to figure out where to look for
252
- # the checkout.
253
- # If there is a patch failure, emit another step that said things failed.
254
- if step_result.json.output.get('patch_failure'):
255
- return_code = step_result.json.output.get('patch_apply_return_code')
256
- if return_code == 3:
257
- # This is download failure, hence an infra failure.
258
- # Sadly, python.failing_step doesn't support kwargs.
259
- self.m.python.inline(
260
- 'Patch failure',
261
- ('import sys;'
262
- 'print "Patch download failed. See bot_update step for details";'
263
- 'sys.exit(1)'),
264
- infra_step=True,
265
- step_test_data=lambda: self.m.raw_io.test_api.output(
266
- 'Patch download failed. See bot_update step for details',
267
- retcode=1)
268
- )
269
- else:
270
- # This is actual patch failure.
271
- self.m.tryserver.set_patch_failure_tryjob_result()
272
- self.m.python.failing_step(
273
- 'Patch failure', 'Check the bot_update step for details')
274
-
275
- # bot_update actually just sets root to be the folder name of the
276
- # first solution.
277
- if step_result.json.output['did_run']:
278
- co_root = step_result.json.output['root']
279
- cwd = kwargs.get('cwd', self.m.path['slave_build'])
280
- if 'checkout' not in self.m.path:
281
- self.m.path['checkout'] = cwd.join(*co_root.split(self.m.path.sep))
245
+ if step_result:
246
+ self._last_returned_properties = step_result.json.output.get(
247
+ 'properties', {})
248
+
249
+ if update_presentation:
250
+ # Set properties such as got_revision.
251
+ for prop_name, prop_value in (
252
+ self.last_returned_properties.iteritems()):
253
+ step_result.presentation.properties[prop_name] = prop_value
254
+ # Add helpful step description in the step UI.
255
+ if 'step_text' in step_result.json.output:
256
+ step_text = step_result.json.output['step_text']
257
+ step_result.presentation.step_text = step_text
258
+ # Add log line output.
259
+ if 'log_lines' in step_result.json.output:
260
+ for log_name, log_lines in step_result.json.output['log_lines']:
261
+ step_result.presentation.logs[log_name] = log_lines.splitlines()
262
+
263
+ # Set the "checkout" path for the main solution.
264
+ # This is used by the Chromium module to figure out where to look for
265
+ # the checkout.
266
+ # If there is a patch failure, emit another step that said things
267
+ # failed.
268
+ if step_result.json.output.get('patch_failure'):
269
+ return_code = step_result.json.output.get('patch_apply_return_code')
270
+ if return_code == 3:
271
+ # This is download failure, hence an infra failure.
272
+ # Sadly, python.failing_step doesn't support kwargs.
273
+ self.m.python.inline(
274
+ 'Patch failure',
275
+ ('import sys;'
276
+ 'print "Patch download failed. See bot_update step for'
277
+ ' details";sys.exit(1)'),
278
+ infra_step=True,
279
+ step_test_data=lambda: self.m.raw_io.test_api.output(
280
+ 'Patch download failed. See bot_update step for details',
281
+ retcode=1)
282
+ )
283
+ else:
284
+ # This is actual patch failure.
285
+ self.m.tryserver.set_patch_failure_tryjob_result()
286
+ self.m.python.failing_step(
287
+ 'Patch failure', 'Check the bot_update step for details')
288
+
289
+ # bot_update actually just sets root to be the folder name of the
290
+ # first solution.
291
+ if step_result.json.output['did_run']:
292
+ co_root = step_result.json.output['root']
293
+ cwd = kwargs.get('cwd', self.m.path['slave_build'])
294
+ if 'checkout' not in self.m.path:
295
+ self.m.path['checkout'] = cwd.join(*co_root.split(self.m.path.sep))
282
296
 
283
297
  return step_result
@@ -55,6 +55,7 @@
55
55
  {
56
56
  "name": "$result",
57
57
  "reason": "Infra Failure: Step('bot_update') returned 1",
58
+ "recipe_result": null,
58
59
  "status_code": 1
59
60
  }
60
61
  ]
@@ -76,6 +76,7 @@
76
76
  {
77
77
  "name": "$result",
78
78
  "reason": "Step('Patch failure') failed with return_code 1",
79
+ "recipe_result": null,
79
80
  "status_code": 1
80
81
  }
81
82
  ]
@@ -76,6 +76,7 @@
76
76
  {
77
77
  "name": "$result",
78
78
  "reason": "Infra Failure: Step('Patch failure') returned 1",
79
+ "recipe_result": null,
79
80
  "status_code": 1
80
81
  }
81
82
  ]
@@ -250,6 +250,8 @@ RECOGNIZED_PATHS = {
250
250
  CHROMIUM_SRC_URL,
251
251
  '/chrome/trunk/src/tools/cros.DEPS':
252
252
  CHROMIUM_GIT_HOST + '/chromium/src/tools/cros.DEPS.git',
253
+ '/chrome-internal/trunk/src-internal':
254
+ 'https://chrome-internal.googlesource.com/chrome/src-internal.git',
253
255
  }
254
256
  RECOGNIZED_PATHS.update(internal_data.get('RECOGNIZED_PATHS', {}))
255
257
 
@@ -32,23 +32,6 @@ class RevisionFallbackChain(RevisionResolver):
32
32
  self._default)
33
33
 
34
34
 
35
- class ProjectRevisionResolver(RevisionResolver):
36
- """Revision resolver that takes into account the project."""
37
- def __init__(self, project, parent_got_revision=None):
38
- self.project = project
39
- self.parent_got_revision = parent_got_revision or 'parent_got_revision'
40
-
41
- # TODO(phajdan.jr): Move to proper repo and add coverage.
42
- def resolve(self, properties): # pragma: no cover
43
- """Resolve the revision if project matches, otherwise default to HEAD."""
44
- if properties.get('project') == self.project:
45
- return (properties.get(self.parent_got_revision) or
46
- properties.get('revision') or
47
- 'HEAD')
48
- return (properties.get(self.parent_got_revision) or
49
- 'HEAD')
50
-
51
-
52
35
  def jsonish_to_python(spec, is_top=False):
53
36
  """Turn a json spec into a python parsable object.
54
37
 
@@ -252,14 +252,6 @@ def blink(c):
252
252
  del c.solutions[0].custom_deps
253
253
  c.revisions['src/third_party/WebKit'] = 'HEAD'
254
254
 
255
- @config_ctx(includes=['chromium'])
256
- def blink_or_chromium(c):
257
- c.solutions[0].revision = gclient_api.ProjectRevisionResolver('chromium')
258
- del c.solutions[0].custom_deps
259
- c.revisions['src/third_party/WebKit'] = \
260
- gclient_api.ProjectRevisionResolver(
261
- 'webkit', parent_got_revision='parent_got_webkit_revision')
262
-
263
255
  # TODO(phajdan.jr): Move to proper repo and add coverage.
264
256
  @config_ctx(includes=['chromium'])
265
257
  def blink_merged(c): # pragma: no cover
@@ -564,7 +556,9 @@ def infra(c):
564
556
 
565
557
  p = c.patch_projects
566
558
  p['luci-py'] = ('infra/luci', 'HEAD')
559
+ # TODO(phajdan.jr): remove recipes-py when it's not used for project name.
567
560
  p['recipes-py'] = ('infra/recipes-py', 'HEAD')
561
+ p['recipe_engine'] = ('infra/recipes-py', 'HEAD')
568
562
 
569
563
  @config_ctx(config_vars={'GIT_MODE': True})
570
564
  def infra_internal(c): # pragma: no cover
@@ -688,3 +682,10 @@ def valgrind(c): # pragma: no cover
688
682
  """Add Valgrind binaries to the gclient solution."""
689
683
  c.solutions[0].custom_deps['src/third_party/valgrind'] = \
690
684
  ChromiumGitURL(c, 'chromium', 'deps', 'valgrind', 'binaries')
685
+
686
+ @config_ctx(includes=['chromium'])
687
+ def chromedriver(c):
688
+ """Add Selenium Java tests to the gclient solution."""
689
+ c.solutions[0].custom_deps[
690
+ 'src/chrome/test/chromedriver/third_party/java_tests'] = (
691
+ ChromiumGitURL(c, 'chromium', 'deps', 'webdriver'))
@@ -13,11 +13,11 @@ TEST_CONFIGS = [
13
13
  'android',
14
14
  'android_bare',
15
15
  'blink',
16
- 'blink_or_chromium',
17
16
  'boringssl',
18
17
  'build_internal',
19
18
  'build_internal_scripts_slave',
20
19
  'catapult',
20
+ 'chromedriver',
21
21
  'chrome_internal',
22
22
  'chromium',
23
23
  'chromium_lkcr',
@@ -16,7 +16,7 @@ class GitApi(recipe_api.RecipeApi):
16
16
 
17
17
  def __call__(self, *args, **kwargs):
18
18
  """Return a git command step."""
19
- name = kwargs.pop('name', 'git '+args[0])
19
+ name = kwargs.pop('name', 'git ' + args[0])
20
20
  infra_step = kwargs.pop('infra_step', True)
21
21
  if 'cwd' not in kwargs:
22
22
  kwargs.setdefault('cwd', self.m.path['checkout'])
@@ -45,7 +45,8 @@ class GitApi(recipe_api.RecipeApi):
45
45
  'ensure git tooling on windows',
46
46
  [self.package_repo_resource('bootstrap', 'win', 'win_tools.bat')],
47
47
  infra_step=True,
48
- cwd=self.package_repo_resource())
48
+ cwd=self.package_repo_resource(),
49
+ timeout=300)
49
50
  self.initialized_win_git = True
50
51
 
51
52
  def fetch_tags(self, remote_name=None, **kwargs):
@@ -132,8 +133,10 @@ class GitApi(recipe_api.RecipeApi):
132
133
  curl_trace_file=None, can_fail_build=True,
133
134
  set_got_revision=False, remote_name=None,
134
135
  display_fetch_size=None, file_name=None,
135
- submodule_update_recursive=True):
136
- """Returns an iterable of steps to perform a full git checkout.
136
+ submodule_update_recursive=True,
137
+ use_git_cache=False):
138
+ """Performs a full git checkout and returns sha1 of checked out revision.
139
+
137
140
  Args:
138
141
  url (str): url of remote repo to use as upstream
139
142
  ref (str): ref to fetch and check out
@@ -156,6 +159,13 @@ class GitApi(recipe_api.RecipeApi):
156
159
  file_name (str): optional path to a single file to checkout.
157
160
  submodule_update_recursive (bool): if True, updates submodules
158
161
  recursively.
162
+ use_git_cache (bool): if True, git cache will be used for this checkout.
163
+ WARNING, this is EXPERIMENTAL!!! This wasn't tested with:
164
+ * submodules
165
+ * since origin url is modified
166
+ to a local path, may cause problem with scripts that do
167
+ "git fetch origin" or "git push origin".
168
+ * arbitrary refs such refs/whatever/not-fetched-by-default-to-cache
159
169
 
160
170
  Returns: If the checkout was successful, this returns the commit hash of
161
171
  the checked-out-repo. Otherwise this returns None.
@@ -198,6 +208,12 @@ class GitApi(recipe_api.RecipeApi):
198
208
  self.resource('git_setup.py'),
199
209
  git_setup_args)
200
210
 
211
+ if use_git_cache:
212
+ self('retry', 'cache', 'fetch', '-c', self.m.path['git_cache'],
213
+ cwd=dir_path,
214
+ name='fetch cache',
215
+ can_fail_build=can_fail_build)
216
+
201
217
  # There are five kinds of refs we can be handed:
202
218
  # 0) None. In this case, we default to properties['branch'].
203
219
  # 1) A 40-character SHA1 hash.
@@ -148,6 +148,7 @@
148
148
  {
149
149
  "name": "$result",
150
150
  "reason": "Infra Failure: Step('git status can_fail_build') returned 1",
151
+ "recipe_result": null,
151
152
  "status_code": 1
152
153
  }
153
154
  ]
@@ -97,6 +97,7 @@
97
97
  {
98
98
  "name": "$result",
99
99
  "reason": "count-objects failed: invalid literal for long() with base 10: 'xxx'",
100
+ "recipe_result": null,
100
101
  "status_code": 1
101
102
  }
102
103
  ]