1 # Copyright (c) 2014 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 import os 6 7 from autotest_lib.client.bin import test 8 from autotest_lib.client.cros.networking import shill_context 9 from autotest_lib.client.cros.networking import shill_proxy 10 11 class network_RestartShill(test.test): 12 """ 13 Stop shill, restart it, check that we can talk to it. 14 """ 15 DEFAULT_PROFILE_PATH = '/var/cache/shill/default.profile' 16 version = 1 17 18 19 def run_once(self, remove_profile): 20 """Test main loop.""" 21 with shill_context.stopped_shill(): 22 if remove_profile: 23 os.remove(self.DEFAULT_PROFILE_PATH) 24 shill = shill_proxy.ShillProxy.get_proxy() 25