1#!/usr/bin/python -u 2import os 3import sys 4 5import 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 13sys.path.append(_SKYLAB_INVENTORY_DIR) 14# TODO: Where is this checked out on infra servers? 15 16try: 17 import skylab_inventory # pylint: disable=unused-import 18except 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 23from autotest_lib.cli import atest 24 25sys.exit(atest.main()) 26