Also, increase the wait for socket binding to 0.2 seconds because OSX10.6 is
broken _and_ slow.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8749005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@112277 0039d316-1c4b-4281-b951-d872f2087c98
This makes sure no regression relative to subprocess is introduced in
subprocess2.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8722001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@112217 0039d316-1c4b-4281-b951-d872f2087c98
This will be necessary to override member functions eventually. It also better
replicates what subprocess.Popen is.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8570005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@111530 0039d316-1c4b-4281-b951-d872f2087c98
Change return value from list to tuple for communicate(timeout != None).
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8539015
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@110094 0039d316-1c4b-4281-b951-d872f2087c98
"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
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
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
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
Rename check_call to check_call_out. It's a quite specific need when stderr is
needed or when the user doesn't want the default arguments of check_output.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/6882127
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@83023 0039d316-1c4b-4281-b951-d872f2087c98
Since no output is user visible anyway, causing a hang with no clue about what
to type in.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/6823091
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81302 0039d316-1c4b-4281-b951-d872f2087c98
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
It should be fine now that I've fixed python2.5 compatilibity issues in subprocess2.py.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/6759074
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80216 0039d316-1c4b-4281-b951-d872f2087c98
A lot of functions in gclient_utils and elsewhere will be deleted.
Not used yet, committed as a separate change so it can be rubberstamped. :)
R=dpranke@chromium.org
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6711080
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79449 0039d316-1c4b-4281-b951-d872f2087c98