1fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liang# Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liang# Use of this source code is governed by a BSD-style license that can be 3fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liang# found in the LICENSE file. 4fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liang 5fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liang"""This module provides access to the autotest_lib.client namespace. It must be 6fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liang included before any of the modules from that namespace.""" 7fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liang 8fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liangimport os, sys 9fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liang 10fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liangdirname = os.path.dirname(sys.modules[__name__].__file__) 11fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liangclient_dir = os.path.abspath(os.path.join(dirname, os.pardir, os.pardir)) 12fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liangsys.path.insert(0, client_dir) 13fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liang 14fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liangimport setup_modules 15fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liang 16fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liangsys.path.pop(0) 17fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liangsetup_modules.setup(base_path=client_dir, 18fdb51c5dc90492b1e8aaaa432e05abfc6fb3c897Ricky Liang root_module_name="autotest_lib.client") 19