Commit Graph

38 Commits (fd19a3032fac02441a44da69e1ce1fca51b97e55)

Author SHA1 Message Date
nsylvain@google.com efc8093168 Add a --deps-file flag to gclient to allow using a deps file other than DEPS.
TEST=covered by gclient_smoketest.py
Review URL: http://codereview.chromium.org/7062029

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@87367 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 fb3d3245ad Add subprocess.Popen().kill() to python 2.5.
Move code in tests/fake_repos.py to subprocess2.py.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80152 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 45d8db04f9 Add more python 2.5 compatibility.
Makes all the tests runnable on python 2.5.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80068 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 8cceb18f4b Forcibly uses a non-standard port for local svn and git servers.
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
14 years ago
dpranke@chromium.org 330f534792 Although there appear to be one or two tests that are flaky on both mac and linux.
Review URL: http://codereview.chromium.org/6681019

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77955 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org f9040728dc Shorten RemoveDirectory and rename to rmtree. Remove rmtree from fake_repos.
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
14 years ago
maruel@chromium.org 7dfb9b747c Add trial_dir to manage automatic trial directory creation and deletion.
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
14 years ago
maruel@chromium.org 5257081dbf Remove FakeReposBase.HOST and add svn_base and git_base.
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
14 years ago
maruel@chromium.org bd21c51d98 Correctly kill 'git daemon' child process, fixing a lot of testing issues.
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
14 years ago
maruel@chromium.org 17f9e1f7dc Add comment to clarify SHOULD_LEAK
NO CODE CHANGE.

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@73510 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 26d762d0c0 Add code to FakeReposBase to revert changes committed by a unit tests.
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
14 years ago
maruel@chromium.org 21548eb01b Change the fake repo svn users to be emails.
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
14 years ago
maruel@chromium.org 4c6f18ca9e Silence pylint warnings.
TBR=dpranke
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@69848 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org e0f81697e8 Split FakeRepos class in two so it can be reused for commti-queue unit tests.
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
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 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 66c83e68b7 Rename retcode to returncode to be consistent with subprocess.
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
15 years ago
maruel@chromium.org 6f71d093d9 Add a test more representative of what WebKit does.
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
15 years ago
maruel@chromium.org 9b13351cd7 Add testing for the From(File()) case, fix revinfo.
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
15 years ago
maruel@chromium.org e5a71c9d4b Fix for non English interface.
TBR=bradnelson

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@52064 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org e3216c6e26 Improve testing with File() keyword, found a few bugs along the way
TEST=new smoke tests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@51824 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 271375b004 Move DEPS parsing into a single function. This is a move towards having each DEPS entry being a Dependency instance.
TEST=new revinfo unit tests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@50630 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 0d425926d8 Revert r50367 "Move DEPS parsing into a single function." yet again...
TBR=nasserg

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@50372 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 6b57049528 Move DEPS parsing into a single function. This is a move towards having each DEPS entry being a Dependency instance.
TEST=new revinfo unit tests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@50367 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org a4400f4718 Add more forced revisions in fake_repos.py and adds a recursive DEPS.
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
15 years ago
maruel@chromium.org 524a6eda43 Significantly improve gclient_smoketest.py.
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
15 years ago
maruel@chromium.org 8b599cfa42 Fix gclient_smoketest for svn 1.5 and python 2.5
Review URL: http://codereview.chromium.org/2487003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48688 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 50fd2bd734 Fix multiple tests on Windows.
BUG=23328
Review URL: http://codereview.chromium.org/2446001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48613 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 307d179455 Move all revision parsing code to _EnforceRevisions.
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
15 years ago
maruel@chromium.org 17cdf76123 Make FakeRepos more reusable.
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
15 years ago
maruel@chromium.org 918a9ae625 Add workaround to ignore the first solution specified with --revision solution@rev
TEST=new smoke test
BUG=chromiums-os:3465

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48490 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 5fc2a33a78 Add more smoke test for gclient config and gclient revinfo.
BUG=23328

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48311 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 3eac705726 Add real gclient_smoke tests now
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
15 years ago
maruel@chromium.org 83bea09ad2 Add basic gclient smoke tests.
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
15 years ago