1 # Copyright (c) 2012 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. 4 5 AUTHOR = "ChromeOS Team" 6 NAME = "network_EthernetStressPlug" 7 PURPOSE = "Stress-test Ethernet plug/unplug" 8 CRITERIA = """ 9 This test fails if device fails to obtain dhcp through ethernet. 10 """ 11 ATTRIBUTES = "suite:stress_experimental" 12 13 TIME = "SHORT" 14 TEST_CATEGORY = "Stress" 15 TEST_CLASS = "network" 16 TEST_TYPE = "client" 17 18 DOC = """ 19 Stress-tests simulating plugging/unplugging the ethernet dongle. 20 """ 21 22 # We want the default number of loops per test run 23 # to be 100. 24 num_iterations = 100 25 interface=None # autodetect interface 26 27 # Parse comma-separated args. 28 for arg in args: 29 for item in arg.split(','): 30 key, val = item.split('=') 31 if key == 'num_iterations': 32 num_iterations = int(val) 33 if key == 'interface': 34 interface = val 35 36 job.run_test('network_EthernetStressPlug', num_iterations=num_iterations, 37 interface=interface) 38