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 5 # setup the environment so that autotest_lib 6 # can be imported when this file is run as an 7 # executable 8 9 import os, sys 10 11 dirname = os.path.dirname(sys.modules[__name__].__file__) 12 client_dir = os.path.abspath(os.path.join(dirname, "..", "..", "..")) 13 sys.path.insert(0, client_dir) 14 15 import setup_modules 16 17 sys.path.pop(0) 18 setup_modules.setup(base_path=client_dir, 19 root_module_name="autotest_lib.client") 20