Index: build/android/buildbot/bb_device_status_check.py |
diff --git a/build/android/device_status_check.py b/build/android/buildbot/bb_device_status_check.py |
similarity index 96% |
copy from build/android/device_status_check.py |
copy to build/android/buildbot/bb_device_status_check.py |
index cd8415378bb5ce6388978dec86cd62aafd74f71d..e01c024e38e693ec25df1e8acc0e837f56f46c65 100755 |
--- a/build/android/device_status_check.py |
+++ b/build/android/buildbot/bb_device_status_check.py |
@@ -12,8 +12,10 @@ import smtplib |
import sys |
import re |
+import bb_annotations |
frankf
2013/07/15 17:43:02
convention is to order the imports from most to le
gkanwar1
2013/07/15 17:54:09
This is following the pattern of imports that occu
|
+ |
+sys.path.append(os.path.join(os.path.dirname(__file__), '..')) |
frankf
2013/07/15 17:43:02
Why do you need this?
gkanwar1
2013/07/15 17:54:09
Since the file is being moved into buildbot, we ne
|
from pylib import android_commands |
-from pylib import buildbot_report |
from pylib import constants |
from pylib.cmd_helper import GetCmdOutput |
@@ -143,7 +145,7 @@ def CheckForMissingDevices(options, adb_online_devs): |
return ['No online devices. Have any devices been plugged in?'] |
if missing_devs: |
devices_missing_msg = '%d devices not detected.' % len(missing_devs) |
- buildbot_report.PrintSummaryText(devices_missing_msg) |
+ bb_annotations.PrintSummaryText(devices_missing_msg) |
# TODO(navabi): Debug by printing both output from GetCmdOutput and |
# GetAttachedDevices to compare results. |
@@ -157,8 +159,8 @@ def CheckForMissingDevices(options, adb_online_devs): |
else: |
new_devs = set(adb_online_devs) - set(last_devices) |
if new_devs and os.path.exists(last_devices_path): |
- buildbot_report.PrintWarning() |
- buildbot_report.PrintSummaryText( |
+ bb_annotations.PrintWarning() |
+ bb_annotations.PrintSummaryText( |
'%d new devices detected' % len(new_devs)) |
print ('New devices detected %s. And now back to your ' |
'regularly scheduled program.' % list(new_devs)) |
@@ -204,7 +206,7 @@ def main(): |
unique_types = list(set(types)) |
unique_builds = list(set(builds)) |
- buildbot_report.PrintMsg('Online devices: %d. Device types %s, builds %s' |
+ bb_annotations.PrintMsg('Online devices: %d. Device types %s, builds %s' |
% (len(devices), unique_types, unique_builds)) |
print '\n'.join(reports) |
@@ -214,7 +216,7 @@ def main(): |
err_msg += [' %s' % error for error in dev_errors] |
if err_msg: |
- buildbot_report.PrintWarning() |
+ bb_annotations.PrintWarning() |
msg = '\n'.join(err_msg) |
print msg |
SendDeviceStatusAlert(msg) |