OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 AUTHOR = "Chrome OS Team" | 5 AUTHOR = "Chrome OS Team" |
6 NAME = "Security" | 6 NAME = "Security" |
7 TIME = "LONG" | 7 TIME = "LONG" |
8 TEST_CATEGORY = "Functional" | 8 TEST_CATEGORY = "Functional" |
9 TEST_CLASS = "suite" | 9 TEST_CLASS = "suite" |
10 TEST_TYPE = "server" | 10 TEST_TYPE = "server" |
11 | 11 |
12 DOC = """ | 12 DOC = """ |
13 Security Functional test suite. | 13 Security Functional test suite. |
14 """ | 14 """ |
15 | 15 |
16 | 16 |
17 # List of client tests with parameters | 17 # List of client tests with parameters |
18 TESTS = [ | 18 TESTS = [ |
19 ('security_DbusOwners', {}), | 19 ('security_DbusOwners', {}), |
20 ('security_NetworkListeners', {}), | 20 ('security_NetworkListeners', {}), |
| 21 ('security_ProfilePermissions', {}), |
21 ('security_RendererSandbox', {}), | 22 ('security_RendererSandbox', {}), |
22 ('security_ReservedPrivileges', {}), | 23 ('security_ReservedPrivileges', {}), |
23 ('security_RestartJob', {}), | 24 ('security_RestartJob', {}), |
24 ('security_RootfsOwners', {}), | 25 ('security_RootfsOwners', {}), |
25 ('security_SuidBinaries', {}), | 26 ('security_SuidBinaries', {}), |
26 ] | 27 ] |
27 | 28 |
28 # A dict which holds {machine: [(test, argv), (test, argv), ...]} | 29 # A dict which holds {machine: [(test, argv), (test, argv), ...]} |
29 test_dict = {} | 30 test_dict = {} |
30 | 31 |
31 # Assign tests with its argv to machines in a round-robin way. | 32 # Assign tests with its argv to machines in a round-robin way. |
32 index = 0 | 33 index = 0 |
33 for test_with_argv in TESTS: | 34 for test_with_argv in TESTS: |
34 m_index = index % len(machines) | 35 m_index = index % len(machines) |
35 test_list = test_dict.setdefault(machines[m_index], []) | 36 test_list = test_dict.setdefault(machines[m_index], []) |
36 test_list.append(test_with_argv) | 37 test_list.append(test_with_argv) |
37 index += 1 | 38 index += 1 |
38 | 39 |
39 | 40 |
40 def run_assigned_tests(machine): | 41 def run_assigned_tests(machine): |
41 client = hosts.create_host(machine) | 42 client = hosts.create_host(machine) |
42 client_at = autotest.Autotest(client) | 43 client_at = autotest.Autotest(client) |
43 test_list = test_dict[machine] | 44 test_list = test_dict[machine] |
44 for test, argv in test_list: | 45 for test, argv in test_list: |
45 client_at.run_test(test, **argv) | 46 client_at.run_test(test, **argv) |
46 | 47 |
47 # Kick off client tests | 48 # Kick off client tests |
48 job.parallel_on_machines(run_assigned_tests, machines) | 49 job.parallel_on_machines(run_assigned_tests, machines) |
49 | 50 |
OLD | NEW |