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""" 11# Note: This is now only for manual run. 12TIME = "SHORT" 13TEST_CATEGORY = "Stress" 14TEST_CLASS = "network" 15TEST_TYPE = "client" 16 17DOC = """ 18 Stress-tests simulating plugging/unplugging the ethernet dongle. 19""" 20 21# We want the default number of loops per test run 22# to be 100. 23num_iterations = 100 24interface=None # autodetect interface 25 26# Parse comma-separated args. 27for arg in args: 28 for item in arg.split(','): 29 key, val = item.split('=') 30 if key == 'num_iterations': 31 num_iterations = int(val) 32 if key == 'interface': 33 interface = val 34 35job.run_test('network_EthernetStressPlug', num_iterations=num_iterations, 36 interface=interface) 37