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 5from autotest_lib.client.common_lib import utils 6 7AUTHOR = "puthik" 8NAME = "MemoryQual.quick" 9ATTRIBUTES = "suite:memory_qual_quick" 10TIME = "MEDIUM" 11TEST_CATEGORY = "Stress" 12TEST_CLASS = "suite" 13TEST_TYPE = "server" 14 15DOC = """ 16Sequence for testing the Memory Qual running from the fixed devices. 17""" 18 19CLIENT_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 36CLIENT_X86_TESTS= [ 37 ('hardware_UnsafeMemory', { 38 'tag' : 'quick', 'sec' : 30}), 39] 40 41SERVER_TESTS= [ 42 ('hardware_MemoryIntegrity', { 43 'tag' : 'quick', 'seconds' : 30, 'suspend': False}), 44] 45 46def 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 55def 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 61keyval = dict() 62try: 63 keyval['bug_id'] = bug_id 64 keyval['part_id'] = part_id 65except NameError: 66 # bug_id and/or part_id variables not defined 67 pass 68utils.write_keyval(job.resultdir, keyval) 69 70job.parallel_on_machines(run_client_test, machines) 71parallel_simple(run_server_test, machines) 72