Home | History | Annotate | Download | only in brillo_StorageWriteSpeedTest
      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 
      5 from autotest_lib.client.common_lib import utils
      6 
      7 AUTHOR = 'garnold'
      8 NAME = 'brillo_StorageWriteSpeedTest'
      9 TIME = 'SHORT'
     10 TEST_CATEGORY = 'Functional'
     11 TEST_TYPE = 'Server'
     12 ATTRIBUTES = 'suite:brillo-bvt,suite:brillo-postsubmit'
     13 
     14 DOC = """
     15 Tests whether a Brillo device's storage can be written to faster than
     16 a minimum speed.
     17 
     18 Arg:
     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 
     24 TEST_ARG_NAMES = ('block_size', 'num_blocks', 'min_speed')
     25 args_dict = utils.args_to_dict(args)
     26 
     27 def 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 
     36 parallel_simple(run, machines)
     37