Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: build/android/buildbot/bb_utils.py

Issue 21647002: [Android Buildbot] Make RunCmd execute command in a dir of choice. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/buildbot/bb_utils.py
diff --git a/build/android/buildbot/bb_utils.py b/build/android/buildbot/bb_utils.py
index 2e28aaa279f89c184de928acf913f6dece1f8042..f16540bc697eaa9b2fd3613220f3cbcb602d4ab9 100644
--- a/build/android/buildbot/bb_utils.py
+++ b/build/android/buildbot/bb_utils.py
@@ -31,7 +31,7 @@ def CommandToString(command):
return ' '.join(map(pipes.quote, command))
-def SpawnCmd(command, stdout=None):
+def SpawnCmd(command, stdout=None, cwd=CHROME_SRC):
"""Spawn a process without waiting for termination."""
print '>', CommandToString(command)
sys.stdout.flush()
@@ -41,13 +41,14 @@ def SpawnCmd(command, stdout=None):
def wait():
return 0
return MockPopen()
- return subprocess.Popen(command, cwd=CHROME_SRC, stdout=stdout)
+ return subprocess.Popen(command, cwd=cwd, stdout=stdout)
def RunCmd(command, flunk_on_failure=True, halt_on_failure=False,
- warning_code=constants.WARNING_EXIT_CODE, stdout=None):
+ warning_code=constants.WARNING_EXIT_CODE, stdout=None,
+ cwd=CHROME_SRC):
"""Run a command relative to the chrome source root."""
- code = SpawnCmd(command, stdout).wait()
+ code = SpawnCmd(command, stdout, cwd).wait()
print '<', CommandToString(command)
if code != 0:
print 'ERROR: process exited with code %d' % code
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698