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

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

Issue 3184017: Add a test for multicard reader support. (Closed) Base URL: http://src.chromium.org/git/autotest.git
Patch Set: Use os.path.dirname instead of a regular expression. 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_MultiReader/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 glob, logging, os
6
7 from autotest_lib.client.bin import test, utils
8 from autotest_lib.client.common_lib import error
9
10 class hardware_MultiReader(test.test):
11 version = 1
12
13 def run_once(self):
14 blockdev_paths = glob.glob("/sys/block/*/removable")
15 for path in blockdev_paths:
16 removable = utils.read_one_line(path)
17 if removable == "1":
18 logging.info("Found removable block device %s",
19 os.path.dirname(path))
20 return True
21
22 raise error.TestFail("No removable block devices are seen.")
OLDNEW
« no previous file with comments | « client/site_tests/hardware_MultiReader/control ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698