diff options
author | sivachandra@chromium.org <sivachandra@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-12 21:05:48 +0000 |
---|---|---|
committer | sivachandra@chromium.org <sivachandra@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-12 21:05:48 +0000 |
commit | 9e6a016c5a59b25199426f6825b2c83571997e68 (patch) | |
tree | 26e56223b34891b451071d7cb3f380bf7e229f67 /build | |
parent | c662d4e736a8f41c223382d79d404ec50223aaeb (diff) | |
download | chromium_src-9e6a016c5a59b25199426f6825b2c83571997e68.zip chromium_src-9e6a016c5a59b25199426f6825b2c83571997e68.tar.gz chromium_src-9e6a016c5a59b25199426f6825b2c83571997e68.tar.bz2 |
[Android] Refactor buildbot tests so that they can be used downstream.
I refactored in the wrong way in r211209 (https://chromiumcodereview.appspot.com/18325030/). This CL fixes that. Note that r211209 is not broken; it is just not usable downstream.
BUG=249997
NOTRY=True
Review URL: https://chromiumcodereview.appspot.com/18202005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211454 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-x | build/android/buildbot/tests/bb_run_bot_test.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/build/android/buildbot/tests/bb_run_bot_test.py b/build/android/buildbot/tests/bb_run_bot_test.py index 1d44e7e..810c60d 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__': |