Commit Graph

483 Commits (0927b7eef86dd283507fda2fc71cc7b502aab23c)

Author SHA1 Message Date
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 428342a0a7 Standardize the sys.path fix up and fix a few pylint warnings.
Disable temporarily W0403, will be reenabled on the next CL

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109435 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 7eda862b1f Revert r109283, r109282 and r109239.
"Add callback support for stdout and stderr."
"Add tests for both universal_newlines=True and False."
"Implement accelerated tee support for POSIX."

The reason is that the semantic of
subprocess2.check_call(cmd, timeout=60, stderr=subprocess2.STDOUT) changed,
stderr wasn't redirected to VOID anymore and for an unknown reason, it was
hanging until the timeout happened. Will reapply r109239 with a new regression
test to detect that bug.

TBR=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109369 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org fefff18b55 Implement accelerated tee support for POSIX.
This removes all the need of threading, which removes the contention on the GIL
lock.

Taking S2Test.test_check_output_tee_large as baseline, numbers are
real/user/sys in seconds:
Ubuntu workstation: ~25x  2.4/1.9/1.5 -> 0.10/0.70/0.02
OSX 10.6 laptop:    ~40x  6.4/5.3/3.9 -> 0.15/0.80/0.07
Cygwin on win7:      ~4x  2.8/2.2/1.3 -> 0.60/0.16/0.30

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109283 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org f2dca4e174 Add tests for both universal_newlines=True and False.
Fix stdout+stderr on Windows to binary mode in the child test process to make
sure testing is done correctly.

R=dpranke@chromium.org
BUG=
TEST=manually tested on OSX, Windows, cygwin and ubuntu


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109282 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 65be6f6bcf Add callback support for stdout and stderr.
It's currently an inefficient thread implementation. Interestingly
enough, callback support is significantly faster on cygwin than on
native python.

Writing an efficient implementation is punted for a later change,
one per implementation.

Stops using a temporary file since it's not necessary anymore.

The goal is to reduce the number of places where a similar paradigm
is used by having a canonical generic implementation.

R=dpranke@chromium.org
BUG=
TEST=Tested manually on Windows, cygwin, linux, OSX 10.6


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109239 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 7ccb4bb83e Blacklist .diff and .patch files
Otherwise, silly checks like EOL whitespace triggers constantly.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@108899 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 8b322b3cb7 Handle cases where '.' show up in svn status and is deleted
This would cause random try job failures, especially when switching around
DEPS <-> svn directory conversion.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@108144 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 85da74b671 Temporarily disable CheckRietveldTryJobExecution() while the Rietveld API is being upgraded
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@107590 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 0e0436a662 Move code starting the editor into a common function.
Windows users wouldn't get the same behavior on git cl vs gcl.
Improve automatic CRLF<->LF conversion, some gcl users would be \n repeated in
their description depending on the editor used.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@107106 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 37ca0b1cdd Fix tests on Windows
R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106866 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 042f0e73de Improve the sys.stdout proxy to be more transparent.
Otherwise isatty() could not be proxied correctly.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106864 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 6c48a304d4 Fix a concurrency issue happening with deep dependencies when the intermediary
directory doesn't exist, on fresh checkout and --jobs >1.

It happens in the case where there is 3 dependencies:
a
a/b/c/d
a/b/c/e

'a' is processed first. Then 'a/b/c/d' and 'a/b/c/e' are fired simultaneously.
If both are not present, both svn checkout tries to mkdir b and b/c and a race
condition occurs between their call for isdir() and mkdir().

This works around the issue by creating the intermediary directories ourself
before calling out svn and managing the error ourself.

TBR=dpranke@chromium.org
BUG=
TEST=fresh checkout shouldn't be flaky


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106636 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 97335088c6 Revert r106358 "Get rid of RunShell*() functions in gcl.py to finish the conversion to subprocess2"
This eats stdout while gcl is committing, which is annoying. It needs tee-like
support first. Will revisit this change later, reverting in the meantime.

TBR=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106498 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org db0ee6f1e4 Get rid of RunShell*() functions in gcl.py to finish the conversion to subprocess2
R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106358 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org b9be065ac1 Do not sort solutions anymore, only dependencies specified in DEPS files.
Otherwise it breaks naked --revision usage. One example issue is linux_chromeos
applying the revision to cros_deps instead of src.

TBR=dpranke@chromium.org
BUG=100335
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@105522 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 69392e7ca7 Prepare to make --revision <number> to be an error when multiple solutions are present.
It will help catch issues like the one we are getting on linux_chromeos where
the ordering of the solution is now by name, causing the default solution to be
used for --revision being the wrong one.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@105387 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org a2862ded8e Enforce --jobs 1 for all the calls in testRevertAndStatus.
Note that status() and revert() need to be correctly implemented before finishing this test.

TBR=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@105369 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 5fe6d3cf6a Stabilize testRevetAndStatus gclient smoke test.
gclient status using --job 8 by default may return the items in a different
other. Simplify the test by forcing ordering.

TBR=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@105338 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
rcui@google.com 13595ffa41 Add repo-managed checkout support to trychange.py
BUG=chromium-os:21286
TEST=Ran 'git-try' with/without --root=src, and with/without .gclient file

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@105229 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org c0cc0871b4 Make revert more resilient to partial sync failure.
Improve revert to skip over non managed directory and to clobber invalid
checkouts.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@105103 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 36ac239bd3 Reapply r104938 "Make svn update not prompt during a sync."
It wasn't broken. The tree collapsed around the same time for unrelated reason.

TBR=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@105090 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org edb6ea6ea5 Revert r104938 "Make svn update not prompt during a sync."
I'm not sure if it's causing the tree blow up but I'm not taking any chance.

TBR=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104956 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 94aa50fce3 Make svn update not prompt during a sync.
Otherwise it may hangs in various ways.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104938 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 470b543fcf Stop modifiying requirements out of thread and generate it instead.
This fixes GClientSmokeBoth.testMultiSolutionsJobs flakiness by having
consistent ordering.

Now no out of thread modification is ever done, which result in much saner code.

R=dpranke@chromium.org
BUG=60725
TEST=tested manually with gclient sync --jobs 100 on chrome and with
gclient_smotetest.py


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104920 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 3223edd588 Have the DEPS only parsed in the relevant thread.
This means parsing the DEPS file all the time preemptively in case it's needed
for a From() reference. This could break certain checkout, we'll see.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104817 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 0bcfd18035 Move all mutations into a specific place.
This makes coherency checks more consistent for DEPS vs .gclient.

It's still not thread safe but the mutation code paths are easier to follow.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104772 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org e085d81a36 Add assert to make sure the files argument type is valid.
This would have caught a bug in the CQ instead of silently failing.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104767 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
szager@google.com 85d3e3adbc Restore 103787 (fix git progress message), and update test expectations.
Review URL: http://codereview.chromium.org/8161009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104504 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
asvitkine@chromium.org d32fab24a6 Fix git --upstream_branch breakage due to removal of |file_list| param.
Makes SCM take the |file_list| as a parameter instead of getting it from |options|.

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104148 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 1333cb3edb Improve logging and ease debugging.
While trying to fix all the multithreading issues...

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104026 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org ed102570d6 Add a unit test to breakpad.
While re-reading the code, I thought I had found a bug but I hadn't. So I wrote
the test to document the behavior to not make the same error again.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@103772 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 5e975633a8 Fix handling of file renames.
The patches needs to by applied 'in-order' to not delete source files.

Added more tests.

R=dpranke@chromium.org
BUG=94330
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@103309 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org b1d1a78c8d Add post_processors override to apply_patch() and add more testing.
Move ReadOnlyCheckout tests into its own fixture.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@103272 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org ce69514a5d Share more data between checkout_test and patches_data.
Also reorder some patchset in preparation to patchset reording CL.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@103147 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
asvitkine@chromium.org 1516995e79 Support for |change| argument to |GetPreferredTrySlaves()|, try 2.
Needed to make it so changes containing only *.mm are only sent to Mac trybots by default.

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102930 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org ebf1f997f5 Disable --jobs 1000 tests since it's not stable yet.
TBR=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102923 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 6fb14d906b Revert r102783 "Support for |change| argument to |GetPreferredTrySlaves()|."
Cause an infinite recursion in some context.

TBR=asvitkine@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102836 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 7af6c4dc80 Use universal EOL conversion when calling the text editor in gcl.
This was causing issues for windows user with notepad2.

Fix trychange.py on python2.5.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102797 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
asvitkine@chromium.org c0c424bca4 Support for |change| argument to |GetPreferredTrySlaves()|.
Needed to make it so changes containing only *.mm are only sent to Mac trybots by default.

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102783 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 4bdd5fd5ae Move dependencies to a (to be) locked property.
R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102777 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org c73e516e12 Add my_reviews.py script for perf time.
Add search interface for rietveld.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102191 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
cmp@chromium.org eb2756dfc4 Add a --unmanaged flag to gclient config to allow the main solution to be unmanaged by the scm.
The dependencies will continue to be managed. A new flag is present in the .gclient file to control this behavior.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102002 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 6ca8bf80b4 Retry "Initial step into making Dependency thread safe""
I had forgot one access to _requirements. Now that tests are run, this change is
safer to commit.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101856 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 3c74bc9df5 Fix member lookup to be more stable.
Add regression test.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101351 0039d316-1c4b-4281-b951-d872f2087c98
14 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 485dcab61e Fix the case where a dep not processed could be set as a requirement.
This would result in a hang during gclient sync.

Includes regression test.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101070 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
maruel@chromium.org 087066c553 Make the rietveld client code ignore file status more often.
It's proved to be unreliable.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100236 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org e2335ae8fe Fix support when 2 properties are modified.
Add regression test.

R=dpranke@chromium.org
BUG=
TEST=


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

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