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

Unified Diff: build/android/buildbot/tests/bb_run_bot_test.py

Issue 18202005: [Android] Refactor buildbot tests so that they can be used downstream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make the error message generic 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/tests/bb_run_bot_test.py
diff --git a/build/android/buildbot/tests/bb_run_bot_test.py b/build/android/buildbot/tests/bb_run_bot_test.py
index 1d44e7e2165d82dd78c3a9fb81d055cc30d15ed4..810c60dac2f39773d6f680f9c1d537f08f942f6d 100755
--- a/build/android/buildbot/tests/bb_run_bot_test.py
+++ b/build/android/buildbot/tests/bb_run_bot_test.py
@@ -11,24 +11,24 @@ BUILDBOT_DIR = os.path.join(os.path.dirname(__file__), '..')
sys.path.append(BUILDBOT_DIR)
import bb_run_bot
-def RunBotsWithTesting(bot_step_map):
+def RunBotProcesses(bot_process_map):
code = 0
- procs = [
- (bot, subprocess.Popen(
- [os.path.join(BUILDBOT_DIR, 'bb_run_bot.py'), '--bot-id', bot,
- '--testing'], stdout=subprocess.PIPE, stderr=subprocess.PIPE))
- for bot in bot_step_map]
- for bot, proc in procs:
+ for bot, proc in bot_process_map:
_, err = proc.communicate()
code |= proc.returncode
if proc.returncode != 0:
- print 'Error running bb_run_bot with id="%s"' % bot, err
+ print 'Error running the bot script with id="%s"' % bot, err
return code
def main():
- return RunBotsWithTesting(bb_run_bot.GetBotStepMap())
+ procs = [
+ (bot, subprocess.Popen(
+ [os.path.join(BUILDBOT_DIR, 'bb_run_bot.py'), '--bot-id', bot,
+ '--testing'], stdout=subprocess.PIPE, stderr=subprocess.PIPE))
+ for bot in bb_run_bot.GetBotStepMap()]
+ return RunBotProcesses(procs)
if __name__ == '__main__':
« 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