Index: build/android/buildbot/bb_utils.py |
diff --git a/build/android/buildbot/bb_utils.py b/build/android/buildbot/bb_utils.py |
index 7813a163b0a343a2b0a2a0805147763b5034c52a..f0a78c661ca446049e9493c7aa887ae6a815b85a 100644 |
--- a/build/android/buildbot/bb_utils.py |
+++ b/build/android/buildbot/bb_utils.py |
@@ -9,8 +9,10 @@ import pipes |
import subprocess |
import sys |
+import buildbot_report |
frankf
2013/07/09 00:37:56
I think the convention is bb_*. It might makes sen
|
+ |
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 |
@@ -42,20 +44,19 @@ def SpawnCmd(command, stdout=None): |
return subprocess.Popen(command, cwd=CHROME_SRC, stdout=stdout) |
-def RunCmd(command, flunk_on_failure=True, halt_on_failure=False, |
- warning_code=88, stdout=None): |
+def RunCmd(command, flunk_on_failure=True, halt_on_failure=False, stdout=None): |
"""Run a command relative to the chrome source root.""" |
code = SpawnCmd(command, stdout).wait() |
print '<', CommandToString(command) |
if code != 0: |
print 'ERROR: process exited with code %d' % code |
- if code != warning_code and flunk_on_failure: |
+ if code != constants.WARNING_EXIT_CODE and flunk_on_failure: |
frankf
2013/07/09 00:37:56
You're assuming every arbitrary command uses our w
gkanwar
2013/07/09 00:47:42
Ah my mistake. Switched back to a default paramete
|
buildbot_report.PrintError() |
else: |
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: |
- print 'FATAL %d != %d' % (code, warning_code) |
+ if code != constants.WARNING_EXIT_CODE and halt_on_failure: |
+ print 'FATAL %d != %d' % (code, constants.WARNING_EXIT_CODE) |
sys.exit(1) |
return code |