Fix PRESUBMIT.py for build/android/buildbot

The code was making a call to android_commands.py, which
relied on a copy of adb existing in the path.  The CQ
bot does not have third_party/android_tools, and in general
it seems advantageous to not require a full checkout for
syntax checks.

NOTRY=True

Review URL: https://chromiumcodereview.appspot.com/11883019

git-svn-id: http://src.chromium.org/svn/trunk/src/build@176723 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
ilevy@chromium.org 2013-01-14 21:38:34 +00:00
Родитель dd38e6f4b1
Коммит 2c869a1876
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -98,9 +98,13 @@ def RebootDeviceSafe(device):
def RebootDevices():
"""Reboot all attached and online devices."""
buildbot_report.PrintNamedStep('Reboot devices')
# Early return here to avoid presubmit dependence on adb,
# which might not exist in this checkout.
if TESTING:
return
devices = android_commands.GetAttachedDevices()
print 'Rebooting: %s' % devices
if devices and not TESTING:
if devices:
pool = multiprocessing.Pool(len(devices))
results = pool.map_async(RebootDeviceSafe, devices).get(99999)