blob: 0b111c1f6f747b2ea55e277a35fbbdc800aab51a [file] [log] [blame]
# Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from autotest_lib.client.bin import test
from autotest_lib.client.common_lib import utils
from autotest_lib.client.cros.networking import shill_proxy
class network_RestartShill(test.test):
"""
Stop shill, restart it, check that we can talk to it.
"""
DEFAULT_PROFILE_PATH = '/var/cache/shill/default.profile'
version = 1
def run_once(self, remove_profile):
"""Test main loop."""
utils.run('stop shill')
if remove_profile:
os.remove(self.DEFAULT_PROFILE_PATH)
utils.run('start shill')
shill = shill_proxy.ShillProxy.get_proxy()