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

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

Issue 16688002: Port remaining android buildbot code into python (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | « build/android/buildbot/bb_run_bot.py ('k') | build/android/buildbot/buildbot_functions.sh » ('j') | 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 bc9117a844153118947cdcc932f9d0d2ba605ef3..3f70caaac52634bf893f52d422f13b191f2ec26a 100644
--- a/build/android/buildbot/bb_utils.py
+++ b/build/android/buildbot/bb_utils.py
@@ -11,7 +11,6 @@ import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from pylib import buildbot_report
-from pylib import constants
TESTING = 'BUILDBOT_TESTING' in os.environ
@@ -20,6 +19,10 @@ BB_BUILD_DIR = os.path.abspath(
os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir,
os.pardir, os.pardir, os.pardir, os.pardir))
+CHROME_SRC = os.path.abspath(
+ os.path.join(os.path.dirname(__file__), '..', '..', '..'))
+
+GOMA_DIR = os.environ.get('GOMA_DIR', os.path.join(BB_BUILD_DIR, 'goma'))
def CommandToString(command):
"""Returns quoted command that can be run in bash shell."""
@@ -36,8 +39,7 @@ def SpawnCmd(command):
def wait():
return 0
return MockPopen()
-
- return subprocess.Popen(command, cwd=constants.DIR_SOURCE_ROOT)
+ return subprocess.Popen(command, cwd=CHROME_SRC)
def RunCmd(command, flunk_on_failure=True, halt_on_failure=False,
@@ -53,7 +55,8 @@ def RunCmd(command, flunk_on_failure=True, halt_on_failure=False,
buildbot_report.PrintWarning()
# Allow steps to have both halting (i.e. 1) and non-halting exit codes.
if code != warning_code and halt_on_failure:
- raise OSError()
+ print 'FATAL %d != %d' % (code, warning_code)
+ sys.exit(1)
return code
@@ -67,9 +70,9 @@ def GetParser():
parser.add_option('--factory-properties', action='callback',
callback=ConvertJson, type='string', default={},
help='factory properties in JSON format')
- parser.add_option('--slave-properties', action='callback',
- callback=ConvertJson, type='string', default={},
- help='Properties set by slave script in JSON format')
-
return parser
+
+def EncodeProperties(options):
+ return ['--factory-properties=%s' % json.dumps(options.factory_properties),
+ '--build-properties=%s' % json.dumps(options.build_properties)]
« no previous file with comments | « build/android/buildbot/bb_run_bot.py ('k') | build/android/buildbot/buildbot_functions.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698