Commit Graph

19 Commits (51c0ef015f0bccd367d9efceb5f97574f2749e97)

Author SHA1 Message Date
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 57bf78d82a Update docstrings w.r.t. subprocess2.
No code change.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100212 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 0bcd1d3430 Make subprocess2.check_call() compliant with subprocess.check_call().
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
14 years ago
maruel@chromium.org 39f645ff57 Unicode input is also accepted for stdin.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@82410 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 1f063db16a Make subprocess2.call() returned values to be the same as subprocess.call().
Renamed the previous subprocess2.call() to subprocess2.communicate().

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81976 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 0d5ef24c5d Use a marker instead of a string so it can be distingished when used as stdin.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81941 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 4a982271a7 Defaults stdin to VOID for capture and check_output()
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
14 years ago
maruel@chromium.org 1d9f62946b Set returncode to subprocess2.TIMED_OUT instead of -9 when a process times out.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80775 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 f08b09c2af Fix automatic shell detection, the check was reversed
Improved tests and added regression test.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80614 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org eba4022de8 Add subprocess2 unit tests
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80454 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 58ef297bc5 Revert r80216 "Reapply r79779: "Removed gclient_utils.Popen() and use subprocess2's ...""
Horked windows slaves this time.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80220 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 93ef410768 Reapply r79779: "Removed gclient_utils.Popen() and use subprocess2's version instead."
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
14 years ago
maruel@chromium.org 421982fe08 Update docstrings and add VOID support
And update local_rietveld to use it.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80179 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 5a376ed328 Revert r79779: "Removed gclient_utils.Popen() and use subprocess2's version instead."
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79781 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 242549409f Removed gclient_utils.Popen() and use subprocess2's version instead.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79779 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 4860f0527a Copy subprocess2 from commit-queue so it can be reused here.
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
14 years ago