1# Copyright 2015 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 5from autotest_lib.client.common_lib import utils 6 7AUTHOR = 'garnold' 8NAME = 'brillo_StorageWriteSpeedTest' 9TIME = 'SHORT' 10TEST_CATEGORY = 'Functional' 11TEST_TYPE = 'Server' 12ATTRIBUTES = 'suite:brillo-bvt,suite:brillo-postsubmit' 13 14DOC = """ 15Tests whether a Brillo device's storage can be written to faster than 16a minimum speed. 17 18Arg: 19 block_size: The block size in bytes to use when writing to storage. 20 num_blocks: The number of blocks to write. 21 min_speed: The minimum write speed required in bytes per second. 22""" 23 24TEST_ARG_NAMES = ('block_size', 'num_blocks', 'min_speed') 25args_dict = utils.args_to_dict(args) 26 27def run(machine): 28 test_args = {} 29 for k,v in args_dict.items(): 30 if k in TEST_ARG_NAMES: 31 test_args[k] = int(v) 32 job.run_test('brillo_StorageWriteSpeedTest', 33 host=hosts.create_host(machine), **test_args) 34 35 36parallel_simple(run, machines) 37