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
This reduces the likehood of conflict with local server and makes possible to
run this check two times in parallel.
R=dpranke@chromium.org
TEST=moar unit tests
BUG=none
Review URL: http://codereview.chromium.org/6725042
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79281 0039d316-1c4b-4281-b951-d872f2087c98
Keep an alias to RemoveDirectory, will be removed in a later change.
TEST=new unit test to test this function
BUG=none
Review URL: http://codereview.chromium.org/6628032
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77463 0039d316-1c4b-4281-b951-d872f2087c98
The tests now base the directory in mkdtemp() which is much safer than using the
source's file directory as before.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6625018
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77278 0039d316-1c4b-4281-b951-d872f2087c98
Ease support for different port if necessary.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6632007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76968 0039d316-1c4b-4281-b951-d872f2087c98
Add code to wait for the bound port to open and close correctly, removing race
conditions.
BUG=test reliability
TEST=better
Review URL: http://codereview.chromium.org/6627013
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76966 0039d316-1c4b-4281-b951-d872f2087c98
This enables seamless unit tests that check-in files without side-effects on the
remaining unit tests.
BUG=none
TEST=none
TBR=dpranke
Review URL: http://codereview.chromium.org/6250073
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@73456 0039d316-1c4b-4281-b951-d872f2087c98
Also remove the harcoding of the names by putting them in a variable.
This will help testing of the commit queue.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6350013
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@72454 0039d316-1c4b-4281-b951-d872f2087c98
FakeRepos is useful for offline SCM tests but it was hardcoded for depot_tools
requirements. Luckily, it was already modular enought that it merely required to
shuffle code around to split it in two classes to be able to reuse the code
as-is.
BUG=
TEST=
Review URL: http://codereview.chromium.org/6029004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@69845 0039d316-1c4b-4281-b951-d872f2087c98
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
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
Change CheckCallError to inherit from Error. This will simplify try/except changes.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/3324007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58695 0039d316-1c4b-4281-b951-d872f2087c98
Emulate running gclient from a checkout containing .gclient and a DEPS, with the
solution having an url set to None.
TEST=new smoke test
Review URL: http://codereview.chromium.org/2897010
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@52119 0039d316-1c4b-4281-b951-d872f2087c98
This case covers the webkit gclient usage.
TEST=improved smoke test
Review URL: http://codereview.chromium.org/2968005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@52092 0039d316-1c4b-4281-b951-d872f2087c98
The recursive DEPS is to be used with From() testing.
Didn't enable From() yet since it broke tests and to simplify this change.
Review URL: http://codereview.chromium.org/2699005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@49427 0039d316-1c4b-4281-b951-d872f2087c98
Add a lot of checking for stdout and fix one mis-assumption.
Make the code much more compact.
Make the git_hashes 'revisions' 1-based for consistency.
Review URL: http://codereview.chromium.org/2594001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48925 0039d316-1c4b-4281-b951-d872f2087c98
Make -r invalid@rev a warning and ignore the argument.
Make -r rev use the Nth solution.
Fix a bug in FakeRepos.assertTree().
TEST=updated the smoke test to reflect the new behavior which should be the most compatible with the current buildbot behavior
BUG=chromium-os:3465
Review URL: http://codereview.chromium.org/2430001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48607 0039d316-1c4b-4281-b951-d872f2087c98
Make it work with 'coverage'.
Make FakeRepos initialization lazy. Only generate the repository when needed. It's in part intended for gclient_scm_tests.py but I left it out of this review.
To use:
easy_install coverage
./tests/gclient_smoke.py -c
coverage report
Current coverage with gclient_smoke:
Name Stmts Exec Cover
-----------------------------------------------
gclient 557 416 74%
gclient_scm 496 270 54%
gclient_utils 195 117 60%
scm 439 180 41%
(ignoring irrelevant files)
It's quite good in fact, 74% of gclient.py being executed with the smoke test.
Review URL: http://codereview.chromium.org/2352002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48501 0039d316-1c4b-4281-b951-d872f2087c98
"""
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
"""
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
gclient sync, revert and status are tested.
GClientSmokeGIT.testRevertAndStatus is known to fail since git-backed revert doesn't work.
Review URL: http://codereview.chromium.org/2189001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48239 0039d316-1c4b-4281-b951-d872f2087c98
The unit tests are unbearable and the next change forces me to trash them.
Thus adding smoke tests before. The current tests aren't involved enough yet but
are a good base for further testing.
I plan to only test the most important functionalities, the ones used in the continuous build and try server.
TEST=new smoke test
BUG=23328
Review URL: http://codereview.chromium.org/2092012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@47580 0039d316-1c4b-4281-b951-d872f2087c98