Gilad Arnold | 2bf5144 | 2015-10-28 10:07:24 -0700 | [diff] [blame] | 1 | # Copyright 2015 The Chromium OS Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
Gilad Arnold | 2bf5144 | 2015-10-28 10:07:24 -0700 | [diff] [blame] | 4 | |
| 5 | from autotest_lib.client.common_lib import utils |
| 6 | |
Gilad Arnold | 2bf5144 | 2015-10-28 10:07:24 -0700 | [diff] [blame] | 7 | AUTHOR = 'garnold' |
| 8 | NAME = 'brillo_PingTest' |
| 9 | TIME = 'SHORT' |
| 10 | TEST_CATEGORY = 'Functional' |
| 11 | TEST_TYPE = 'Server' |
Justin Giorgi | 0c22fac | 2016-08-19 12:27:53 -0700 | [diff] [blame] | 12 | ATTRIBUTES = 'suite:brillo-bvt,suite:brillo-postsubmit' |
Gilad Arnold | 2bf5144 | 2015-10-28 10:07:24 -0700 | [diff] [blame] | 13 | |
| 14 | DOC = """ |
| 15 | Tests whether a Brillo device can ping the Internet. |
| 16 | """ |
| 17 | |
Ralph Nathan | 8b16d9d | 2016-03-22 17:56:46 -0700 | [diff] [blame] | 18 | TEST_ARG_NAMES = ('ssid', 'passphrase', 'ping_host', 'ping_count', |
| 19 | 'ping_timeout') |
Gilad Arnold | 2bf5144 | 2015-10-28 10:07:24 -0700 | [diff] [blame] | 20 | args_dict = utils.args_to_dict(args) |
| 21 | |
| 22 | def run(machine): |
| 23 | test_args = {name: args_dict[name] for name in TEST_ARG_NAMES |
| 24 | if name in args_dict} |
| 25 | job.run_test('brillo_PingTest', host=hosts.create_host(machine), |
| 26 | **test_args) |
| 27 | |
| 28 | |
| 29 | parallel_simple(run, machines) |