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 = "Nightly" | 6 NAME = "Nightly" |
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 This test suite runs automated tests that should all pass and that, together | 13 This test suite runs automated tests that should all pass and that, together |
14 with the BuildVerify suite, verify that all major features in the build are | 14 with the BuildVerify suite, verify that all major features in the build are |
15 fully functional. These are meant to run nightly in less than 8 hours. | 15 fully functional. These are meant to run nightly in less than 8 hours. |
16 """ | 16 """ |
17 | 17 |
18 # List of client tests with parameters | 18 # List of client tests with parameters |
19 TESTS = [ | 19 TESTS = [ |
20 ('desktopui_BrowserTest', {}), | 20 ('desktopui_BrowserTest', {}), |
| 21 ('desktopui_PyAutoFunctionalTests', {}), |
21 ('desktopui_SyncIntegrationTests', {}), | 22 ('desktopui_SyncIntegrationTests', {}), |
22 ] | 23 ] |
23 | 24 |
24 # A dict which holds {machine: [(test, argv), (test, argv), ...]} | 25 # A dict which holds {machine: [(test, argv), (test, argv), ...]} |
25 test_dict = {} | 26 test_dict = {} |
26 | 27 |
27 # Assign tests with its argv to machines in a round-robin way. | 28 # Assign tests with its argv to machines in a round-robin way. |
28 index = 0 | 29 index = 0 |
29 for test_with_argv in TESTS: | 30 for test_with_argv in TESTS: |
30 m_index = index % len(machines) | 31 m_index = index % len(machines) |
31 test_list = test_dict.setdefault(machines[m_index], []) | 32 test_list = test_dict.setdefault(machines[m_index], []) |
32 test_list.append(test_with_argv) | 33 test_list.append(test_with_argv) |
33 index += 1 | 34 index += 1 |
34 | 35 |
35 def run_assigned_tests(machine): | 36 def run_assigned_tests(machine): |
36 client = hosts.create_host(machine) | 37 client = hosts.create_host(machine) |
37 client_at = autotest.Autotest(client) | 38 client_at = autotest.Autotest(client) |
38 test_list = test_dict[machine] | 39 test_list = test_dict[machine] |
39 for test, argv in test_list: | 40 for test, argv in test_list: |
40 client_at.run_test(test, **argv) | 41 client_at.run_test(test, **argv) |
41 | 42 |
42 job.parallel_on_machines(run_assigned_tests, machines) | 43 job.parallel_on_machines(run_assigned_tests, machines) |
OLD | NEW |