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

Side by Side Diff: slave/skia_slave_scripts/android_verify_device.py

Issue 344183004: Use new common utils where possible. (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: rebase Created 6 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 unified diff | Download patch
« no previous file with comments | « DEPS ('k') | slave/skia_slave_scripts/apply_patch.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """ Verify that the Android device is attached and functioning properly """ 6 """ Verify that the Android device is attached and functioning properly """
7 7
8 8
9 import os 9 import os
10 import sys 10 import sys
11 11
12 BUILDBOT_PATH = os.path.realpath(os.path.join( 12 BUILDBOT_PATH = os.path.realpath(os.path.join(
13 os.path.dirname(os.path.abspath(__file__)), 13 os.path.dirname(os.path.abspath(__file__)),
14 os.pardir, os.pardir)) 14 os.pardir, os.pardir))
15 sys.path.append(BUILDBOT_PATH) 15 sys.path.append(BUILDBOT_PATH)
16 CHROMIUM_BUILDBOT = os.path.join(BUILDBOT_PATH, 'third_party', 16 CHROMIUM_BUILDBOT = os.path.join(BUILDBOT_PATH, 'third_party',
17 'chromium_buildbot') 17 'chromium_buildbot')
18 sys.path.append(os.path.join(CHROMIUM_BUILDBOT, 'scripts')) 18 sys.path.append(os.path.join(CHROMIUM_BUILDBOT, 'scripts'))
19 sys.path.append(os.path.join(BUILDBOT_PATH, 'common'))
19 20
20 from utils import android_utils, misc 21 from py.utils import android_utils, misc
21 22
22 23
23 class AndroidVerifyDevice: 24 class AndroidVerifyDevice:
24 25
25 # pylint: disable=R0201 26 # pylint: disable=R0201
26 def _Run(self): 27 def _Run(self):
27 args = misc.ArgsToDict(sys.argv) 28 args = misc.ArgsToDict(sys.argv)
28 serial = args['serial'] 29 serial = args['serial']
29 android_utils.ADBShell(serial, ['cat', '/system/build.prop'], echo=False) 30 android_utils.ADBShell(serial, ['cat', '/system/build.prop'], echo=False)
30 print 'Device %s is attached and seems to be working properly.' % serial 31 print 'Device %s is attached and seems to be working properly.' % serial
31 32
32 33
33 if '__main__' == __name__: 34 if '__main__' == __name__:
34 # pylint: disable=W0212 35 # pylint: disable=W0212
35 sys.exit(AndroidVerifyDevice()._Run()) 36 sys.exit(AndroidVerifyDevice()._Run())
OLDNEW
« no previous file with comments | « DEPS ('k') | slave/skia_slave_scripts/apply_patch.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698