| # 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 = "Browser" |
| TIME = "LONG" |
| TEST_CATEGORY = "Functional" |
| TEST_CLASS = "suite" |
| TEST_TYPE = "server" |
| |
| DOC = """ |
| This test suite runs automated browser tests that should all pass. |
| """ |
| |
| # List of client tests with parameters |
| TESTS = [ |
| ('desktopui_BrowserTest', {}), |
| ('desktopui_PyAutoFunctionalTests', {}), |
| ('desktopui_SyncIntegrationTests', {}), |
| ] |
| |
| # 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) |
| |
| job.parallel_on_machines(run_assigned_tests, machines) |