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.
- checksums.yaml +4 -4
- data/.travis.yml +45 -19
- data/CHANGELOG.md +14 -0
- data/README.md +30 -15
- data/Rakefile +7 -6
- data/ext/libv8/arch.rb +5 -4
- data/ext/libv8/builder.rb +25 -19
- data/ext/libv8/compiler.rb +6 -33
- data/ext/libv8/location.rb +7 -8
- data/lib/libv8/version.rb +1 -1
- data/libv8.gemspec +1 -1
- data/patches/build-standalone-static-library.patch +14 -0
- data/patches/disable-building-tests.patch +48 -10
- data/patches/fPIC-for-static.patch +3 -3
- data/release/x86-linux/Vagrantfile +8 -4
- data/release/x86_64-freebsd10/Vagrantfile +86 -0
- data/release/x86_64-linux/Vagrantfile +8 -4
- data/spec/compiler_spec.rb +5 -29
- data/spec/support/compiler_helpers.rb +2 -4
- data/vendor/depot_tools/.gitignore +15 -3
- data/vendor/depot_tools/OWNERS +2 -2
- data/vendor/depot_tools/PRESUBMIT.py +4 -2
- data/vendor/depot_tools/WATCHLISTS +6 -0
- data/vendor/depot_tools/apply_issue.py +70 -38
- data/vendor/depot_tools/bootstrap/win/README.md +66 -0
- data/vendor/depot_tools/bootstrap/win/git-bash.template.sh +12 -0
- data/vendor/depot_tools/bootstrap/win/git.template.bat +5 -0
- data/vendor/depot_tools/bootstrap/win/profile.d.python.sh +20 -0
- data/vendor/depot_tools/bootstrap/win/win_tools.bat +96 -45
- data/vendor/depot_tools/breakpad.py +6 -141
- data/vendor/depot_tools/buildbucket.py +45 -31
- data/vendor/depot_tools/cbuildbot +1 -0
- data/vendor/depot_tools/checkout.py +2 -1
- data/vendor/depot_tools/chrome_set_ver +1 -0
- data/vendor/depot_tools/cit +8 -0
- data/vendor/depot_tools/cit.bat +11 -0
- data/vendor/depot_tools/cit.py +120 -0
- data/vendor/depot_tools/codereview.settings +0 -2
- data/vendor/depot_tools/commit_queue +1 -5
- data/vendor/depot_tools/commit_queue.bat +1 -4
- data/vendor/depot_tools/commit_queue.py +78 -29
- data/vendor/depot_tools/cpplint.py +22 -14
- data/vendor/depot_tools/cros +1 -0
- data/vendor/depot_tools/cros_sdk +1 -0
- data/vendor/depot_tools/depot-tools-auth.py +3 -3
- data/vendor/depot_tools/download_from_google_storage.py +101 -21
- data/vendor/depot_tools/drover.py +2 -3
- data/vendor/depot_tools/fetch.py +31 -27
- data/vendor/depot_tools/{recipes → fetch_configs}/android.py +4 -4
- data/vendor/depot_tools/fetch_configs/breakpad.py +45 -0
- data/vendor/depot_tools/{recipes → fetch_configs}/chromium.py +3 -3
- data/vendor/depot_tools/{recipes/recipe_util.py → fetch_configs/config_util.py} +3 -3
- data/vendor/depot_tools/fetch_configs/crashpad.py +41 -0
- data/vendor/depot_tools/{recipes → fetch_configs}/dart.py +3 -3
- data/vendor/depot_tools/{recipes/pdfium.py → fetch_configs/dartino.py} +14 -13
- data/vendor/depot_tools/{recipes → fetch_configs}/dartium.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/depot_tools.py +3 -3
- data/vendor/depot_tools/fetch_configs/gyp.py +42 -0
- data/vendor/depot_tools/{recipes → fetch_configs}/infra.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/infra_internal.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/ios.py +4 -4
- data/vendor/depot_tools/{recipes → fetch_configs}/mojo.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/nacl.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/naclports.py +3 -3
- data/vendor/depot_tools/fetch_configs/pdfium.py +40 -0
- data/vendor/depot_tools/{recipes → fetch_configs}/skia.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/skia_buildbot.py +3 -3
- data/vendor/depot_tools/fetch_configs/syzygy.py +41 -0
- data/vendor/depot_tools/{recipes → fetch_configs}/v8.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/webrtc.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/webrtc_android.py +4 -4
- data/vendor/depot_tools/{recipes → fetch_configs}/webrtc_ios.py +4 -4
- data/vendor/depot_tools/fix_encoding.py +6 -6
- data/vendor/depot_tools/gcl.py +11 -21
- data/vendor/depot_tools/gclient +10 -0
- data/vendor/depot_tools/gclient-new-workdir.py +7 -38
- data/vendor/depot_tools/gclient.bat +2 -2
- data/vendor/depot_tools/gclient.py +85 -65
- data/vendor/depot_tools/gclient_scm.py +83 -10
- data/vendor/depot_tools/gclient_utils.py +5 -1
- data/vendor/depot_tools/gerrit_util.py +243 -26
- data/vendor/depot_tools/git-auto-svn +1 -1
- data/vendor/depot_tools/git-cache +1 -1
- data/vendor/depot_tools/git-cherry-pick-upload +1 -1
- data/vendor/depot_tools/git-cl +1 -1
- data/vendor/depot_tools/git-drover +6 -0
- data/vendor/depot_tools/git-find-releases +6 -0
- data/vendor/depot_tools/git-footers +1 -1
- data/vendor/depot_tools/git-freeze +1 -1
- data/vendor/depot_tools/git-gs +1 -1
- data/vendor/depot_tools/git-hyper-blame +6 -0
- data/vendor/depot_tools/git-map +1 -1
- data/vendor/depot_tools/git-map-branches +1 -1
- data/vendor/depot_tools/git-mark-merge-base +1 -1
- data/vendor/depot_tools/git-nav-downstream +1 -1
- data/vendor/depot_tools/git-new-branch +1 -1
- data/vendor/depot_tools/git-number +1 -1
- data/vendor/depot_tools/git-rebase-update +1 -1
- data/vendor/depot_tools/git-rename-branch +1 -1
- data/vendor/depot_tools/git-reparent-branch +1 -1
- data/vendor/depot_tools/git-retry +1 -1
- data/vendor/depot_tools/git-squash-branch +1 -1
- data/vendor/depot_tools/git-thaw +1 -1
- data/vendor/depot_tools/git-try +1 -1
- data/vendor/depot_tools/git-upstream-diff +1 -1
- data/vendor/depot_tools/git_auto_svn.py +24 -6
- data/vendor/depot_tools/git_cache.py +74 -27
- data/vendor/depot_tools/git_cl.py +2118 -747
- data/vendor/depot_tools/git_common.py +100 -6
- data/vendor/depot_tools/git_dates.py +62 -0
- data/vendor/depot_tools/git_drover.py +424 -0
- data/vendor/depot_tools/git_find_releases.py +65 -0
- data/vendor/depot_tools/git_footers.py +42 -0
- data/vendor/depot_tools/git_hyper_blame.py +391 -0
- data/vendor/depot_tools/git_map_branches.py +8 -6
- data/vendor/depot_tools/git_new_branch.py +6 -1
- data/vendor/depot_tools/git_rebase_update.py +56 -16
- data/vendor/depot_tools/git_reparent_branch.py +13 -0
- data/vendor/depot_tools/git_try.py +0 -2
- data/vendor/depot_tools/gsutil.py +51 -20
- data/vendor/depot_tools/infra/config/OWNERS +3 -1
- data/vendor/depot_tools/infra/config/cq.cfg +7 -3
- data/vendor/depot_tools/infra/config/recipes.cfg +9 -0
- data/vendor/depot_tools/luci_hacks/README.md +35 -0
- data/vendor/depot_tools/{bootstrap/virtualenv/tests → luci_hacks}/__init__.py +0 -0
- data/vendor/depot_tools/luci_hacks/luci_recipe_run.isolate +12 -0
- data/vendor/depot_tools/luci_hacks/luci_recipe_run.py +81 -0
- data/vendor/depot_tools/luci_hacks/trigger_luci_job.py +128 -0
- data/vendor/depot_tools/man/html/depot_tools.html +9 -1
- data/vendor/depot_tools/man/html/depot_tools_tutorial.html +4 -4
- data/vendor/depot_tools/man/html/git-drover.html +191 -35
- data/vendor/depot_tools/man/html/git-hyper-blame.html +878 -0
- data/vendor/depot_tools/man/html/git-rebase-update.html +9 -4
- data/vendor/depot_tools/man/man1/git-drover.1 +189 -36
- data/vendor/depot_tools/man/man1/git-hyper-blame.1 +128 -0
- data/vendor/depot_tools/man/man1/git-rebase-update.1 +8 -6
- data/vendor/depot_tools/man/man7/depot_tools.7 +9 -4
- data/vendor/depot_tools/man/src/_git-hyper-blame_desc.helper.txt +1 -0
- data/vendor/depot_tools/man/src/common_demo_functions.sh +5 -0
- data/vendor/depot_tools/man/src/depot_tools_tutorial.txt +1 -1
- data/vendor/depot_tools/man/src/git-drover.demo.1.sh +11 -16
- data/vendor/depot_tools/man/src/git-drover.demo.3.sh +27 -0
- data/vendor/depot_tools/man/src/git-drover.demo.4.sh +39 -0
- data/vendor/depot_tools/man/src/git-drover.txt +49 -3
- data/vendor/depot_tools/man/src/git-hyper-blame.demo.1.sh +3 -0
- data/vendor/depot_tools/man/src/git-hyper-blame.demo.2.sh +4 -0
- data/vendor/depot_tools/man/src/git-hyper-blame.demo.common.sh +57 -0
- data/vendor/depot_tools/man/src/git-hyper-blame.txt +85 -0
- data/vendor/depot_tools/man/src/git-rebase-update.txt +5 -1
- data/vendor/depot_tools/my_activity.py +6 -21
- data/vendor/depot_tools/ninja +2 -2
- data/vendor/depot_tools/ninja-linux32 +0 -0
- data/vendor/depot_tools/ninja-linux64 +0 -0
- data/vendor/depot_tools/ninja-mac +0 -0
- data/vendor/depot_tools/ninja.exe +0 -0
- data/vendor/depot_tools/presubmit_canned_checks.py +83 -69
- data/vendor/depot_tools/presubmit_support.py +126 -42
- data/vendor/depot_tools/pylint.py +5 -1
- data/vendor/depot_tools/python_runner.sh +55 -0
- data/vendor/depot_tools/recipe_modules/bot_update/__init__.py +32 -0
- data/vendor/depot_tools/recipe_modules/bot_update/api.py +283 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic.json +56 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_output_manifest.json +63 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json +57 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/clobber.json +44 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/forced.json +57 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_reset.json +44 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/no_shallow.json +44 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/off.json +43 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json +43 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/svn_mode.json +59 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange.json +58 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2.json +60 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob.json +58 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail.json +60 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json +81 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json +81 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle.json +49 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8.json +61 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8_head_by_default.json +51 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.py +172 -0
- data/vendor/depot_tools/{bootstrap/virtualenv/virtualenv_support → recipe_modules/bot_update/resources}/__init__.py +0 -0
- data/vendor/depot_tools/recipe_modules/bot_update/resources/bot_update.py +1764 -0
- data/vendor/depot_tools/recipe_modules/bot_update/test_api.py +86 -0
- data/vendor/depot_tools/recipe_modules/depot_tools/__init__.py +3 -0
- data/vendor/depot_tools/recipe_modules/depot_tools/api.py +27 -0
- data/vendor/depot_tools/recipe_modules/gclient/__init__.py +10 -0
- data/vendor/depot_tools/recipe_modules/gclient/api.py +378 -0
- data/vendor/depot_tools/recipe_modules/gclient/config.py +671 -0
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/basic.json +172 -0
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/revision.json +174 -0
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/tryserver.json +185 -0
- data/vendor/depot_tools/recipe_modules/gclient/example.py +100 -0
- data/vendor/depot_tools/recipe_modules/gclient/test_api.py +37 -0
- data/vendor/depot_tools/recipe_modules/git/__init__.py +9 -0
- data/vendor/depot_tools/recipe_modules/git/api.py +377 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic.json +177 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_branch.json +177 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_file_name.json +179 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_hash.json +176 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_ref.json +177 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_submodule_update_force.json +178 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/can_fail_build.json +153 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/cannot_fail_build.json +181 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/cat-file_test.json +199 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_delta.json +250 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_failed.json +181 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output.json +182 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output_fails_build.json +102 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/curl_trace_file.json +181 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/platform_win.json +186 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/rebase_failed.json +179 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/remote_not_origin.json +179 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/set_got_revision.json +178 -0
- data/vendor/depot_tools/recipe_modules/git/example.py +147 -0
- data/vendor/depot_tools/recipe_modules/git/resources/git_setup.py +61 -0
- data/vendor/depot_tools/recipe_modules/git/test_api.py +18 -0
- data/vendor/depot_tools/recipe_modules/git_cl/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/git_cl/api.py +25 -0
- data/vendor/depot_tools/recipe_modules/git_cl/config.py +22 -0
- data/vendor/depot_tools/recipe_modules/git_cl/example.expected/basic.json +66 -0
- data/vendor/depot_tools/recipe_modules/git_cl/example.py +41 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/api.py +12 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/basic.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.py +28 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/path_config.py +45 -0
- data/vendor/depot_tools/recipe_modules/presubmit/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/presubmit/api.py +20 -0
- data/vendor/depot_tools/recipe_modules/presubmit/example.expected/basic.json +18 -0
- data/vendor/depot_tools/recipe_modules/presubmit/example.py +15 -0
- data/vendor/depot_tools/recipe_modules/rietveld/__init__.py +5 -0
- data/vendor/depot_tools/recipe_modules/rietveld/api.py +94 -0
- data/vendor/depot_tools/recipe_modules/rietveld/example.expected/basic.json +30 -0
- data/vendor/depot_tools/recipe_modules/rietveld/example.py +24 -0
- data/vendor/depot_tools/recipe_modules/tryserver/__init__.py +15 -0
- data/vendor/depot_tools/recipe_modules/tryserver/api.py +280 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_git_patch.json +104 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch.json +58 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch_new.json +58 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_svn_patch.json +68 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch.json +43 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch_new.json +43 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.py +53 -0
- data/vendor/depot_tools/recipe_modules/tryserver/test_api.py +7 -0
- data/vendor/depot_tools/recipes.py +136 -0
- data/vendor/depot_tools/repo +1 -1
- data/vendor/depot_tools/rietveld.py +46 -15
- data/vendor/depot_tools/roll_dep.py +97 -36
- data/vendor/depot_tools/scm.py +3 -3
- data/vendor/depot_tools/setup_color.py +94 -0
- data/vendor/depot_tools/subprocess2.py +10 -1
- data/vendor/depot_tools/third_party/cq_client/OWNERS +0 -1
- data/vendor/depot_tools/third_party/cq_client/README.md +47 -9
- data/vendor/depot_tools/third_party/cq_client/cq.pb.go +617 -0
- data/vendor/depot_tools/third_party/cq_client/cq.proto +75 -17
- data/vendor/depot_tools/third_party/cq_client/cq_pb2.py +168 -41
- data/vendor/depot_tools/third_party/cq_client/testdata/cq_gerrit.cfg +55 -0
- data/vendor/depot_tools/third_party/cq_client/{test/cq_example.cfg → testdata/cq_rietveld.cfg} +14 -6
- data/vendor/depot_tools/third_party/fancy_urllib/README +5 -4
- data/vendor/depot_tools/third_party/fancy_urllib/__init__.py +114 -52
- data/vendor/depot_tools/third_party/protobuf26/README.chromium +9 -6
- data/vendor/depot_tools/third_party/upload.py +17 -31
- data/vendor/depot_tools/trychange.py +0 -2
- data/vendor/depot_tools/update_depot_tools +29 -11
- data/vendor/depot_tools/update_depot_tools.bat +4 -9
- data/vendor/depot_tools/upload_to_google_storage.py +42 -5
- data/vendor/depot_tools/win_toolchain/OWNERS +1 -0
- data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +227 -52
- data/vendor/depot_tools/win_toolchain/package_from_installed.py +203 -88
- metadata +161 -81
- data/patches/arm/do-not-imply-vfp3-and-armv7.patch +0 -16
- data/patches/arm/do-not-use-vfp2.patch +0 -13
- data/patches/clang51/no-unused-variable.patch +0 -12
- data/vendor/depot_tools/bootstrap/.gitignore +0 -2
- data/vendor/depot_tools/bootstrap/bootstrap.py +0 -234
- data/vendor/depot_tools/bootstrap/deps.pyl +0 -15
- data/vendor/depot_tools/bootstrap/util.py +0 -87
- data/vendor/depot_tools/bootstrap/virtualenv/.gitignore +0 -10
- data/vendor/depot_tools/bootstrap/virtualenv/.travis.yml +0 -28
- data/vendor/depot_tools/bootstrap/virtualenv/AUTHORS.txt +0 -91
- data/vendor/depot_tools/bootstrap/virtualenv/CONTRIBUTING.rst +0 -21
- data/vendor/depot_tools/bootstrap/virtualenv/LICENSE.txt +0 -22
- data/vendor/depot_tools/bootstrap/virtualenv/MANIFEST.in +0 -11
- data/vendor/depot_tools/bootstrap/virtualenv/README.rst +0 -10
- data/vendor/depot_tools/bootstrap/virtualenv/bin/rebuild-script.py +0 -71
- data/vendor/depot_tools/bootstrap/virtualenv/docs/changes.rst +0 -747
- data/vendor/depot_tools/bootstrap/virtualenv/docs/conf.py +0 -149
- data/vendor/depot_tools/bootstrap/virtualenv/docs/development.rst +0 -61
- data/vendor/depot_tools/bootstrap/virtualenv/docs/index.rst +0 -137
- data/vendor/depot_tools/bootstrap/virtualenv/docs/installation.rst +0 -58
- data/vendor/depot_tools/bootstrap/virtualenv/docs/make.bat +0 -170
- data/vendor/depot_tools/bootstrap/virtualenv/docs/reference.rst +0 -256
- data/vendor/depot_tools/bootstrap/virtualenv/docs/userguide.rst +0 -249
- data/vendor/depot_tools/bootstrap/virtualenv/scripts/virtualenv +0 -3
- data/vendor/depot_tools/bootstrap/virtualenv/setup.py +0 -111
- data/vendor/depot_tools/bootstrap/virtualenv/tests/test_activate.sh +0 -94
- data/vendor/depot_tools/bootstrap/virtualenv/tests/test_activate_expected.output +0 -2
- data/vendor/depot_tools/bootstrap/virtualenv/tests/test_virtualenv.py +0 -139
- data/vendor/depot_tools/bootstrap/virtualenv/tests/tox.ini +0 -12
- data/vendor/depot_tools/bootstrap/virtualenv/tox.ini +0 -17
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv.py +0 -2367
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.bat +0 -26
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.csh +0 -42
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.fish +0 -74
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.ps1 +0 -150
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.sh +0 -80
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate_this.py +0 -34
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/deactivate.bat +0 -20
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/distutils-init.py +0 -101
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/distutils.cfg +0 -6
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/site.py +0 -758
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_support/pip-6.0-py2.py3-none-any.whl +0 -0
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_support/setuptools-8.2.1-py2.py3-none-any.whl +0 -0
- data/vendor/depot_tools/bootstrap/win/README.google +0 -16
- data/vendor/depot_tools/cbuildbot +0 -96
- data/vendor/depot_tools/chrome_set_ver +0 -96
- data/vendor/depot_tools/cros +0 -96
- data/vendor/depot_tools/cros_sdk +0 -96
- data/vendor/depot_tools/git-cl-upload-hook +0 -52
- data/vendor/depot_tools/git-crup +0 -45
- data/vendor/depot_tools/python_git_runner.sh +0 -36
- data/vendor/depot_tools/recipes/blink.py +0 -59
- data/vendor/depot_tools/third_party/cq_client/test/validate_config_test.py +0 -52
- data/vendor/depot_tools/third_party/cq_client/validate_config.py +0 -108
- data/vendor/depot_tools/win_toolchain/toolchain2013.py +0 -494
@@ -0,0 +1,66 @@
|
|
1
|
+
# Windows binary tool bootstrap
|
2
|
+
|
3
|
+
This directory has the 'magic' for the `depot_tools` windows binary update
|
4
|
+
mechanisms.
|
5
|
+
|
6
|
+
## Software bootstrapped
|
7
|
+
* Python (https://www.python.org/)
|
8
|
+
* Git for Windows (https://git-for-windows.github.io/)
|
9
|
+
* Subversion (https://subversion.apache.org/)
|
10
|
+
|
11
|
+
## Mechanism
|
12
|
+
|
13
|
+
Any time a user runs `gclient` on windows, it will invoke the `depot_tools`
|
14
|
+
autoupdate script [depot_tools.bat](../../update_depot_tools.bat). This, in
|
15
|
+
turn, will run [win_tools.bat](./win_tools.bat), which does the bulk of the
|
16
|
+
work.
|
17
|
+
|
18
|
+
`win_tools.bat` will successively look to see if the local version of the binary
|
19
|
+
package is present, and if so, if it's the expected version. If either of those
|
20
|
+
cases is not true, it will download and unpack the respective binary.
|
21
|
+
|
22
|
+
Downloading is done with [get_file.js](./get_file.js), which is a windows script
|
23
|
+
host javascript utility to vaguely impersonate `wget`.
|
24
|
+
|
25
|
+
Through a comedy of history, each binary is stored and retrieved differently.
|
26
|
+
|
27
|
+
### Git
|
28
|
+
|
29
|
+
Git installs are mirrored versions of the offical Git-for-Windows Portable
|
30
|
+
releases.
|
31
|
+
* Original: `https://github.com/git-for-windows/git/releases`
|
32
|
+
* Mirror: `gs://chrome-infra/PortableGit*.7z.exe`
|
33
|
+
|
34
|
+
#### Updating git version
|
35
|
+
1. Download the new `PortableGit-X.Y.Z-{32,64}.7z.exe` from the
|
36
|
+
git-for-windows release page.
|
37
|
+
1. From either console.developers.google.com or the CLI, do:
|
38
|
+
1. Upload those to the gs://chrome-infra Google Storage bucket.
|
39
|
+
1. Set the `allUsers Reader` permission (click the "Public link" checkbox
|
40
|
+
next to the binaries).
|
41
|
+
1. Edit the `set GIT_VERSION=X.Y.Z` line in `win_tools.bat` to be the new
|
42
|
+
version.
|
43
|
+
1. At the time of writing, the first version is the default version, and
|
44
|
+
the second is the 'bleeding edge' version. You can use the bleeding edge
|
45
|
+
version to get early feedback/stage a rollout/etc.
|
46
|
+
1. Commit the CL.
|
47
|
+
|
48
|
+
Note that in order for the update to take effect, `gclient` currently needs to
|
49
|
+
run twice. The first time it will update the `depot_tools` repo, and the second
|
50
|
+
time it will see the new git version and update to it. This is a bug that should
|
51
|
+
be fixed, in case you're reading this and this paragraph infuriates you more
|
52
|
+
than the rest of this README.
|
53
|
+
|
54
|
+
### Python
|
55
|
+
|
56
|
+
Python installs are sourced from https://src.chromium.org/viewvc/chrome/trunk/tools/ .
|
57
|
+
|
58
|
+
The process to create them is sort-of-documented in the README of the python
|
59
|
+
zip file.
|
60
|
+
|
61
|
+
### Subversion
|
62
|
+
|
63
|
+
Subversion installs are sourced from https://src.chromium.org/viewvc/chrome/trunk/tools/ .
|
64
|
+
|
65
|
+
There will likely never be an update to SVN in `depot_tools` from the current
|
66
|
+
version.
|
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
export EDITOR=${EDITOR:=notepad}
|
3
|
+
WIN_BASE=`dirname $0`
|
4
|
+
UNIX_BASE=`cygpath "$WIN_BASE"`
|
5
|
+
export PATH=$PATH:$UNIX_BASE/SVN_BIN_DIR:$UNIX_BASE/PYTHON_BIN_DIR:$UNIX_BASE/PYTHON_BIN_DIR/Scripts
|
6
|
+
export PYTHON_DIRECT=1
|
7
|
+
export PYTHONUNBUFFERED=1
|
8
|
+
if [[ $# > 0 ]]; then
|
9
|
+
$UNIX_BASE/GIT_BIN_DIR/bin/bash.exe "$@"
|
10
|
+
else
|
11
|
+
$UNIX_BASE/GIT_BIN_DIR/git-bash.exe &
|
12
|
+
fi
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
# This alias allows invocations of `python` to work as expected under msys bash.
|
3
|
+
# In particular, it detects if stdout+stdin are both attached to a pseudo-tty,
|
4
|
+
# and if so, invokes python in interactive mode. If this is not the case, or
|
5
|
+
# the user passes any arguments, python will be invoked unmodified.
|
6
|
+
python() {
|
7
|
+
if [[ $# > 0 ]]; then
|
8
|
+
python.exe "$@"
|
9
|
+
else
|
10
|
+
readlink /proc/$$/fd/0 | grep pty > /dev/null
|
11
|
+
TTY0=$?
|
12
|
+
readlink /proc/$$/fd/1 | grep pty > /dev/null
|
13
|
+
TTY1=$?
|
14
|
+
if [ $TTY0 == 0 ] && [ $TTY1 == 0 ]; then
|
15
|
+
python.exe -i
|
16
|
+
else
|
17
|
+
python.exe
|
18
|
+
fi
|
19
|
+
fi
|
20
|
+
}
|
@@ -3,8 +3,8 @@
|
|
3
3
|
:: Use of this source code is governed by a BSD-style license that can be
|
4
4
|
:: found in the LICENSE file.
|
5
5
|
|
6
|
-
:: This script will
|
7
|
-
::
|
6
|
+
:: This script will determine if python, git, or svn binaries need updates. It
|
7
|
+
:: returns 123 if the user's shell must restart, otherwise !0 is failure
|
8
8
|
|
9
9
|
:: Sadly, we can't use SETLOCAL here otherwise it ERRORLEVEL is not correctly
|
10
10
|
:: returned.
|
@@ -57,72 +57,123 @@ set ERRORLEVEL=1
|
|
57
57
|
goto :END
|
58
58
|
|
59
59
|
:GIT_CHECK
|
60
|
-
|
61
|
-
|
60
|
+
|
61
|
+
:: must explicitly use FIND_EXE to prevent this from grabbing e.g. gnuwin32 or
|
62
|
+
:: msys versions.
|
63
|
+
set FIND_EXE=%SYSTEMROOT%\System32\find.exe
|
64
|
+
|
65
|
+
:: Check to see if we're on a 32 or 64 bit system
|
66
|
+
:: (parens) are necessary, otherwise batch puts an extra space after 32.
|
67
|
+
reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | %FIND_EXE% /i "x86" > NUL && (set OS_BITS=32) || (set OS_BITS=64)
|
68
|
+
|
69
|
+
if not exist "%WIN_TOOLS_ROOT_DIR%\.git_bleeding_edge" (
|
70
|
+
set GIT_VERSION=2.7.4
|
62
71
|
) else (
|
63
|
-
set GIT_VERSION=
|
72
|
+
set GIT_VERSION=2.8.1
|
64
73
|
)
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
74
|
+
set GIT_VERSION=%GIT_VERSION%-%OS_BITS%
|
75
|
+
|
76
|
+
set GIT_FETCH_URL=https://storage.googleapis.com/chrome-infra/PortableGit-%GIT_VERSION%-bit.7z.exe
|
77
|
+
set GIT_DOWNLOAD_PATH=%ZIP_DIR%\git.7z.exe
|
78
|
+
set GIT_BIN_DIR=git-%GIT_VERSION%_bin
|
79
|
+
set GIT_INST_DIR=%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%
|
80
|
+
set GIT_EXE_PATH=%GIT_INST_DIR%\bin\git.exe
|
69
81
|
|
70
82
|
:: Clean up any release which doesn't match the one we want.
|
71
|
-
for /d %%i in (%WIN_TOOLS_ROOT_DIR%\git-*_bin) do (
|
72
|
-
if not %%i == %WIN_TOOLS_ROOT_DIR%\git-%GIT_VERSION%_bin (
|
73
|
-
|
83
|
+
for /d %%i in ("%WIN_TOOLS_ROOT_DIR%\git-*_bin") do (
|
84
|
+
if not "%%i" == "%WIN_TOOLS_ROOT_DIR%\git-%GIT_VERSION%_bin" (
|
85
|
+
echo Cleaning old git installation %%i
|
86
|
+
rmdir /s /q "%%i" > NUL
|
74
87
|
)
|
75
88
|
)
|
76
|
-
set GIT_BIN_DIR=git-%GIT_VERSION%_bin
|
77
|
-
set GIT_ZIP_FILE=%GIT_BIN_DIR%.zip
|
78
|
-
set GIT_ZIP_URL=https://commondatastorage.googleapis.com/chrome-infra/%GIT_ZIP_FILE%
|
79
89
|
|
80
90
|
if "%WIN_TOOLS_FORCE%" == "1" goto :GIT_INSTALL
|
81
|
-
if exist "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\cmd\git.cmd" (
|
82
|
-
call "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\cmd\git.cmd" --version 2>nul 1>nul
|
83
|
-
if errorlevel 1 goto :GIT_INSTALL
|
84
|
-
rem Several git versions can live side-by-side; check the top-level
|
85
|
-
rem batch script to make sure it points to the desired version.
|
86
|
-
find "%GIT_BIN_DIR%" "%WIN_TOOLS_ROOT_DIR%\git.bat" 2>nul 1>nul
|
87
|
-
if errorlevel 1 goto :GIT_COPY_BATCH_FILES
|
88
|
-
goto :SVN_CHECK
|
89
|
-
)
|
90
|
-
goto :GIT_INSTALL
|
91
91
|
|
92
|
+
if not exist "%GIT_EXE_PATH%" goto :GIT_INSTALL
|
93
|
+
|
94
|
+
call "%GIT_EXE_PATH%" --version 2>nul 1>nul
|
95
|
+
if errorlevel 1 goto :GIT_INSTALL
|
96
|
+
|
97
|
+
:: Several git versions can live side-by-side; check the top-level
|
98
|
+
:: batch script to make sure it points to the desired version.
|
99
|
+
for %%f in (git.bat gitk.bat ssh.bat ssh-keygen.bat git-bash) do (
|
100
|
+
%FIND_EXE% "%GIT_BIN_DIR%" "%WIN_TOOLS_ROOT_DIR%\%%f" 2>nul 1>nul
|
101
|
+
if errorlevel 1 goto :GIT_MAKE_BATCH_FILES
|
102
|
+
)
|
103
|
+
if not exist %GIT_INST_DIR%\etc\profile.d\python.sh goto :GIT_MAKE_BATCH_FILES
|
104
|
+
goto :SYNC_GIT_HELP_FILES
|
92
105
|
|
93
106
|
:GIT_INSTALL
|
94
107
|
echo Installing git %GIT_VERSION% (avg 1-2 min download) ...
|
95
|
-
|
96
|
-
if exist "%
|
97
|
-
echo Fetching from %
|
98
|
-
cscript //nologo //e:jscript "%~dp0get_file.js" %
|
108
|
+
|
109
|
+
if exist "%GIT_DOWNLOAD_PATH%" del "%GIT_DOWNLOAD_PATH%"
|
110
|
+
echo Fetching from %GIT_FETCH_URL%
|
111
|
+
cscript //nologo //e:jscript "%~dp0get_file.js" %GIT_FETCH_URL% "%GIT_DOWNLOAD_PATH%"
|
99
112
|
if errorlevel 1 goto :GIT_FAIL
|
100
|
-
:: Cleanup
|
101
|
-
if exist "%
|
102
|
-
|
103
|
-
|
113
|
+
:: Cleanup git directory if it already exists.
|
114
|
+
if exist "%GIT_INST_DIR%\." rd /q /s "%GIT_INST_DIR%"
|
115
|
+
|
116
|
+
:: run PortableGit self-extractor
|
117
|
+
:: -y : Be Quiet ("yes")
|
118
|
+
:: -sd1 : Self delete SFX archive
|
119
|
+
:: -InstallPath : Where to put the files
|
120
|
+
:: -Directory : Run the post-extract program with this current-working-directory
|
121
|
+
::
|
122
|
+
:: Path slashes must be escaped or the 7zip sfx treats e.g. path\to\dir as
|
123
|
+
:: path[tab]o\dir.
|
124
|
+
set GIT_INST_DIR_ESC=%GIT_INST_DIR:\=\\%
|
125
|
+
call "%GIT_DOWNLOAD_PATH%" -y -sd1 -InstallPath="%GIT_INST_DIR_ESC%" -Directory="%GIT_INST_DIR_ESC%"
|
104
126
|
if errorlevel 1 goto :GIT_FAIL
|
105
|
-
if not exist "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\." goto :GIT_FAIL
|
106
|
-
del "%ZIP_DIR%\git.zip"
|
107
|
-
goto :GIT_COPY_BATCH_FILES
|
108
127
|
|
128
|
+
del "%GIT_DOWNLOAD_PATH%"
|
129
|
+
if not exist "%GIT_INST_DIR%\." goto :GIT_FAIL
|
109
130
|
|
110
|
-
|
111
|
-
:: Create the batch files.
|
112
|
-
call copy /y "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\git.bat" "%WIN_TOOLS_ROOT_DIR%\git.bat" 1>nul
|
113
|
-
call copy /y "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\gitk.bat" "%WIN_TOOLS_ROOT_DIR%\gitk.bat" 1>nul
|
114
|
-
call copy /y "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\ssh.bat" "%WIN_TOOLS_ROOT_DIR%\ssh.bat" 1>nul
|
115
|
-
call copy /y "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\ssh-keygen.bat" "%WIN_TOOLS_ROOT_DIR%\ssh-keygen.bat" 1>nul
|
131
|
+
set DID_UPGRADE=1
|
116
132
|
|
117
|
-
|
133
|
+
:GIT_MAKE_BATCH_FILES
|
134
|
+
:: Create the batch files.
|
135
|
+
set GIT_TEMPL=%~dp0git.template.bat
|
136
|
+
set SED=%GIT_INST_DIR%\usr\bin\sed.exe
|
137
|
+
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/g" -e "s/GIT_PROGRAM/cmd\\\\git.exe/g" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\git.bat"
|
138
|
+
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/g" -e "s/GIT_PROGRAM/cmd\\\\gitk.exe/g" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\gitk.bat"
|
139
|
+
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/g" -e "s/GIT_PROGRAM/usr\\\\bin\\\\ssh.exe/g" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\ssh.bat"
|
140
|
+
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/g" -e "s/GIT_PROGRAM/usr\\\\bin\\\\ssh-keygen.exe/g" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\ssh-keygen.bat"
|
141
|
+
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/g" -e "s/PYTHON_BIN_DIR/python276_bin/g" -e "s/SVN_BIN_DIR/svn_bin/g" < %~dp0git-bash.template.sh > "%WIN_TOOLS_ROOT_DIR%\git-bash"
|
142
|
+
copy "%~dp0profile.d.python.sh" %GIT_INST_DIR%\etc\profile.d\python.sh > NUL
|
143
|
+
|
144
|
+
:: Ensure various git configurations are set correctly at they system level.
|
118
145
|
call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.autocrlf false
|
119
146
|
call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.filemode false
|
120
|
-
|
147
|
+
call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.preloadindex true
|
148
|
+
call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.fscache true
|
149
|
+
|
150
|
+
:SYNC_GIT_HELP_FILES
|
151
|
+
:: Copy all the depot_tools docs into the mingw{bits} git docs root.
|
152
|
+
:: /i : Make sure xcopy knows that the destination names a folder, not a file
|
153
|
+
:: /q : Make xcopy quiet (though it still prints a `X File(s) copied` message
|
154
|
+
:: which is why we have the > NUL)
|
155
|
+
:: /d : Copy source files that are newer than the corresponding destination
|
156
|
+
:: files only. This prevents excessive copying when none of the docs
|
157
|
+
:: actually changed.
|
158
|
+
:: /y : Don't prompt for overwrites (yes)
|
159
|
+
xcopy /i /q /d /y "%WIN_TOOLS_ROOT_DIR%\man\html\*" "%GIT_INST_DIR%\mingw%OS_BITS%\share\doc\git-doc" > NUL
|
160
|
+
|
161
|
+
:: MSYS users need to restart their shell.
|
162
|
+
if defined MSYSTEM if defined DID_UPGRADE (
|
163
|
+
echo.
|
164
|
+
echo.
|
165
|
+
echo [1;31mIMPORTANT:[0m
|
166
|
+
echo depot_tools' git distribution has been updated while inside of a MinGW
|
167
|
+
echo shell. In order to complete the upgrade, please exit the shell and re-run
|
168
|
+
echo `git bash` from cmd.
|
169
|
+
exit 123
|
170
|
+
)
|
121
171
|
|
172
|
+
goto :SVN_CHECK
|
122
173
|
|
123
174
|
:GIT_FAIL
|
124
175
|
echo ... Failed to checkout git automatically.
|
125
|
-
echo You should get the "prebaked" version used at %
|
176
|
+
echo You should get the "prebaked" version used at %GIT_FETCH_URL%
|
126
177
|
set ERRORLEVEL=1
|
127
178
|
goto :END
|
128
179
|
|
@@ -2,146 +2,11 @@
|
|
2
2
|
# Use of this source code is governed by a BSD-style license that can be
|
3
3
|
# found in the LICENSE file.
|
4
4
|
|
5
|
-
"""
|
5
|
+
"""This file remains here because of multiple find_depot_tools.py scripts
|
6
|
+
that attempt to import it as a way to find depot_tools.
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
2. main module name doesn't contain the word 'test'
|
12
|
-
3. no NO_BREAKPAD environment variable is defined
|
8
|
+
See also:
|
9
|
+
* http://crbug.com/585837
|
10
|
+
* Example of find_depot_tools in build repo:
|
11
|
+
https://chromium.googlesource.com/chromium/tools/build/+/2680bd4/scripts/common/find_depot_tools.py
|
13
12
|
"""
|
14
|
-
|
15
|
-
import atexit
|
16
|
-
import getpass
|
17
|
-
import os
|
18
|
-
import socket
|
19
|
-
import sys
|
20
|
-
import time
|
21
|
-
import traceback
|
22
|
-
import urllib
|
23
|
-
import urllib2
|
24
|
-
|
25
|
-
|
26
|
-
# Configure these values.
|
27
|
-
DEFAULT_URL = 'https://chromium-status.appspot.com'
|
28
|
-
|
29
|
-
# Global variable to prevent double registration.
|
30
|
-
_REGISTERED = False
|
31
|
-
|
32
|
-
_TIME_STARTED = time.time()
|
33
|
-
|
34
|
-
_HOST_NAME = socket.getfqdn()
|
35
|
-
|
36
|
-
# Skip unit tests and we don't want anything from non-googler.
|
37
|
-
IS_ENABLED = (
|
38
|
-
not 'test' in getattr(sys.modules['__main__'], '__file__', '') and
|
39
|
-
not 'NO_BREAKPAD' in os.environ and
|
40
|
-
_HOST_NAME.endswith(('.google.com', '.chromium.org')))
|
41
|
-
|
42
|
-
|
43
|
-
def post(url, params):
|
44
|
-
"""HTTP POST with timeout when it's supported."""
|
45
|
-
if not IS_ENABLED:
|
46
|
-
# Make sure to not send anything for non googler.
|
47
|
-
return
|
48
|
-
kwargs = {}
|
49
|
-
if (sys.version_info[0] * 10 + sys.version_info[1]) >= 26:
|
50
|
-
kwargs['timeout'] = 4
|
51
|
-
try:
|
52
|
-
request = urllib2.urlopen(url, urllib.urlencode(params), **kwargs)
|
53
|
-
out = request.read()
|
54
|
-
request.close()
|
55
|
-
return out
|
56
|
-
except IOError:
|
57
|
-
return 'There was a failure while trying to send the stack trace. Too bad.'
|
58
|
-
|
59
|
-
|
60
|
-
def FormatException(e):
|
61
|
-
"""Returns a human readable form of an exception.
|
62
|
-
|
63
|
-
Adds the maximum number of interesting information in the safest way."""
|
64
|
-
try:
|
65
|
-
out = repr(e)
|
66
|
-
except Exception:
|
67
|
-
out = ''
|
68
|
-
try:
|
69
|
-
out = str(e)
|
70
|
-
if isinstance(e, Exception):
|
71
|
-
# urllib exceptions, usually the HTTP headers.
|
72
|
-
if hasattr(e, 'headers'):
|
73
|
-
out += '\nHeaders: %s' % e.headers
|
74
|
-
if hasattr(e, 'url'):
|
75
|
-
out += '\nUrl: %s' % e.url
|
76
|
-
if hasattr(e, 'msg'):
|
77
|
-
out += '\nMsg: %s' % e.msg
|
78
|
-
# The web page in some urllib exceptions.
|
79
|
-
if hasattr(e, 'read') and callable(e.read):
|
80
|
-
out += '\nread(): %s' % e.read()
|
81
|
-
if hasattr(e, 'info') and callable(e.info):
|
82
|
-
out += '\ninfo(): %s' % e.info()
|
83
|
-
except Exception:
|
84
|
-
pass
|
85
|
-
return out
|
86
|
-
|
87
|
-
|
88
|
-
def SendStack(last_tb, stack, url=None, maxlen=50, verbose=True):
|
89
|
-
"""Sends the stack trace to the breakpad server."""
|
90
|
-
if not IS_ENABLED:
|
91
|
-
return
|
92
|
-
def p(o):
|
93
|
-
if verbose:
|
94
|
-
print(o)
|
95
|
-
p('Sending crash report ...')
|
96
|
-
params = {
|
97
|
-
'args': sys.argv,
|
98
|
-
'cwd': os.getcwd(),
|
99
|
-
'exception': FormatException(last_tb),
|
100
|
-
'host': _HOST_NAME,
|
101
|
-
'stack': stack[0:4096],
|
102
|
-
'user': getpass.getuser(),
|
103
|
-
'version': sys.version,
|
104
|
-
}
|
105
|
-
p('\n'.join(' %s: %s' % (k, params[k][0:maxlen]) for k in sorted(params)))
|
106
|
-
p(post(url or DEFAULT_URL + '/breakpad', params))
|
107
|
-
|
108
|
-
|
109
|
-
def SendProfiling(duration, url=None):
|
110
|
-
params = {
|
111
|
-
'argv': ' '.join(sys.argv),
|
112
|
-
# Strip the hostname.
|
113
|
-
'domain': _HOST_NAME.split('.', 1)[-1],
|
114
|
-
'duration': duration,
|
115
|
-
'platform': sys.platform,
|
116
|
-
}
|
117
|
-
post(url or DEFAULT_URL + '/profiling', params)
|
118
|
-
|
119
|
-
|
120
|
-
def CheckForException():
|
121
|
-
"""Runs at exit. Look if there was an exception active."""
|
122
|
-
last_value = getattr(sys, 'last_value', None)
|
123
|
-
if last_value:
|
124
|
-
if not isinstance(last_value, KeyboardInterrupt):
|
125
|
-
last_tb = getattr(sys, 'last_traceback', None)
|
126
|
-
if last_tb:
|
127
|
-
SendStack(last_value, ''.join(traceback.format_tb(last_tb)))
|
128
|
-
else:
|
129
|
-
duration = time.time() - _TIME_STARTED
|
130
|
-
if duration > 90:
|
131
|
-
SendProfiling(duration)
|
132
|
-
|
133
|
-
|
134
|
-
def Register():
|
135
|
-
"""Registers the callback at exit. Calling it multiple times is no-op."""
|
136
|
-
global _REGISTERED
|
137
|
-
if _REGISTERED:
|
138
|
-
return
|
139
|
-
_REGISTERED = True
|
140
|
-
atexit.register(CheckForException)
|
141
|
-
|
142
|
-
|
143
|
-
if IS_ENABLED:
|
144
|
-
Register()
|
145
|
-
|
146
|
-
# Uncomment this line if you want to test it out.
|
147
|
-
#Register()
|
@@ -27,7 +27,7 @@ import auth
|
|
27
27
|
|
28
28
|
|
29
29
|
BUILDBUCKET_URL = 'https://cr-buildbucket.appspot.com'
|
30
|
-
|
30
|
+
BUILDBUCKET_API_URL = urlparse.urljoin(
|
31
31
|
BUILDBUCKET_URL,
|
32
32
|
'_ah/api/buildbucket/v1/builds',
|
33
33
|
)
|
@@ -41,6 +41,12 @@ def main(argv):
|
|
41
41
|
action='store_true',
|
42
42
|
)
|
43
43
|
subparsers = parser.add_subparsers(dest='command')
|
44
|
+
get_parser = subparsers.add_parser('get')
|
45
|
+
get_parser.add_argument(
|
46
|
+
'--id',
|
47
|
+
help='The ID of the build to get the status of.',
|
48
|
+
required=True,
|
49
|
+
)
|
44
50
|
put_parser = subparsers.add_parser('put')
|
45
51
|
put_parser.add_argument(
|
46
52
|
'-b',
|
@@ -68,26 +74,41 @@ def main(argv):
|
|
68
74
|
help='A file to load a JSON dict of properties from.',
|
69
75
|
)
|
70
76
|
args = parser.parse_args()
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
77
|
+
|
78
|
+
body = None
|
79
|
+
|
80
|
+
if args.command == 'get':
|
81
|
+
method = 'GET'
|
82
|
+
url = '%s/%s' % (BUILDBUCKET_API_URL, args.id)
|
83
|
+
elif args.command == 'put':
|
84
|
+
changes = []
|
85
|
+
if args.changes:
|
86
|
+
try:
|
87
|
+
with open(args.changes) as fp:
|
88
|
+
changes.extend(json.load(fp))
|
89
|
+
except (TypeError, ValueError):
|
90
|
+
sys.stderr.write('%s contained invalid JSON list.\n' % args.changes)
|
91
|
+
raise
|
92
|
+
|
93
|
+
properties = {}
|
94
|
+
if args.properties:
|
95
|
+
try:
|
96
|
+
with open(args.properties) as fp:
|
97
|
+
properties.update(json.load(fp))
|
98
|
+
except (TypeError, ValueError):
|
99
|
+
sys.stderr.write('%s contained invalid JSON dict.\n' % args.properties)
|
100
|
+
raise
|
101
|
+
|
102
|
+
body = json.dumps({
|
103
|
+
'bucket': args.bucket,
|
104
|
+
'parameters_json': json.dumps({
|
105
|
+
'builder_name': args.builder_name,
|
106
|
+
'changes': changes,
|
107
|
+
'properties': properties,
|
108
|
+
}),
|
109
|
+
})
|
110
|
+
method = 'PUT'
|
111
|
+
url = BUILDBUCKET_API_URL
|
91
112
|
|
92
113
|
authenticator = auth.get_authenticator_for_host(
|
93
114
|
BUILDBUCKET_URL,
|
@@ -96,16 +117,9 @@ def main(argv):
|
|
96
117
|
http = authenticator.authorize(httplib2.Http())
|
97
118
|
http.force_exception_to_status_code = True
|
98
119
|
response, content = http.request(
|
99
|
-
|
100
|
-
|
101
|
-
body=
|
102
|
-
'bucket': args.bucket,
|
103
|
-
'parameters_json': json.dumps({
|
104
|
-
'builder_name': args.builder_name,
|
105
|
-
'changes': changes,
|
106
|
-
'properties': properties,
|
107
|
-
}),
|
108
|
-
}),
|
120
|
+
url,
|
121
|
+
method,
|
122
|
+
body=body,
|
109
123
|
headers={'Content-Type': 'application/json'},
|
110
124
|
)
|
111
125
|
|