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 = "Network3G" | 6 NAME = "Network3G" |
7 TIME = "SHORT" | 7 TIME = "SHORT" |
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 3G tests that should all pass. | 13 This test suite runs automated 3G tests that should all pass. |
14 """ | 14 """ |
15 | 15 |
16 from autotest_lib.server import site_host_attributes | 16 from autotest_lib.server import site_host_attributes |
17 from autotest_lib.client.common_lib import error | 17 from autotest_lib.client.common_lib import error |
18 | 18 |
19 | 19 |
20 # List of tests to be run. | 20 # List of tests to be run. |
21 TESTS = [ | 21 CLIENT_TESTS = [ |
22 'network_3GModemPresent', | 22 'network_3GModemPresent', |
23 'network_3GSmokeTest' | 23 'network_3GSmokeTest' |
24 ] | 24 ] |
25 | 25 |
| 26 SERVER_TESTS = [ |
| 27 'network_3GLoadFirmware', |
| 28 ] |
26 | 29 |
27 def run_client_test(machine): | 30 def run_client_test(machine): |
28 client = hosts.create_host(machine) | 31 client = hosts.create_host(machine) |
29 client_attributes = site_host_attributes.HostAttributes(machine) | 32 client_attributes = site_host_attributes.HostAttributes(machine) |
30 client_at = autotest.Autotest(client) | 33 client_at = autotest.Autotest(client) |
31 | 34 |
32 if not client_attributes.has_3g: | 35 if not client_attributes.has_3g: |
33 raise error.TestNAError( | 36 raise error.TestNAError( |
34 "Machine does not have a 3G module or is not labeled as having one.") | 37 "Machine does not have a 3G module or is not labeled as having one.") |
35 | 38 |
36 for test in TESTS: | 39 for test in CLIENT_TESTS: |
37 client_at.run_test(test) | 40 client_at.run_test(test) |
38 | 41 |
| 42 def run_server_test(machine): |
| 43 host = hosts.create_host(machine) |
| 44 for test in SERVER_TESTS: |
| 45 job.run_test(test, host=host) |
39 | 46 |
40 job.parallel_on_machines(run_client_test, machines) | 47 job.parallel_on_machines(run_client_test, machines) |
| 48 parallel_simple(run_server_test, machines) |
OLD | NEW |