libv8 4.5.95.5 → 5.0.71.48.0beta2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (332) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +45 -19
  3. data/CHANGELOG.md +14 -0
  4. data/README.md +30 -15
  5. data/Rakefile +7 -6
  6. data/ext/libv8/arch.rb +5 -4
  7. data/ext/libv8/builder.rb +25 -19
  8. data/ext/libv8/compiler.rb +6 -33
  9. data/ext/libv8/location.rb +7 -8
  10. data/lib/libv8/version.rb +1 -1
  11. data/libv8.gemspec +1 -1
  12. data/patches/build-standalone-static-library.patch +14 -0
  13. data/patches/disable-building-tests.patch +48 -10
  14. data/patches/fPIC-for-static.patch +3 -3
  15. data/release/x86-linux/Vagrantfile +8 -4
  16. data/release/x86_64-freebsd10/Vagrantfile +86 -0
  17. data/release/x86_64-linux/Vagrantfile +8 -4
  18. data/spec/compiler_spec.rb +5 -29
  19. data/spec/support/compiler_helpers.rb +2 -4
  20. data/vendor/depot_tools/.gitignore +15 -3
  21. data/vendor/depot_tools/OWNERS +2 -2
  22. data/vendor/depot_tools/PRESUBMIT.py +4 -2
  23. data/vendor/depot_tools/WATCHLISTS +6 -0
  24. data/vendor/depot_tools/apply_issue.py +70 -38
  25. data/vendor/depot_tools/bootstrap/win/README.md +66 -0
  26. data/vendor/depot_tools/bootstrap/win/git-bash.template.sh +12 -0
  27. data/vendor/depot_tools/bootstrap/win/git.template.bat +5 -0
  28. data/vendor/depot_tools/bootstrap/win/profile.d.python.sh +20 -0
  29. data/vendor/depot_tools/bootstrap/win/win_tools.bat +96 -45
  30. data/vendor/depot_tools/breakpad.py +6 -141
  31. data/vendor/depot_tools/buildbucket.py +45 -31
  32. data/vendor/depot_tools/cbuildbot +1 -0
  33. data/vendor/depot_tools/checkout.py +2 -1
  34. data/vendor/depot_tools/chrome_set_ver +1 -0
  35. data/vendor/depot_tools/cit +8 -0
  36. data/vendor/depot_tools/cit.bat +11 -0
  37. data/vendor/depot_tools/cit.py +120 -0
  38. data/vendor/depot_tools/codereview.settings +0 -2
  39. data/vendor/depot_tools/commit_queue +1 -5
  40. data/vendor/depot_tools/commit_queue.bat +1 -4
  41. data/vendor/depot_tools/commit_queue.py +78 -29
  42. data/vendor/depot_tools/cpplint.py +22 -14
  43. data/vendor/depot_tools/cros +1 -0
  44. data/vendor/depot_tools/cros_sdk +1 -0
  45. data/vendor/depot_tools/depot-tools-auth.py +3 -3
  46. data/vendor/depot_tools/download_from_google_storage.py +101 -21
  47. data/vendor/depot_tools/drover.py +2 -3
  48. data/vendor/depot_tools/fetch.py +31 -27
  49. data/vendor/depot_tools/{recipes → fetch_configs}/android.py +4 -4
  50. data/vendor/depot_tools/fetch_configs/breakpad.py +45 -0
  51. data/vendor/depot_tools/{recipes → fetch_configs}/chromium.py +3 -3
  52. data/vendor/depot_tools/{recipes/recipe_util.py → fetch_configs/config_util.py} +3 -3
  53. data/vendor/depot_tools/fetch_configs/crashpad.py +41 -0
  54. data/vendor/depot_tools/{recipes → fetch_configs}/dart.py +3 -3
  55. data/vendor/depot_tools/{recipes/pdfium.py → fetch_configs/dartino.py} +14 -13
  56. data/vendor/depot_tools/{recipes → fetch_configs}/dartium.py +3 -3
  57. data/vendor/depot_tools/{recipes → fetch_configs}/depot_tools.py +3 -3
  58. data/vendor/depot_tools/fetch_configs/gyp.py +42 -0
  59. data/vendor/depot_tools/{recipes → fetch_configs}/infra.py +3 -3
  60. data/vendor/depot_tools/{recipes → fetch_configs}/infra_internal.py +3 -3
  61. data/vendor/depot_tools/{recipes → fetch_configs}/ios.py +4 -4
  62. data/vendor/depot_tools/{recipes → fetch_configs}/mojo.py +3 -3
  63. data/vendor/depot_tools/{recipes → fetch_configs}/nacl.py +3 -3
  64. data/vendor/depot_tools/{recipes → fetch_configs}/naclports.py +3 -3
  65. data/vendor/depot_tools/fetch_configs/pdfium.py +40 -0
  66. data/vendor/depot_tools/{recipes → fetch_configs}/skia.py +3 -3
  67. data/vendor/depot_tools/{recipes → fetch_configs}/skia_buildbot.py +3 -3
  68. data/vendor/depot_tools/fetch_configs/syzygy.py +41 -0
  69. data/vendor/depot_tools/{recipes → fetch_configs}/v8.py +3 -3
  70. data/vendor/depot_tools/{recipes → fetch_configs}/webrtc.py +3 -3
  71. data/vendor/depot_tools/{recipes → fetch_configs}/webrtc_android.py +4 -4
  72. data/vendor/depot_tools/{recipes → fetch_configs}/webrtc_ios.py +4 -4
  73. data/vendor/depot_tools/fix_encoding.py +6 -6
  74. data/vendor/depot_tools/gcl.py +11 -21
  75. data/vendor/depot_tools/gclient +10 -0
  76. data/vendor/depot_tools/gclient-new-workdir.py +7 -38
  77. data/vendor/depot_tools/gclient.bat +2 -2
  78. data/vendor/depot_tools/gclient.py +85 -65
  79. data/vendor/depot_tools/gclient_scm.py +83 -10
  80. data/vendor/depot_tools/gclient_utils.py +5 -1
  81. data/vendor/depot_tools/gerrit_util.py +243 -26
  82. data/vendor/depot_tools/git-auto-svn +1 -1
  83. data/vendor/depot_tools/git-cache +1 -1
  84. data/vendor/depot_tools/git-cherry-pick-upload +1 -1
  85. data/vendor/depot_tools/git-cl +1 -1
  86. data/vendor/depot_tools/git-drover +6 -0
  87. data/vendor/depot_tools/git-find-releases +6 -0
  88. data/vendor/depot_tools/git-footers +1 -1
  89. data/vendor/depot_tools/git-freeze +1 -1
  90. data/vendor/depot_tools/git-gs +1 -1
  91. data/vendor/depot_tools/git-hyper-blame +6 -0
  92. data/vendor/depot_tools/git-map +1 -1
  93. data/vendor/depot_tools/git-map-branches +1 -1
  94. data/vendor/depot_tools/git-mark-merge-base +1 -1
  95. data/vendor/depot_tools/git-nav-downstream +1 -1
  96. data/vendor/depot_tools/git-new-branch +1 -1
  97. data/vendor/depot_tools/git-number +1 -1
  98. data/vendor/depot_tools/git-rebase-update +1 -1
  99. data/vendor/depot_tools/git-rename-branch +1 -1
  100. data/vendor/depot_tools/git-reparent-branch +1 -1
  101. data/vendor/depot_tools/git-retry +1 -1
  102. data/vendor/depot_tools/git-squash-branch +1 -1
  103. data/vendor/depot_tools/git-thaw +1 -1
  104. data/vendor/depot_tools/git-try +1 -1
  105. data/vendor/depot_tools/git-upstream-diff +1 -1
  106. data/vendor/depot_tools/git_auto_svn.py +24 -6
  107. data/vendor/depot_tools/git_cache.py +74 -27
  108. data/vendor/depot_tools/git_cl.py +2118 -747
  109. data/vendor/depot_tools/git_common.py +100 -6
  110. data/vendor/depot_tools/git_dates.py +62 -0
  111. data/vendor/depot_tools/git_drover.py +424 -0
  112. data/vendor/depot_tools/git_find_releases.py +65 -0
  113. data/vendor/depot_tools/git_footers.py +42 -0
  114. data/vendor/depot_tools/git_hyper_blame.py +391 -0
  115. data/vendor/depot_tools/git_map_branches.py +8 -6
  116. data/vendor/depot_tools/git_new_branch.py +6 -1
  117. data/vendor/depot_tools/git_rebase_update.py +56 -16
  118. data/vendor/depot_tools/git_reparent_branch.py +13 -0
  119. data/vendor/depot_tools/git_try.py +0 -2
  120. data/vendor/depot_tools/gsutil.py +51 -20
  121. data/vendor/depot_tools/infra/config/OWNERS +3 -1
  122. data/vendor/depot_tools/infra/config/cq.cfg +7 -3
  123. data/vendor/depot_tools/infra/config/recipes.cfg +9 -0
  124. data/vendor/depot_tools/luci_hacks/README.md +35 -0
  125. data/vendor/depot_tools/{bootstrap/virtualenv/tests → luci_hacks}/__init__.py +0 -0
  126. data/vendor/depot_tools/luci_hacks/luci_recipe_run.isolate +12 -0
  127. data/vendor/depot_tools/luci_hacks/luci_recipe_run.py +81 -0
  128. data/vendor/depot_tools/luci_hacks/trigger_luci_job.py +128 -0
  129. data/vendor/depot_tools/man/html/depot_tools.html +9 -1
  130. data/vendor/depot_tools/man/html/depot_tools_tutorial.html +4 -4
  131. data/vendor/depot_tools/man/html/git-drover.html +191 -35
  132. data/vendor/depot_tools/man/html/git-hyper-blame.html +878 -0
  133. data/vendor/depot_tools/man/html/git-rebase-update.html +9 -4
  134. data/vendor/depot_tools/man/man1/git-drover.1 +189 -36
  135. data/vendor/depot_tools/man/man1/git-hyper-blame.1 +128 -0
  136. data/vendor/depot_tools/man/man1/git-rebase-update.1 +8 -6
  137. data/vendor/depot_tools/man/man7/depot_tools.7 +9 -4
  138. data/vendor/depot_tools/man/src/_git-hyper-blame_desc.helper.txt +1 -0
  139. data/vendor/depot_tools/man/src/common_demo_functions.sh +5 -0
  140. data/vendor/depot_tools/man/src/depot_tools_tutorial.txt +1 -1
  141. data/vendor/depot_tools/man/src/git-drover.demo.1.sh +11 -16
  142. data/vendor/depot_tools/man/src/git-drover.demo.3.sh +27 -0
  143. data/vendor/depot_tools/man/src/git-drover.demo.4.sh +39 -0
  144. data/vendor/depot_tools/man/src/git-drover.txt +49 -3
  145. data/vendor/depot_tools/man/src/git-hyper-blame.demo.1.sh +3 -0
  146. data/vendor/depot_tools/man/src/git-hyper-blame.demo.2.sh +4 -0
  147. data/vendor/depot_tools/man/src/git-hyper-blame.demo.common.sh +57 -0
  148. data/vendor/depot_tools/man/src/git-hyper-blame.txt +85 -0
  149. data/vendor/depot_tools/man/src/git-rebase-update.txt +5 -1
  150. data/vendor/depot_tools/my_activity.py +6 -21
  151. data/vendor/depot_tools/ninja +2 -2
  152. data/vendor/depot_tools/ninja-linux32 +0 -0
  153. data/vendor/depot_tools/ninja-linux64 +0 -0
  154. data/vendor/depot_tools/ninja-mac +0 -0
  155. data/vendor/depot_tools/ninja.exe +0 -0
  156. data/vendor/depot_tools/presubmit_canned_checks.py +83 -69
  157. data/vendor/depot_tools/presubmit_support.py +126 -42
  158. data/vendor/depot_tools/pylint.py +5 -1
  159. data/vendor/depot_tools/python_runner.sh +55 -0
  160. data/vendor/depot_tools/recipe_modules/bot_update/__init__.py +32 -0
  161. data/vendor/depot_tools/recipe_modules/bot_update/api.py +283 -0
  162. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic.json +56 -0
  163. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_output_manifest.json +63 -0
  164. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json +57 -0
  165. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/clobber.json +44 -0
  166. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/forced.json +57 -0
  167. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_reset.json +44 -0
  168. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/no_shallow.json +44 -0
  169. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/off.json +43 -0
  170. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json +43 -0
  171. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/svn_mode.json +59 -0
  172. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange.json +58 -0
  173. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2.json +60 -0
  174. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob.json +58 -0
  175. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail.json +60 -0
  176. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json +81 -0
  177. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json +81 -0
  178. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle.json +49 -0
  179. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8.json +61 -0
  180. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8_head_by_default.json +51 -0
  181. data/vendor/depot_tools/recipe_modules/bot_update/example.py +172 -0
  182. data/vendor/depot_tools/{bootstrap/virtualenv/virtualenv_support → recipe_modules/bot_update/resources}/__init__.py +0 -0
  183. data/vendor/depot_tools/recipe_modules/bot_update/resources/bot_update.py +1764 -0
  184. data/vendor/depot_tools/recipe_modules/bot_update/test_api.py +86 -0
  185. data/vendor/depot_tools/recipe_modules/depot_tools/__init__.py +3 -0
  186. data/vendor/depot_tools/recipe_modules/depot_tools/api.py +27 -0
  187. data/vendor/depot_tools/recipe_modules/gclient/__init__.py +10 -0
  188. data/vendor/depot_tools/recipe_modules/gclient/api.py +378 -0
  189. data/vendor/depot_tools/recipe_modules/gclient/config.py +671 -0
  190. data/vendor/depot_tools/recipe_modules/gclient/example.expected/basic.json +172 -0
  191. data/vendor/depot_tools/recipe_modules/gclient/example.expected/revision.json +174 -0
  192. data/vendor/depot_tools/recipe_modules/gclient/example.expected/tryserver.json +185 -0
  193. data/vendor/depot_tools/recipe_modules/gclient/example.py +100 -0
  194. data/vendor/depot_tools/recipe_modules/gclient/test_api.py +37 -0
  195. data/vendor/depot_tools/recipe_modules/git/__init__.py +9 -0
  196. data/vendor/depot_tools/recipe_modules/git/api.py +377 -0
  197. data/vendor/depot_tools/recipe_modules/git/example.expected/basic.json +177 -0
  198. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_branch.json +177 -0
  199. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_file_name.json +179 -0
  200. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_hash.json +176 -0
  201. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_ref.json +177 -0
  202. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_submodule_update_force.json +178 -0
  203. data/vendor/depot_tools/recipe_modules/git/example.expected/can_fail_build.json +153 -0
  204. data/vendor/depot_tools/recipe_modules/git/example.expected/cannot_fail_build.json +181 -0
  205. data/vendor/depot_tools/recipe_modules/git/example.expected/cat-file_test.json +199 -0
  206. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_delta.json +250 -0
  207. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_failed.json +181 -0
  208. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output.json +182 -0
  209. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output_fails_build.json +102 -0
  210. data/vendor/depot_tools/recipe_modules/git/example.expected/curl_trace_file.json +181 -0
  211. data/vendor/depot_tools/recipe_modules/git/example.expected/platform_win.json +186 -0
  212. data/vendor/depot_tools/recipe_modules/git/example.expected/rebase_failed.json +179 -0
  213. data/vendor/depot_tools/recipe_modules/git/example.expected/remote_not_origin.json +179 -0
  214. data/vendor/depot_tools/recipe_modules/git/example.expected/set_got_revision.json +178 -0
  215. data/vendor/depot_tools/recipe_modules/git/example.py +147 -0
  216. data/vendor/depot_tools/recipe_modules/git/resources/git_setup.py +61 -0
  217. data/vendor/depot_tools/recipe_modules/git/test_api.py +18 -0
  218. data/vendor/depot_tools/recipe_modules/git_cl/__init__.py +4 -0
  219. data/vendor/depot_tools/recipe_modules/git_cl/api.py +25 -0
  220. data/vendor/depot_tools/recipe_modules/git_cl/config.py +22 -0
  221. data/vendor/depot_tools/recipe_modules/git_cl/example.expected/basic.json +66 -0
  222. data/vendor/depot_tools/recipe_modules/git_cl/example.py +41 -0
  223. data/vendor/depot_tools/recipe_modules/infra_paths/__init__.py +4 -0
  224. data/vendor/depot_tools/recipe_modules/infra_paths/api.py +12 -0
  225. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/basic.json +14 -0
  226. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +14 -0
  227. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +14 -0
  228. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +14 -0
  229. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +14 -0
  230. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +14 -0
  231. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +14 -0
  232. data/vendor/depot_tools/recipe_modules/infra_paths/example.py +28 -0
  233. data/vendor/depot_tools/recipe_modules/infra_paths/path_config.py +45 -0
  234. data/vendor/depot_tools/recipe_modules/presubmit/__init__.py +4 -0
  235. data/vendor/depot_tools/recipe_modules/presubmit/api.py +20 -0
  236. data/vendor/depot_tools/recipe_modules/presubmit/example.expected/basic.json +18 -0
  237. data/vendor/depot_tools/recipe_modules/presubmit/example.py +15 -0
  238. data/vendor/depot_tools/recipe_modules/rietveld/__init__.py +5 -0
  239. data/vendor/depot_tools/recipe_modules/rietveld/api.py +94 -0
  240. data/vendor/depot_tools/recipe_modules/rietveld/example.expected/basic.json +30 -0
  241. data/vendor/depot_tools/recipe_modules/rietveld/example.py +24 -0
  242. data/vendor/depot_tools/recipe_modules/tryserver/__init__.py +15 -0
  243. data/vendor/depot_tools/recipe_modules/tryserver/api.py +280 -0
  244. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_git_patch.json +104 -0
  245. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch.json +58 -0
  246. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch_new.json +58 -0
  247. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_svn_patch.json +68 -0
  248. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch.json +43 -0
  249. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch_new.json +43 -0
  250. data/vendor/depot_tools/recipe_modules/tryserver/example.py +53 -0
  251. data/vendor/depot_tools/recipe_modules/tryserver/test_api.py +7 -0
  252. data/vendor/depot_tools/recipes.py +136 -0
  253. data/vendor/depot_tools/repo +1 -1
  254. data/vendor/depot_tools/rietveld.py +46 -15
  255. data/vendor/depot_tools/roll_dep.py +97 -36
  256. data/vendor/depot_tools/scm.py +3 -3
  257. data/vendor/depot_tools/setup_color.py +94 -0
  258. data/vendor/depot_tools/subprocess2.py +10 -1
  259. data/vendor/depot_tools/third_party/cq_client/OWNERS +0 -1
  260. data/vendor/depot_tools/third_party/cq_client/README.md +47 -9
  261. data/vendor/depot_tools/third_party/cq_client/cq.pb.go +617 -0
  262. data/vendor/depot_tools/third_party/cq_client/cq.proto +75 -17
  263. data/vendor/depot_tools/third_party/cq_client/cq_pb2.py +168 -41
  264. data/vendor/depot_tools/third_party/cq_client/testdata/cq_gerrit.cfg +55 -0
  265. data/vendor/depot_tools/third_party/cq_client/{test/cq_example.cfg → testdata/cq_rietveld.cfg} +14 -6
  266. data/vendor/depot_tools/third_party/fancy_urllib/README +5 -4
  267. data/vendor/depot_tools/third_party/fancy_urllib/__init__.py +114 -52
  268. data/vendor/depot_tools/third_party/protobuf26/README.chromium +9 -6
  269. data/vendor/depot_tools/third_party/upload.py +17 -31
  270. data/vendor/depot_tools/trychange.py +0 -2
  271. data/vendor/depot_tools/update_depot_tools +29 -11
  272. data/vendor/depot_tools/update_depot_tools.bat +4 -9
  273. data/vendor/depot_tools/upload_to_google_storage.py +42 -5
  274. data/vendor/depot_tools/win_toolchain/OWNERS +1 -0
  275. data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +227 -52
  276. data/vendor/depot_tools/win_toolchain/package_from_installed.py +203 -88
  277. metadata +161 -81
  278. data/patches/arm/do-not-imply-vfp3-and-armv7.patch +0 -16
  279. data/patches/arm/do-not-use-vfp2.patch +0 -13
  280. data/patches/clang51/no-unused-variable.patch +0 -12
  281. data/vendor/depot_tools/bootstrap/.gitignore +0 -2
  282. data/vendor/depot_tools/bootstrap/bootstrap.py +0 -234
  283. data/vendor/depot_tools/bootstrap/deps.pyl +0 -15
  284. data/vendor/depot_tools/bootstrap/util.py +0 -87
  285. data/vendor/depot_tools/bootstrap/virtualenv/.gitignore +0 -10
  286. data/vendor/depot_tools/bootstrap/virtualenv/.travis.yml +0 -28
  287. data/vendor/depot_tools/bootstrap/virtualenv/AUTHORS.txt +0 -91
  288. data/vendor/depot_tools/bootstrap/virtualenv/CONTRIBUTING.rst +0 -21
  289. data/vendor/depot_tools/bootstrap/virtualenv/LICENSE.txt +0 -22
  290. data/vendor/depot_tools/bootstrap/virtualenv/MANIFEST.in +0 -11
  291. data/vendor/depot_tools/bootstrap/virtualenv/README.rst +0 -10
  292. data/vendor/depot_tools/bootstrap/virtualenv/bin/rebuild-script.py +0 -71
  293. data/vendor/depot_tools/bootstrap/virtualenv/docs/changes.rst +0 -747
  294. data/vendor/depot_tools/bootstrap/virtualenv/docs/conf.py +0 -149
  295. data/vendor/depot_tools/bootstrap/virtualenv/docs/development.rst +0 -61
  296. data/vendor/depot_tools/bootstrap/virtualenv/docs/index.rst +0 -137
  297. data/vendor/depot_tools/bootstrap/virtualenv/docs/installation.rst +0 -58
  298. data/vendor/depot_tools/bootstrap/virtualenv/docs/make.bat +0 -170
  299. data/vendor/depot_tools/bootstrap/virtualenv/docs/reference.rst +0 -256
  300. data/vendor/depot_tools/bootstrap/virtualenv/docs/userguide.rst +0 -249
  301. data/vendor/depot_tools/bootstrap/virtualenv/scripts/virtualenv +0 -3
  302. data/vendor/depot_tools/bootstrap/virtualenv/setup.py +0 -111
  303. data/vendor/depot_tools/bootstrap/virtualenv/tests/test_activate.sh +0 -94
  304. data/vendor/depot_tools/bootstrap/virtualenv/tests/test_activate_expected.output +0 -2
  305. data/vendor/depot_tools/bootstrap/virtualenv/tests/test_virtualenv.py +0 -139
  306. data/vendor/depot_tools/bootstrap/virtualenv/tests/tox.ini +0 -12
  307. data/vendor/depot_tools/bootstrap/virtualenv/tox.ini +0 -17
  308. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv.py +0 -2367
  309. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.bat +0 -26
  310. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.csh +0 -42
  311. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.fish +0 -74
  312. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.ps1 +0 -150
  313. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.sh +0 -80
  314. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate_this.py +0 -34
  315. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/deactivate.bat +0 -20
  316. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/distutils-init.py +0 -101
  317. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/distutils.cfg +0 -6
  318. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/site.py +0 -758
  319. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_support/pip-6.0-py2.py3-none-any.whl +0 -0
  320. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_support/setuptools-8.2.1-py2.py3-none-any.whl +0 -0
  321. data/vendor/depot_tools/bootstrap/win/README.google +0 -16
  322. data/vendor/depot_tools/cbuildbot +0 -96
  323. data/vendor/depot_tools/chrome_set_ver +0 -96
  324. data/vendor/depot_tools/cros +0 -96
  325. data/vendor/depot_tools/cros_sdk +0 -96
  326. data/vendor/depot_tools/git-cl-upload-hook +0 -52
  327. data/vendor/depot_tools/git-crup +0 -45
  328. data/vendor/depot_tools/python_git_runner.sh +0 -36
  329. data/vendor/depot_tools/recipes/blink.py +0 -59
  330. data/vendor/depot_tools/third_party/cq_client/test/validate_config_test.py +0 -52
  331. data/vendor/depot_tools/third_party/cq_client/validate_config.py +0 -108
  332. data/vendor/depot_tools/win_toolchain/toolchain2013.py +0 -494
@@ -0,0 +1,14 @@
1
+ [
2
+ {
3
+ "cmd": [],
4
+ "name": "show cache path",
5
+ "~followup_annotations": [
6
+ "@@@STEP_TEXT@[CACHE]@@@"
7
+ ]
8
+ },
9
+ {
10
+ "name": "$result",
11
+ "recipe_result": null,
12
+ "status_code": 0
13
+ }
14
+ ]
@@ -0,0 +1,14 @@
1
+ [
2
+ {
3
+ "cmd": [],
4
+ "name": "show cache path",
5
+ "~followup_annotations": [
6
+ "@@@STEP_TEXT@[CACHE]@@@"
7
+ ]
8
+ },
9
+ {
10
+ "name": "$result",
11
+ "recipe_result": null,
12
+ "status_code": 0
13
+ }
14
+ ]
@@ -0,0 +1,14 @@
1
+ [
2
+ {
3
+ "cmd": [],
4
+ "name": "show cache path",
5
+ "~followup_annotations": [
6
+ "@@@STEP_TEXT@[CACHE]@@@"
7
+ ]
8
+ },
9
+ {
10
+ "name": "$result",
11
+ "recipe_result": null,
12
+ "status_code": 0
13
+ }
14
+ ]
@@ -0,0 +1,14 @@
1
+ [
2
+ {
3
+ "cmd": [],
4
+ "name": "show cache path",
5
+ "~followup_annotations": [
6
+ "@@@STEP_TEXT@[CACHE]@@@"
7
+ ]
8
+ },
9
+ {
10
+ "name": "$result",
11
+ "recipe_result": null,
12
+ "status_code": 0
13
+ }
14
+ ]
@@ -0,0 +1,28 @@
1
+ # Copyright 2016 The Chromium Authors. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ DEPS = [
6
+ 'infra_paths',
7
+ 'recipe_engine/path',
8
+ 'recipe_engine/platform',
9
+ 'recipe_engine/properties',
10
+ 'recipe_engine/step',
11
+ ]
12
+
13
+
14
+ def RunSteps(api):
15
+ api.step('show cache path', [])
16
+ api.step.active_result.presentation.step_text = str(api.path['cache'])
17
+
18
+
19
+ def GenTests(api):
20
+ yield api.test('basic')
21
+
22
+ for platform in ('linux', 'mac', 'win'):
23
+ for path_config in ('buildbot', 'kitchen'):
24
+ yield (
25
+ api.test('paths_%s_%s' % (path_config, platform)) +
26
+ api.platform.name(platform) +
27
+ api.properties(path_config=path_config)
28
+ )
@@ -0,0 +1,45 @@
1
+ # Copyright 2016 The Chromium Authors. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ import DEPS
6
+ CONFIG_CTX = DEPS['path'].CONFIG_CTX
7
+
8
+
9
+ @CONFIG_CTX()
10
+ def infra_common(c):
11
+ c.dynamic_paths['checkout'] = None
12
+
13
+
14
+ @CONFIG_CTX(includes=['infra_common'])
15
+ def infra_buildbot(c):
16
+ c.base_paths['root'] = c.CURRENT_WORKING_DIR[:-4]
17
+ c.base_paths['slave_build'] = c.CURRENT_WORKING_DIR
18
+ c.base_paths['cache'] = c.base_paths['root'] + (
19
+ 'build', 'slave', 'cache')
20
+ c.base_paths['git_cache'] = c.base_paths['root'] + (
21
+ 'build', 'slave', 'cache_dir')
22
+ c.base_paths['goma_cache'] = c.base_paths['root'] + (
23
+ 'build', 'slave', 'goma_cache')
24
+ for token in ('build_internal', 'build', 'depot_tools'):
25
+ c.base_paths[token] = c.base_paths['root'] + (token,)
26
+
27
+
28
+ @CONFIG_CTX(includes=['infra_common'])
29
+ def infra_kitchen(c):
30
+ c.base_paths['root'] = c.CURRENT_WORKING_DIR
31
+ c.base_paths['slave_build'] = c.CURRENT_WORKING_DIR
32
+ # TODO(phajdan.jr): have one cache dir, let clients append suffixes.
33
+ # TODO(phajdan.jr): set persistent cache path for remaining platforms.
34
+ # NOTE: do not use /b/swarm_slave here - it gets deleted on bot redeploy,
35
+ # and may happen even after a reboot.
36
+ if c.PLATFORM == 'linux':
37
+ c.base_paths['cache'] = (
38
+ '/', 'b', 'cache', 'chromium')
39
+ for path in ('builder_cache', 'git_cache', 'goma_cache', 'goma_deps_cache'):
40
+ c.base_paths[path] = c.base_paths['cache'] + (path,)
41
+ else:
42
+ c.base_paths['cache'] = c.base_paths['root'] + ('cache',)
43
+ c.base_paths['git_cache'] = c.base_paths['root'] + ('cache_dir',)
44
+ for path in ('builder_cache', 'goma_cache', 'goma_deps_cache'):
45
+ c.base_paths[path] = c.base_paths['cache'] + (path,)
@@ -0,0 +1,4 @@
1
+ DEPS = [
2
+ 'recipe_engine/path',
3
+ 'recipe_engine/python',
4
+ ]
@@ -0,0 +1,20 @@
1
+ # Copyright 2016 The Chromium Authors. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ from recipe_engine import recipe_api
6
+
7
+ class PresubmitApi(recipe_api.RecipeApi):
8
+ def __call__(self, *args, **kwargs):
9
+ """Return a presubmit step."""
10
+
11
+ name = kwargs.pop('name', 'presubmit')
12
+
13
+ kwargs.setdefault('env', {})
14
+ kwargs['env'].setdefault('PATH', '%(PATH)s')
15
+ kwargs['env']['PATH'] = self.m.path.pathsep.join([
16
+ kwargs['env']['PATH'], str(self._module.PACKAGE_REPO_ROOT)])
17
+
18
+ return self.m.python(
19
+ name, self.package_repo_resource('presubmit_support.py'), list(args),
20
+ **kwargs)
@@ -0,0 +1,18 @@
1
+ [
2
+ {
3
+ "cmd": [
4
+ "python",
5
+ "-u",
6
+ "RECIPE_PACKAGE_REPO[depot_tools]/presubmit_support.py"
7
+ ],
8
+ "env": {
9
+ "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
10
+ },
11
+ "name": "presubmit"
12
+ },
13
+ {
14
+ "name": "$result",
15
+ "recipe_result": null,
16
+ "status_code": 0
17
+ }
18
+ ]
@@ -0,0 +1,15 @@
1
+ # Copyright 2016 The Chromium Authors. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ DEPS = [
6
+ 'presubmit',
7
+ ]
8
+
9
+
10
+ def RunSteps(api):
11
+ api.presubmit()
12
+
13
+
14
+ def GenTests(api):
15
+ yield api.test('basic')
@@ -0,0 +1,5 @@
1
+ DEPS = [
2
+ 'recipe_engine/path',
3
+ 'recipe_engine/properties',
4
+ 'recipe_engine/python',
5
+ ]
@@ -0,0 +1,94 @@
1
+ # Copyright 2013 The Chromium Authors. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ import urlparse
6
+
7
+ from recipe_engine import recipe_api
8
+
9
+
10
+ class RietveldApi(recipe_api.RecipeApi):
11
+ def calculate_issue_root(self, extra_patch_project_roots=None):
12
+ """Returns path where a patch should be applied to based on "patch_project".
13
+
14
+ YOU SHOULD NOT USE THIS METHOD. Put this into gclient's config as
15
+ patch_projects instead, and with luck you won't need to use
16
+ calculate_patch_root from gclient api.
17
+ TODO(tandrii): remove this method completely. See http://crbug.com/605563.
18
+
19
+ Maps Rietveld's "patch_project" to a path of directories relative to
20
+ api.gclient.c.solutions[0].name which describe where to place the patch.
21
+
22
+ Args:
23
+ extra_patch_project_roots: Dict mapping project names to relative roots.
24
+
25
+ Returns:
26
+ Relative path or empty string if patch_project is not set or path for a
27
+ given is unknown.
28
+ """
29
+ # Property 'patch_project' is set by Rietveld, 'project' is set by git-try
30
+ # when TRYSERVER_PROJECT is present in codereview.settings.
31
+ patch_project = (self.m.properties.get('patch_project') or
32
+ self.m.properties.get('project'))
33
+
34
+ # Please avoid adding projects into this hard-coded list unless your project
35
+ # CLs are being run by multiple recipes. Instead pass patch_project_roots to
36
+ # ensure_checkout.
37
+ patch_project_roots = {
38
+ 'angle/angle': ['third_party', 'angle'],
39
+ 'blink': ['third_party', 'WebKit'],
40
+ 'v8': ['v8'],
41
+ 'luci-py': ['luci'],
42
+ 'recipes-py': ['recipes-py'],
43
+ }
44
+
45
+ # Make sure to update common projects (above) with extra projects (and not
46
+ # vice versa, so that recipes can override default values if needed.
47
+ if extra_patch_project_roots:
48
+ patch_project_roots.update(extra_patch_project_roots)
49
+
50
+ path_parts = patch_project_roots.get(patch_project)
51
+ return self.m.path.join(*path_parts) if path_parts else ''
52
+
53
+ def apply_issue(self, *root_pieces, **kwargs):
54
+ """Call apply_issue from depot_tools.
55
+
56
+ Args:
57
+ root_pieces (strings): location where to run apply_issue, relative to the
58
+ checkout root.
59
+ authentication (string or None): authentication scheme to use. Can be None
60
+ or 'oauth2'. See also apply_issue.py --help (-E and --no-auth options.)
61
+ """
62
+ # TODO(pgervais): replace *root_pieces by a single Path object.
63
+ authentication = kwargs.get('authentication', None)
64
+ rietveld_url = self.m.properties['rietveld']
65
+ issue_number = self.m.properties['issue']
66
+
67
+ if authentication == 'oauth2':
68
+ step_result = self.m.python(
69
+ 'apply_issue',
70
+ self.m.path['depot_tools'].join('apply_issue.py'), [
71
+ '-r', self.m.path['checkout'].join(*root_pieces),
72
+ '-i', issue_number,
73
+ '-p', self.m.properties['patchset'],
74
+ '-s', rietveld_url,
75
+ '-E', self.m.path['build'].join('site_config',
76
+ '.rietveld_client_email'),
77
+ '-k', self.m.path['build'].join('site_config',
78
+ '.rietveld_secret_key')
79
+ ],
80
+ )
81
+
82
+ else:
83
+ step_result = self.m.python(
84
+ 'apply_issue',
85
+ self.m.path['depot_tools'].join('apply_issue.py'), [
86
+ '-r', self.m.path['checkout'].join(*root_pieces),
87
+ '-i', issue_number,
88
+ '-p', self.m.properties['patchset'],
89
+ '-s', rietveld_url,
90
+ '--no-auth'],
91
+ )
92
+ step_result.presentation.links['Applied issue %s' % issue_number] = (
93
+ urlparse.urljoin(rietveld_url, str(issue_number)))
94
+
@@ -0,0 +1,30 @@
1
+ [
2
+ {
3
+ "cmd": [
4
+ "python",
5
+ "-u",
6
+ "[DEPOT_TOOLS]/apply_issue.py",
7
+ "-r",
8
+ "[SLAVE_BUILD]/foo/bar",
9
+ "-i",
10
+ "1",
11
+ "-p",
12
+ "1",
13
+ "-s",
14
+ "http://review_tool.url",
15
+ "-E",
16
+ "[BUILD]/site_config/.rietveld_client_email",
17
+ "-k",
18
+ "[BUILD]/site_config/.rietveld_secret_key"
19
+ ],
20
+ "name": "apply_issue",
21
+ "~followup_annotations": [
22
+ "@@@STEP_LINK@Applied issue 1@http://review_tool.url/1@@@"
23
+ ]
24
+ },
25
+ {
26
+ "name": "$result",
27
+ "recipe_result": null,
28
+ "status_code": 0
29
+ }
30
+ ]
@@ -0,0 +1,24 @@
1
+ # Copyright 2014 The Chromium Authors. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ DEPS = [
6
+ 'infra_paths',
7
+ 'recipe_engine/path',
8
+ 'recipe_engine/properties',
9
+ 'recipe_engine/step',
10
+ 'rietveld',
11
+ ]
12
+
13
+ def RunSteps(api):
14
+ api.path['checkout'] = api.path['slave_build']
15
+ api.rietveld.apply_issue('foo', 'bar', authentication='oauth2')
16
+ api.rietveld.calculate_issue_root({'project': ['']})
17
+
18
+
19
+ def GenTests(api):
20
+ yield (api.test('basic')
21
+ + api.properties(issue=1,
22
+ patchset=1,
23
+ rietveld='http://review_tool.url')
24
+ )
@@ -0,0 +1,15 @@
1
+ # Copyright 2014 The Chromium Authors. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ DEPS = [
6
+ 'git',
7
+ 'recipe_engine/json',
8
+ 'recipe_engine/path',
9
+ 'recipe_engine/platform',
10
+ 'recipe_engine/properties',
11
+ 'recipe_engine/python',
12
+ 'recipe_engine/raw_io',
13
+ 'rietveld',
14
+ 'recipe_engine/step',
15
+ ]
@@ -0,0 +1,280 @@
1
+ # Copyright 2014 The Chromium Authors. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ import contextlib
6
+ import hashlib
7
+
8
+ from recipe_engine import recipe_api
9
+
10
+
11
+ PATCH_STORAGE_RIETVELD = 'rietveld'
12
+ PATCH_STORAGE_GIT = 'git'
13
+ PATCH_STORAGE_SVN = 'svn'
14
+
15
+
16
+ class TryserverApi(recipe_api.RecipeApi):
17
+ def __init__(self, *args, **kwargs):
18
+ super(TryserverApi, self).__init__(*args, **kwargs)
19
+ self._failure_reasons = []
20
+
21
+ @property
22
+ def patch_url(self):
23
+ """Reads patch_url property and corrects it if needed."""
24
+ url = self.m.properties.get('patch_url')
25
+ return url
26
+
27
+ @property
28
+ def is_tryserver(self):
29
+ """Returns true iff we can apply_issue or patch."""
30
+ return (self.can_apply_issue or self.is_patch_in_svn or
31
+ self.is_patch_in_git or self.is_gerrit_issue)
32
+
33
+ @property
34
+ def can_apply_issue(self):
35
+ """Returns true iff the properties exist to apply_issue from rietveld."""
36
+ return (self.m.properties.get('rietveld')
37
+ and 'issue' in self.m.properties
38
+ and 'patchset' in self.m.properties)
39
+
40
+ @property
41
+ def is_gerrit_issue(self):
42
+ """Returns true iff the properties exist to match a Gerrit issue."""
43
+ return ('event.patchSet.ref' in self.m.properties and
44
+ 'event.change.url' in self.m.properties and
45
+ 'event.change.id' in self.m.properties)
46
+
47
+ @property
48
+ def is_patch_in_svn(self):
49
+ """Returns true iff the properties exist to patch from a patch URL."""
50
+ return self.patch_url
51
+
52
+ @property
53
+ def is_patch_in_git(self):
54
+ return (self.m.properties.get('patch_storage') == PATCH_STORAGE_GIT and
55
+ self.m.properties.get('patch_repo_url') and
56
+ self.m.properties.get('patch_ref'))
57
+
58
+ def _apply_patch_step(self, patch_file=None, patch_content=None, root=None):
59
+ assert not (patch_file and patch_content), (
60
+ 'Please only specify either patch_file or patch_content, not both!')
61
+ patch_cmd = [
62
+ 'patch',
63
+ '--dir', root or self.m.path['checkout'],
64
+ '--force',
65
+ '--forward',
66
+ '--remove-empty-files',
67
+ '--strip', '0',
68
+ ]
69
+ if patch_file:
70
+ patch_cmd.extend(['--input', patch_file])
71
+
72
+ self.m.step('apply patch', patch_cmd,
73
+ stdin=patch_content)
74
+
75
+ def apply_from_svn(self, cwd):
76
+ """Downloads patch from patch_url using svn-export and applies it"""
77
+ # TODO(nodir): accept these properties as parameters
78
+ patch_url = self.patch_url
79
+ root = cwd
80
+ if root is None:
81
+ issue_root = self.m.rietveld.calculate_issue_root()
82
+ root = self.m.path['checkout'].join(issue_root)
83
+
84
+ patch_file = self.m.raw_io.output('.diff')
85
+ ext = '.bat' if self.m.platform.is_win else ''
86
+ svn_cmd = ['svn' + ext, 'export', '--force', patch_url, patch_file]
87
+
88
+ result = self.m.step('download patch', svn_cmd,
89
+ step_test_data=self.test_api.patch_content)
90
+ result.presentation.logs['patch.diff'] = (
91
+ result.raw_io.output.split('\n'))
92
+
93
+ patch_content = self.m.raw_io.input(result.raw_io.output)
94
+ self._apply_patch_step(patch_content=patch_content, root=root)
95
+
96
+ def apply_from_git(self, cwd):
97
+ """Downloads patch from given git repo and ref and applies it"""
98
+ # TODO(nodir): accept these properties as parameters
99
+ patch_repo_url = self.m.properties['patch_repo_url']
100
+ patch_ref = self.m.properties['patch_ref']
101
+
102
+ patch_dir = self.m.path.mkdtemp('patch')
103
+ git_setup_py = self.m.path['build'].join('scripts', 'slave', 'git_setup.py')
104
+ git_setup_args = ['--path', patch_dir, '--url', patch_repo_url]
105
+ patch_path = patch_dir.join('patch.diff')
106
+
107
+ self.m.python('patch git setup', git_setup_py, git_setup_args)
108
+ self.m.git('fetch', 'origin', patch_ref,
109
+ name='patch fetch', cwd=patch_dir)
110
+ self.m.git('clean', '-f', '-d', '-x',
111
+ name='patch clean', cwd=patch_dir)
112
+ self.m.git('checkout', '-f', 'FETCH_HEAD',
113
+ name='patch git checkout', cwd=patch_dir)
114
+ self._apply_patch_step(patch_file=patch_path, root=cwd)
115
+ self.m.step('remove patch', ['rm', '-rf', patch_dir])
116
+
117
+ def determine_patch_storage(self):
118
+ """Determines patch_storage automatically based on properties."""
119
+ storage = self.m.properties.get('patch_storage')
120
+ if storage:
121
+ return storage
122
+
123
+ if self.can_apply_issue:
124
+ return PATCH_STORAGE_RIETVELD
125
+ elif self.is_patch_in_svn:
126
+ return PATCH_STORAGE_SVN
127
+
128
+ def maybe_apply_issue(self, cwd=None, authentication=None):
129
+ """If we're a trybot, apply a codereview issue.
130
+
131
+ Args:
132
+ cwd: If specified, apply the patch from the specified directory.
133
+ authentication: authentication scheme whenever apply_issue.py is called.
134
+ This is only used if the patch comes from Rietveld. Possible values:
135
+ None, 'oauth2' (see also api.rietveld.apply_issue.)
136
+ """
137
+ storage = self.determine_patch_storage()
138
+
139
+ if storage == PATCH_STORAGE_RIETVELD:
140
+ return self.m.rietveld.apply_issue(
141
+ self.m.rietveld.calculate_issue_root(),
142
+ authentication=authentication)
143
+ elif storage == PATCH_STORAGE_SVN:
144
+ return self.apply_from_svn(cwd)
145
+ elif storage == PATCH_STORAGE_GIT:
146
+ return self.apply_from_git(cwd)
147
+ else:
148
+ # Since this method is "maybe", we don't raise an Exception.
149
+ pass
150
+
151
+ def get_files_affected_by_patch(self, patch_root=None):
152
+ """Returns list of paths to files affected by the patch.
153
+
154
+ Argument:
155
+ patch_root: path relative to api.path['root'], usually obtained from
156
+ api.gclient.calculate_patch_root(patch_project)
157
+
158
+ Returned paths will be relative to to patch_root.
159
+
160
+ TODO(tandrii): remove this doc.
161
+ Unless you use patch_root=None, in which case old behavior is used
162
+ which returns paths relative to checkout aka solution[0].name.
163
+ """
164
+ # patch_root must be set! None is for backwards compataibility and will be
165
+ # removed.
166
+ if patch_root is None:
167
+ return self._old_get_files_affected_by_patch()
168
+ step_result = self.m.git('diff', '--cached', '--name-only',
169
+ cwd=self.m.path['slave_build'].join(patch_root),
170
+ name='git diff to analyze patch',
171
+ stdout=self.m.raw_io.output(),
172
+ step_test_data=lambda:
173
+ self.m.raw_io.test_api.stream_output('foo.cc'))
174
+ paths = [self.m.path.join(patch_root, p) for p in
175
+ step_result.stdout.split()]
176
+ if self.m.platform.is_win:
177
+ # Looks like "analyze" wants POSIX slashes even on Windows (since git
178
+ # uses that format even on Windows).
179
+ paths = [path.replace('\\', '/') for path in paths]
180
+ step_result.presentation.logs['files'] = paths
181
+ return paths
182
+
183
+
184
+ def _old_get_files_affected_by_patch(self):
185
+ git_diff_kwargs = {}
186
+ issue_root = self.m.rietveld.calculate_issue_root()
187
+ if issue_root:
188
+ git_diff_kwargs['cwd'] = self.m.path['checkout'].join(issue_root)
189
+ step_result = self.m.git('diff', '--cached', '--name-only',
190
+ name='git diff to analyze patch',
191
+ stdout=self.m.raw_io.output(),
192
+ step_test_data=lambda:
193
+ self.m.raw_io.test_api.stream_output('foo.cc'),
194
+ **git_diff_kwargs)
195
+ paths = step_result.stdout.split()
196
+ if issue_root:
197
+ paths = [self.m.path.join(issue_root, path) for path in paths]
198
+ if self.m.platform.is_win:
199
+ # Looks like "analyze" wants POSIX slashes even on Windows (since git
200
+ # uses that format even on Windows).
201
+ paths = [path.replace('\\', '/') for path in paths]
202
+
203
+ step_result.presentation.logs['files'] = paths
204
+ return paths
205
+
206
+ def set_subproject_tag(self, subproject_tag):
207
+ """Adds a subproject tag to the build.
208
+
209
+ This can be used to distinguish between builds that execute different steps
210
+ depending on what was patched, e.g. blink vs. pure chromium patches.
211
+ """
212
+ assert self.is_tryserver
213
+
214
+ step_result = self.m.step.active_result
215
+ step_result.presentation.properties['subproject_tag'] = subproject_tag
216
+
217
+ def _set_failure_type(self, failure_type):
218
+ if not self.is_tryserver:
219
+ return
220
+
221
+ step_result = self.m.step.active_result
222
+ step_result.presentation.properties['failure_type'] = failure_type
223
+
224
+ def set_patch_failure_tryjob_result(self):
225
+ """Mark the tryjob result as failure to apply the patch."""
226
+ self._set_failure_type('PATCH_FAILURE')
227
+
228
+ def set_compile_failure_tryjob_result(self):
229
+ """Mark the tryjob result as a compile failure."""
230
+ self._set_failure_type('COMPILE_FAILURE')
231
+
232
+ def set_test_failure_tryjob_result(self):
233
+ """Mark the tryjob result as a test failure.
234
+
235
+ This means we started running actual tests (not prerequisite steps
236
+ like checkout or compile), and some of these tests have failed.
237
+ """
238
+ self._set_failure_type('TEST_FAILURE')
239
+
240
+ def set_invalid_test_results_tryjob_result(self):
241
+ """Mark the tryjob result as having invalid test results.
242
+
243
+ This means we run some tests, but the results were not valid
244
+ (e.g. no list of specific test cases that failed, or too many
245
+ tests failing, etc).
246
+ """
247
+ self._set_failure_type('INVALID_TEST_RESULTS')
248
+
249
+ def add_failure_reason(self, reason):
250
+ """
251
+ Records a more detailed reason why build is failing.
252
+
253
+ The reason can be any JSON-serializable object.
254
+ """
255
+ assert self.m.json.is_serializable(reason)
256
+ self._failure_reasons.append(reason)
257
+
258
+ @contextlib.contextmanager
259
+ def set_failure_hash(self):
260
+ """
261
+ Context manager that sets a failure_hash build property on StepFailure.
262
+
263
+ This can be used to easily compare whether two builds have failed
264
+ for the same reason. For example, if a patch is bad (breaks something),
265
+ we'd expect it to always break in the same way. Different failures
266
+ for the same patch are usually a sign of flakiness.
267
+ """
268
+ try:
269
+ yield
270
+ except self.m.step.StepFailure as e:
271
+ self.add_failure_reason(e.reason)
272
+
273
+ failure_hash = hashlib.sha1()
274
+ failure_hash.update(self.m.json.dumps(self._failure_reasons))
275
+
276
+ step_result = self.m.step.active_result
277
+ step_result.presentation.properties['failure_hash'] = \
278
+ failure_hash.hexdigest()
279
+
280
+ raise