示例#1
0
import os, sys
try:
    import autotest.client.setup_modules as setup_modules
    dirname = os.path.dirname(setup_modules.__file__)
    autotest_dir = os.path.join(dirname, "..")
except ImportError:
    dirname = os.path.dirname(sys.modules[__name__].__file__)
    autotest_dir = os.path.abspath(os.path.join(dirname, "..", '..'))
    client_dir = os.path.join(autotest_dir, "client")
    sys.path.insert(0, client_dir)
    import setup_modules
    sys.path.pop(0)

setup_modules.setup(base_path=autotest_dir, root_module_name="autotest")
示例#2
0
from autotest.client.shared import error

# lpt env set
from autotest.client.shared.settings import settings
try:
    autodir = os.path.abspath(os.environ['AUTODIR'])
except KeyError:
    autodir = settings.get_value('COMMON', 'autotest_top_path')

autodir = os.path.abspath(os.environ['AUTODIR'])

#lptdir = os.path.join(os.path.dirname(autodir), "lpt")
lptdir = os.path.join(autodir, "lpts")
os.environ['LPTROOT'] = lptdir
from autotest.client import setup_modules
setup_modules.setup(base_path=lptdir, root_module_name="lpt")

import lpt.api.test as lpt_test
from lpt.lib import lptlog
from lpt.lib.share import utils as lutils
from lpt.api import method


class pingpong(test.test, lpt_test.BaseTest):
    version = 1

    def __init__(self, job, bindir, outputdir):
        tool = str(self.__class__.__name__)
        lpt_test.BaseTest.__init__(self, tool)
        test.test.__init__(self, job, bindir, outputdir)
示例#3
0
文件: stream.py 项目: Scemoon/lpts
from autotest.client.shared import error


# lpt env set
from autotest.client.shared.settings import settings
try:
    autodir = os.path.abspath(os.environ['AUTODIR'])
except KeyError:
    autodir = settings.get_value('COMMON', 'autotest_top_path')


autodir = os.path.abspath(os.environ['AUTODIR'])
lptdir = os.path.join(autodir, "lpts")
os.environ['LPTROOT'] = lptdir
from autotest.client import setup_modules
setup_modules.setup(base_path=lptdir, root_module_name="lpt")

import lpt.api.test as lpt_test
from lpt.lib import lptlog
from lpt.lib.share import utils as lutils
from lpt.api import method


class stream(test.test, lpt_test.BaseTest):
    version = 1

    def __init__(self, job, bindir, outputdir):
        tool = str(self.__class__.__name__)
        lpt_test.BaseTest.__init__(self, tool)
        test.test.__init__(self, job, bindir, outputdir)
示例#4
0
import os
import sys
try:
    import autotest.client.setup_modules as setup_modules
    client_dir = os.path.dirname(setup_modules.__file__)
except ImportError:
    dirname = os.path.dirname(sys.modules[__name__].__file__)
    client_dir = os.path.abspath(os.path.join(dirname, ".."))
    sys.path.insert(0, client_dir)
    import setup_modules
    sys.path.pop(0)

setup_modules.setup(base_path=client_dir,
                    root_module_name="autotest.client")
示例#5
0
import os, sys
try:
    import autotest.client.setup_modules as setup_modules
    client_dir = os.path.dirname(setup_modules.__file__)
except ImportError:
    dirname = os.path.dirname(sys.modules[__name__].__file__)
    client_dir = os.path.abspath(os.path.join(dirname, ".."))
    sys.path.insert(0, client_dir)
    import setup_modules
    sys.path.pop(0)

setup_modules.setup(base_path=client_dir,
                    root_module_name="autotest.client")