1 #!/usr/bin/python -u 2 import os 3 import sys 4 5 import common 6 7 _AUTOTEST_ROOT = os.path.realpath(os.path.join(__file__, '..', '..')) 8 _CHROMIUMOS_ROOT = os.path.abspath( 9 os.path.join(_AUTOTEST_ROOT, '..', '..', '..', '..')) 10 _SKYLAB_INVENTORY_DIR = os.path.join(_CHROMIUMOS_ROOT, 'infra', 11 'skylab_inventory', 'venv') 12 # In any sane chromiumos checkout 13 sys.path.append(_SKYLAB_INVENTORY_DIR) 14 # TODO: Where is this checked out on infra servers? 15 16 try: 17 import skylab_inventory # pylint: disable=unused-import 18 except ImportError as e: 19 raise Exception('Error when importing skylab_inventory (venv dir: %s): %s' 20 % (_SKYLAB_INVENTORY_DIR, e)) 21 22 # Import atest after 'import skylab_inventory' as it uses skylab_inventory 23 from autotest_lib.cli import atest 24 25 sys.exit(atest.main()) 26