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

Side by Side Diff: client/site_tests/hardware_Ath3k/hardware_Ath3k.py

Issue 3157019: Introduce a test for ath3k hardware. (Closed) Base URL: http://src.chromium.org/git/autotest.git
Patch Set: Modiefied to address a review comment. Created 10 years, 4 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 | « client/site_tests/hardware_Ath3k/control ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import logging
6
7 from autotest_lib.client.bin import test, utils
8 from autotest_lib.client.common_lib import error
9
10
11 def usb_device_present(vendor_device):
12 '''Check if lsusb recognizes a certain vendor/device ID combination.
13
14 This should eventually be added to autotest_lib.client.bin.utils.
15 '''
16
17 command = '/usr/sbin/lsusb -d %s' % vendor_device.lower()
18 return utils.run(command).exit_status == 0
19
20
21 class hardware_Ath3k(test.test):
22 version = 1
23
24 def run_once(self):
25 device = '0cf3:3002'
26 module = 'ath3k'
27 if not usb_device_present(device):
28 raise error.TestFail('usb device %s not found' % device)
29
30 if not utils.module_is_loaded(module):
31 raise error.TestFail('driver module %s not loaded' % module)
OLDNEW
« no previous file with comments | « client/site_tests/hardware_Ath3k/control ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698