Commit Graph

52 Commits (d88d7f5ce36c2a8a226344e321164e3b2fd8b603)

Author SHA1 Message Date
ilevy@chromium.org 5856562184 Skip subprocess2_test suite on upload.
This suite is very slow (26s), while the rest of the test suites
are fast.. Since subprocess2 is a relatively static module,
blacklist the suite for upload.


Review URL: https://chromiumcodereview.appspot.com/12544027

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@188657 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org ff9a217e26 Add disabled_warnings arg to RunPylint() and use the default pylintrc file by default.
Update pylintrc to be near the pylint 0.25.1 default file.

R=cmp@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/10199016

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@133707 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 8a06be6b3c depot_tools doesn't support python 2.5 anymore.
Remove the stale presubmit warning.

TBR=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/9655005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@125696 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
chrisha@chromium.org c920ad2e24 Adds Python package management to depot_tools.
This CL introduces package_management.py, a module for managing third-party Python packages in a site directory within depot_tools. A future CL will integrate this with depot_tools, causing the packages to be downloaded and installed on first run after that CL lands. Once in place presubmit_canned_checks will be extended to make use of the locally installed version of pylint.

BUG=
TEST=


Review URL: http://codereview.chromium.org/8965033

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@120225 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 0927b7eef8 Create a new testing_support module to move utility modules there
It will simplify importing utility modules from other projects. Otherwise I was getting name conflicts with 'test'.

Reenable W0403 that was disabled in the previous CL.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8508015

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109636 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org fae707be99 Fix a typo that resulted in no tests to be run in depot_tools. :(
Add a warning when RunUnitTestsInDirectory() finds no test to run to
catch this kind of regression.

Fix all the regressions that where introduced in the meantime...

TBR=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7906009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101347 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 87e6d33103 Update subprocess2.check_output() to behave like subprocess.check_output().
stderr is not redirected by default. stdout is not allowed.
Both were oversight.
Do not override stdin=None in case the user would response to stderr output for
example.

Increase test coverage.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7860041

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100456 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
asvitkine@chromium.org 63c2c1d2ad Add PRESUBMIT.py exclusion for cpplint_chromium.py.
Needed for: http://codereview.chromium.org/7834045/

BUG=none
TEST=Check that cpplint_chromium.py does not trigger presubmit warnings.

Review URL: http://codereview.chromium.org/7789033

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100025 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org d52417c909 Do not run integration tests on upload, they are too slow.
gclient_scm_test.py throws randomly gclient_utils.Error.
Simply update the test expectation. It has no effect on runtime.

BUG=
TEST=


Review URL: http://codereview.chromium.org/7828024

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@99436 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 57e48b821b Fix presubmit check to not enforce git-try to be parsed as python
R=cmp@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7172014

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@89208 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 899e1c1a61 Add verbose support throught presubmit checks
Add propagation of verbose flag from git cl to presubmit_support

Rename NotImplementedException to standard NotImplementError.

R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/6810012

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80798 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org c98c0c5249 Make more tests pass on Windows.
Also fix a few issues found along the way.

Tests had regressed a lot. Add a lot of tweaks to make most test pass.

R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/6792060

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80618 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org ccbb781aa7 Convert PRESUBMIT.py to use check_output() instead of Popen().
Fix execution on windows.

Remove more code.

R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/6792054

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80617 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 725f1c3b69 Add a warning if the current version of python is not 2.5
R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/6791018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80212 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 3c9f7cae7c Switch half of PRESUBMIT.py to RunUnitTestsInDirectory()
Not changed git-cl integration tests because they assume the current directory
is ./tests/

R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/6690046

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80156 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 2a74d37e28 Move git_cl back into depot_tools.
Remove git_cl_hooks.py since it's now unnecessary.

BUG=
TEST=

Review URL: http://codereview.chromium.org/6758001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79715 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 35625c7e56 Fix locale.getlocale() exception.
Reapply r79006 with fixes for ubuntu 10.4.

The only change is in fix_default_encoding() to trap an exception
locale.getlocale() may throw.

R=dpranke@chromium.org
BUG=none
TEST=unit test

Review URL: http://codereview.chromium.org/6721029

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79144 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org f946b22f96 Revert r79006: "Add code to 'fix' python encoding and it's unit test."
It is causing exception for some users on ubuntu 10.4 with:
"category LC_ALL is not supported"

TBR=dpranke

Review URL: http://codereview.chromium.org/6717025

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79012 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 8e741d3bb1 Add code to 'fix' python encoding and it's unit test.
With this code in action, I can successfully print arabic and chinese on linux
and cygwin. It fails to print chinese on my Mac but prints arabic. It prints '?'
on Windows console but it *doesn't throw* which is the biggest improvement here.
It was particularly a problem on windows because WindowsError's description text
is in the current ANSI code page so it failed to print if the text was not pure
ASCII, like error message when using Windows' French UI.

R=dpranke@chromium.org
BUG=none
TEST=manual unit test ./tests/fix_encoding_test.py and it shouldn't throw

Review URL: http://codereview.chromium.org/6676090

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79006 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 97ae58eb0a Make git_cl (and everything else not skipped under depot_tools)
pass pylint cleanly.

There should be no functional changes in this patch, although there's at least one minor bug that lint caught.

Review URL: http://codereview.chromium.org/6685023

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78638 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 8d84041516 Enable OWNERS file enforcement in depot_tools
R=chase@chromium.org,maruel@chromium.org
Review URL: http://codereview.chromium.org/6676058

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78632 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 627ea67f26 Actually check Rietveld for LGTMs ...
This change requires us to change the previous signature for the CheckOwners() hook to provide the server address and email regexp to use for parsing approvals from Rietveld.

Review URL: http://codereview.chromium.org/6657028

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77891 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 3ae183fbb7 add PresubmitAddText() result class to indicate that text needs to be passed back to git cl / gcl.
Also, this properly wires up the presubmit code to the owners code and adds unit tests.

Review URL: http://codereview.chromium.org/6623074

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77523 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 5fe603e8c7 add owners_unittest to PRESUBMIT.py
Review URL: http://codereview.chromium.org/6651009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77518 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 5d0dc43e26 Fix path filtering to be on the relative path and no on the absolute path.
Add logging to presubmit_support.py.

BUG=
TEST=

Review URL: http://codereview.chromium.org/6004006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@70378 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
chase@chromium.org b9a9832474 Import from git_cl instead of git_cl_repo.
Also update the PRESUBMIT check to exclude git_cl/.

BUG=none
TEST=git-cl hooks run
TBR=maruel@chromium.org
Review URL: http://codereview.chromium.org/5998008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@70108 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org bf38a7ed53 Enhance RunPylint to use white_list and black_list arguments.
Change RunPylint to parse all .py files when one is modified.

Make all depot_tools/tests pass on pylint. That mostly meant fixing some
builtins aliasing, wrong alignment and turning off most remaining warnings.

BUG=none
TEST=unit tests

Review URL: http://codereview.chromium.org/5695007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@69159 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org e94aedc26f Add RunPylint as a canned presubmit check.
Adding it as I figured out how to make it run correctly on ubuntu 10.4 and it's
used in enough places it warrants a canned check.

BUG=none
TEST=it self tests itself.

Review URL: http://codereview.chromium.org/5682011

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@69051 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org b17b55beca Disable the remaining pylint warnings locally and enable pylint warnings in PRESUBMIT.
This causes some code clutter.

TEST=Increased pylint warning level
BUG=none

Review URL: http://codereview.chromium.org/4321006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64913 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 488d043179 Improve PRESUBMIT.py error messages.
TEST=presubmit.py
BUG=none

Review URL: http://codereview.chromium.org/4279002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64903 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 1e629b3bd7 Fix presubmit check for depot_tools on linux and mac.
The class WindowsError is only a builtin on Windows. Use OSError instead.
Also make the exception more comprehensible on the other platforms when
pylint is not installed.

TEST=none
BUG=none

Review URL: http://codereview.chromium.org/3331022

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@59253 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 5631746743 Improve the testing situation on Windows.
For now that involves disabling a lot of tests when they can't be run.

I'm unsure about the ascii encoding, it fails here if I keep this call on a French UI.

TEST=none
BUG=none
Review URL: http://codereview.chromium.org/3333028

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@59137 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org fa410372ba Add pylint to presubmit checks.
This tool has been quite useful noticing errors in the past and I'd have avoided a breakage in r58936 if I had run it.

Had to fix a few scripts first.

BUG=none
TEST=new test

Review URL: http://codereview.chromium.org/3337018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@59107 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org ad80e3b96e Simplify GIT.Capture() code to always redirect stderr by default and always throw an exception on failure.
Make gclient_scm_test silent.

Replace raise Exception() with raise gclient_utils.Error().

BUG=54084
TEST=none

Review URL: http://codereview.chromium.org/3353018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58936 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 399318ec99 Fix gclient_utils_test and disable gclient_scm_test.
gclient_scm_test is really flaky and is a pain to maintain. gclient_scm.py
coverage is good enough with gclient_smokte_test.

TBR=chase

Review URL: http://codereview.chromium.org/3155024

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56351 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 888b8355ca Add gclient_smoketest.py to PRESUBMIT.py check
It raises the time to run the presubmit to ~30 seconds but it's still worth.

TEST=run more often

Review URL: http://codereview.chromium.org/3146010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55759 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org bbfc80f6b0 Add a warning when git-cl-upload-hook is modified to update git-cl accordingly.
Review URL: http://codereview.chromium.org/2806020

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@50481 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 5ca2769d42 Reapply 48271 for the third time with fix.
"""
Enable automatic command and one-liner doc. Reformat pydoc accordingly.
Add parser as an argument and parse_args hook in preparation to move parse_args at the right place, inside the CMDxx functions.

R.I.P. gclient_test.py
"""
original code review at: http://codereview.chromium.org/2253002

In addition:
- Add more smoke tests: vars, hooks, runhooks
- Bugs filed about misbehavior with git checkout
- Fixed gclient runhooks

TEST=smoke test
BUG=23328

Review URL: http://codereview.chromium.org/2265002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48309 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 8f041185af Revert "Reapply 48271 with fix."
Still broken.

Review URL: http://codereview.chromium.org/2285002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48290 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 3365c913c4 Reapply 48271 with fix.
"""
Enable automatic command and one-liner doc. Reformat pydoc accordingly.
Add parser as an argument and parse_args hook in preparation to move parse_args at the right place, inside the CMDxx functions.

R.I.P. gclient_test.py
"""
original code review at: http://codereview.chromium.org/2253002

In addition:
- Add more smoke tests: vars, hooks, runhooks
- Bugs filed about misbehavior with git checkout
- Fixed gclient runhooks

TEST=smoke test
BUG=23328

Review URL: http://codereview.chromium.org/2265002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48289 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 5434b4e20a Reverting last change, broke update.
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48272 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 096469fa69 Enable automatic command and one-liner doc. Reformat pydoc accordingly.
Add parser as an argument and parse_args hook in preparation to move parse_args at the right place, inside the CMDxx functions.

R.I.P. gclient_test.py

Review URL: http://codereview.chromium.org/2253002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48271 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org ba55177642 Fix licensing headers and move most third party code to third_party/
Moved tests/pymox to third_party/pymox
Moved upload.py to third_party/upload.py
Fixed tests so they can run standalone
Fixed the executable bit on some scripts

TEST=none
BUG=34376
Review URL: http://codereview.chromium.org/562031

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@37987 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 56ca2c246c Remove stale revert.py unit test and fix another test I broke in r37487.
TEST=unit tests
BUG=none

Review URL: http://codereview.chromium.org/556092

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@37618 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org d5800f1996 Split scm-specific functions out of gclient_scm.py to scm.py.
Reapplies r31809 is typo fixed.

TEST=unit tests fixed and reclassified
BUG=none

Review URL: http://codereview.chromium.org/393001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31812 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 0563d6c747 Revert "Split scm-specific functions out of gclient_scm.py to scm.py."
This reverts commit 7489404c56dcc725c7c13214f410b2d375a6630a.

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31810 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 8ce0a13a85 Split scm-specific functions out of gclient_scm.py to scm.py.
TEST=unit tests fixed and reclassified
BUG=none

Review URL: http://codereview.chromium.org/389020

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31809 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
msb@chromium.org e28e498655 gclient_scm: add support for .git
gclient_tests: add GitWrapper test cases

gclient_scm: make RunGit private and add url check

gclient_scm: add revert, run_hooks, and status

gclient_scm: add git implementations of cleanup, diff, and export

gclient_scm: implment GitSCM::update

gclient_scm: add a checks for unsupported scm and unimplemented method

Review URL: http://codereview.chromium.org/235005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@27241 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
nirnimesh@chromium.org b82e409ed7 Add unit tests for watchlists
Review URL: http://codereview.chromium.org/126272

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@18704 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org ce30ef7ceb Fix the PRESUBMIT.py for depot_tools.
Ironically, it was broken.

Review URL: http://codereview.chromium.org/115679

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