Commit Graph

7 Commits (03a0d5b08cac2216dd05b63f6e08ad89ef87cf94)

Author SHA1 Message Date
Edward Lemur 83aafc979f depot_tools: Make gsutil compatible with python3.
Bug: 1026371
Change-Id: Iddef64ac2d3a9f97fdb0540a048dfb9dc5679b5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1925407
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Raphael Kubo da Costa e9342a723b Use assertEqual() rather than assertEquals() in Python tests.
The latter form is deprecated, and can generate extraneous output when
running the tests:

    DeprecationWarning: Please use assertEqual instead.

Bug: 984182, 1007872
Change-Id: Ibac81178e719a739560bbc65e0f6b9eda40b313a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1859995
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Ryan Tseng 83fd81f8a4 download_from_google_storage: Fix tests and rename
the tests haven't been ran by presumbit for a while because of the plural in
the filename.

At some point some post "gsutil cp" file checking happened, which
broke the tests.  This adds a callback to the fake gsutil cp so
that the expect file is copied over.

This also removes "gsutil version" checking from gsutil.py
and just assume that if the file exists, then it's good, which
should shave about 1-2s off of each gsutil.py call.

Bug: 772740,776311
Change-Id: I4fef62cfd46a849afed1f095dd6a96069376d13d
Reviewed-on: https://chromium-review.googlesource.com/707758
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
dnj@chromium.org 605d81dfb3 gsutil: Parallel-safe, specify target, add clean.
- Update "gsutil.py" to be cooperatively safe when invoked
  multiple times simultaneously.
- Allow the cache directory to be overridden by the
  DEPOT_TOOLS_GSUTIL_BIN_DIR environment variable.
- Add a "--clean" flag to force "gsutil.py" to do a clean download.

BUG=chromium:452497
TEST=local
  - for i in `seq 1 50`; do ./gsutil.py --clean -- version&; done

Review URL: https://codereview.chromium.org/1346213003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296772 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
hinoka@chromium.org 5e879a426d Hook sys.stdio directly to the gsutil subprocess for the gsutil call
So that gsutil.py config works.

I would've preferred the execv solution, but apparently that didn't work on Windows :(

BUG=451551

Review URL: https://codereview.chromium.org/870093003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293790 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
primiano@chromium.org df351768f2 gsutil: Use urllib2 instead of urllib.
This is similar to r247914 and r149742: urllib does not work with SSL
connections behind proxies, we need to use urllib2 instead. Doing this
should allow people behind proxies to download gsutils 4.7 after
r293413.

(Setting NOTRY here to be able to land the issue, otherwise the CQ fails when running some presubmit checks, see crbug.com/443232)

R=maruel@chromium.org, hinoka@chromium.org, pgervais@chromium.org, primiano@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/809053002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293439 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
hinoka@chromium.org 7a79054e2f GSUtil.py wrapper script
This is for transitioning us out of the horribly outdated gsutil 3.4 thats
currently residing in depot_tools.  This script:
1. Downloads GSUtil, pinned to a version (4.6 by default).
2. Executes GSUtil with the given parameters
3. (TODO) Runs the fallback GSUtil if #2 fails.


The transition plan is:
1. Set the fallback as default, making this script a no-op
2. Modify recipes (main consumer of gsutil) to pass in --force_version 4.6
3. Switch 4.6 as the default for gsutil.py
4. Make fallback failure a loud red failure
5. Remove depot_tools/third_party/gsutil

BUG=434422

Review URL: https://codereview.chromium.org/742173002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293320 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago