blob: fa1e23ba9417b1626fe45034358401c1edd80682 [file] [log] [blame]
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
AUTHOR = "Chrome OS Team"
NAME = "BVT"
TIME = "SHORT"
TEST_CATEGORY = "Functional"
TEST_CLASS = "suite"
TEST_TYPE = "server"
DOC = """
This test suite runs automated tests that should all pass and that verify
that a build has some minimal functionality. These are meant to run quickly
in less than 30 minutes and should maximize coverage.
"""
from autotest_lib.client.cros import cros_logging
from autotest_lib.server import site_host_attributes
TESTS = [
('platform_AccurateTime', {}),
('platform_FilePerms', {}),
('platform_HighResTimers', {}),
('platform_KernelVersion', {}),
('platform_OSLimits', {}),
('platform_PartitionCheck', {}),
('build_RootFilesystemSize', {}),
('desktopui_ChromeFirstRender', {}),
('desktopui_FlashSanityCheck', {}),
('desktopui_KillRestart', {'binary': '^chrome$',
'tag': 'chrome'}),
('desktopui_KillRestart', {'binary': '^session_manager$',
'tag': 'session'}),
('desktopui_WindowManagerFocusNewWindows', {}),
# TODO(ericli): reenable it after screen locker is enabled.
# http://code.google.com/p/chromium-os/issues/detail?id=7758
# ('desktopui_ScreenLocker', {}),
('graphics_WindowManagerGraphicsCapture', {}),
('logging_CrashSender', {}),
('logging_UserCrash', {}),
('login_BadAuthentication', {}),
('login_CryptohomeIncognitoMounted', {}),
('login_CryptohomeMounted', {}),
('login_CryptohomeUnmounted', {}),
('login_CryptohomeIncognitoUnmounted', {}),
('login_LoginSuccess', {'tag': 'default'}),
('login_LoginSuccess', {'creds': '$apps', 'tag': 'apps'}),
('login_OwnershipNotRetaken', {}),
('login_OwnershipTaken', {}),
('login_RemoteLogin', {}),
('network_DisableInterface', {'iface_name': 'wlan0',
'tag': 'wlan0'}),
('network_Ping', {}),
]
def run_tests(machine):
client = hosts.create_host(machine)
client_attributes = site_host_attributes.HostAttributes(machine)
client_at = autotest.Autotest(client)
for test, argv in TESTS:
client_at.run_test(test, **argv)
if not client_attributes.has_resume_bug:
client_at.run_test('power_Resume')
# Disable log rotation while shutting down just in case
# platform_Shutdown needs to find logs.
log_pauser = cros_logging.LogRotationPauser(client)
log_pauser.begin()
client.reboot()
client_at.run_test('platform_Shutdown')
log_pauser.end()
# TODO(pauldean): Remove redundant code once distribute_across_machines
# has baked in the lab. Remove run_tests function and
# job.parallel_on_machines call.
if len(machines) > 1:
TESTS += [
('power_Resume', {}, [], ['has_resume_bug']),
('platform_Shutdown', {}),
]
job.distribute_across_machines(TESTS, machines)
else:
job.parallel_on_machines(run_tests, machines)