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 5AUTHOR = "ChromeOS Team" 6NAME = "network_EthernetStressPlug" 7PURPOSE = "Stress-test Ethernet plug/unplug" 8CRITERIA = """ 9This test fails if device fails to obtain dhcp through ethernet. 10""" 11ATTRIBUTES = "suite:stress_experimental" 12 13TIME = "SHORT" 14TEST_CATEGORY = "Stress" 15TEST_CLASS = "network" 16TEST_TYPE = "client" 17 18DOC = """ 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. 24num_iterations = 100 25interface=None # autodetect interface 26 27# Parse comma-separated args. 28for 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 36job.run_test('network_EthernetStressPlug', num_iterations=num_iterations, 37 interface=interface) 38