• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2014 The Chromium OS Authors. All rights reserved 2014.
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.server import utils
6
7AUTHOR = "helenzhang, kalin"
8NAME = "platform_TotalMemory"
9PURPOSE = "Reboot and memory total size test"
10CRITERIA = "This test will fail if memory stats vary"
11TIME = "SHORT"
12TEST_CATEGORY = "Functional"
13TEST_CLASS = "platform"
14TEST_TYPE = "server"
15ATTRIBUTES = "suite:bvt-perbuild"
16
17
18DOC = """
19This test reboots the DUT, logins and check the
20memory total size and free memory size.
21
22The test fails if memory total size changed for each reboot,
23or free memory diff is bigger than 1/4 of total memory.
24"""
25
26args_dict = utils.args_to_dict(args)
27
28def run(machine):
29    host = hosts.create_host(machine)
30    reboot_counts = int(args_dict.get("reboot_counts", 3))
31    job.run_test("platform_TotalMemory", host=host,
32                 disable_sysinfo=True, reboot_counts=reboot_counts)
33
34parallel_simple(run, machines)