1# Copyright (c) 2012 Collabora Ltd. 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
5NAME = "hardware_UsbBasicFileOperations"
6AUTHOR = "Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>"
7PURPOSE = "Test USB drive file-based operations"
8CRITERIA = "Fail if open/copy/move/remove and modify content operations fail"
9TIME = "SHORT"
10TEST_CATEGORY = "Functional"
11TEST_CLASS = "hardware"
12TEST_TYPE = "client"
13
14DOC = """
15Try to open a file, move/copy and remove it from the filesystem.
16Check that it"s possible to change the file as well.
17
18This test requires a USB drive inserted before the test begins.
19It also needs a single partition on the drive, the file system type is not
20relevant as long as it"s mountable by the system.
21
22@param device,bus,model,size,fs_uuid: @see client.cros.storage.StorageScanner
23                                      doc for paramter meaning.
24                                      A single filter key can be passed as
25                                      parameter.
26                                      Use those parameters only if the test
27                                      cannot detect your device by default.
28"""
29from autotest_lib.client.cros import storage as storage_mod
30
31volume_filter, args_dict = storage_mod.args_to_storage_dict(args)
32if not volume_filter:
33    volume_filter = {"bus": "usb"}
34
35job.run_test("hardware_UsbBasicFileOperations", volume_filter=volume_filter)
36