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