| # 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 = "Security" |
| TIME = "LONG" |
| TEST_CATEGORY = "Functional" |
| TEST_CLASS = "suite" |
| TEST_TYPE = "server" |
| |
| DOC = """ |
| Security Functional test suite. |
| """ |
| |
| |
| # List of client tests with parameters |
| TESTS = [ |
| ('security_DbusOwners', {}), |
| ('security_NetworkListeners', {}), |
| ('security_ProfilePermissions', {'creds': '$default', 'tag': 'login'}), |
| #TODO(jimhebert) Uncomment this after chromium-os:13173 is fixed. |
| #('security_ProfilePermissions', {'creds': None, 'tag': 'BWSI'}), |
| ('security_RendererSandbox', {}), |
| ('security_ReservedPrivileges', {'owner_type': 'user', 'tag': 'user'}), |
| ('security_ReservedPrivileges', {'owner_type': 'group', 'tag': 'group'}), |
| ('security_RestartJob', {}), |
| ('security_RootfsOwners', {}), |
| ('security_RootfsStatefulSymlinks', {}), |
| ('security_SuidBinaries', {'baseline': 'suid', 'tag': 'suid'}), |
| ('security_SuidBinaries', {'baseline': 'sgid', 'tag': 'sgid'}), |
| ] |
| |
| # A dict which holds {machine: [(test, argv), (test, argv), ...]} |
| test_dict = {} |
| |
| # Assign tests with its argv to machines in a round-robin way. |
| index = 0 |
| for test_with_argv in TESTS: |
| m_index = index % len(machines) |
| test_list = test_dict.setdefault(machines[m_index], []) |
| test_list.append(test_with_argv) |
| index += 1 |
| |
| |
| def run_assigned_tests(machine): |
| client = hosts.create_host(machine) |
| client_at = autotest.Autotest(client) |
| test_list = test_dict[machine] |
| for test, argv in test_list: |
| client_at.run_test(test, **argv) |
| |
| # Kick off client tests |
| job.parallel_on_machines(run_assigned_tests, machines) |
| |