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