Home | History | Annotate | Download | only in sequences
      1 # Copyright (c) 2014 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 = "puthik"
      8 NAME = "MemoryQual.quick"
      9 ATTRIBUTES = "suite:memory_qual_quick"
     10 TIME = "MEDIUM"
     11 TEST_CATEGORY = "Stress"
     12 TEST_CLASS = "suite"
     13 TEST_TYPE = "server"
     14 
     15 DOC = """
     16 Sequence for testing the Memory Qual running from the fixed devices.
     17 """
     18 
     19 CLIENT_TESTS= [
     20     ('platform_MemCheck', {}),
     21     ('hardware_RamFio', {
     22         'requirements': [('ram_suite', [])]}),
     23     ('hardware_MemoryThroughput', {
     24         'tag': 'quick', 'test': 'bcopy', 'warmup': 10, 'num_iterations': 5,
     25         'parallel': 1, 'sizes' : [ 16 * 1024 * 1024]}),
     26     ('hardware_MemoryLatency', {
     27         'sample_size_kb': [ int(2), int(192), int(1024)]}),
     28     ('hardware_Memtester', {
     29         'tag' : 'quick', 'size' : 10 * 1024, 'loop' : 1}),
     30     ('hardware_SAT', {
     31         'tag' : 'quick', 'seconds' : 10}),
     32     ('power_MemorySuspend', {
     33         'tag' : 'quick', 'num_suspends' : 2}),
     34 ]
     35 
     36 CLIENT_X86_TESTS= [
     37     ('hardware_UnsafeMemory', {
     38         'tag' : 'quick', 'sec' : 30}),
     39 ]
     40 
     41 SERVER_TESTS= [
     42     ('hardware_MemoryIntegrity', {
     43         'tag' : 'quick', 'seconds' : 30, 'suspend': False}),
     44 ]
     45 
     46 def run_client_test(machine):
     47     client = hosts.create_host(machine)
     48     client_at = autotest.Autotest(client)
     49     client_tests = (CLIENT_TESTS + CLIENT_X86_TESTS if client.get_arch() in
     50         ('i386', 'i686', 'x86_64') else CLIENT_TESTS)
     51     for test, argv in client_tests:
     52         client.reboot()
     53         client_at.run_test(test, **argv)
     54 
     55 def run_server_test(machine):
     56     client = hosts.create_host(machine)
     57     for test, argv in SERVER_TESTS:
     58         client.reboot()
     59         job.run_test(test, client_ip=machine, **argv)
     60 
     61 keyval = dict()
     62 try:
     63     keyval['bug_id'] = bug_id
     64     keyval['part_id'] = part_id
     65 except NameError:
     66     # bug_id and/or part_id variables not defined
     67     pass
     68 utils.write_keyval(job.resultdir, keyval)
     69 
     70 job.parallel_on_machines(run_client_test, machines)
     71 parallel_simple(run_server_test, machines)
     72