本文整理汇总了Python中buildbot.steps.shell.Test.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Test.__init__方法的具体用法?Python Test.__init__怎么用?Python Test.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类buildbot.steps.shell.Test
的用法示例。
在下文中一共展示了Test.__init__方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from buildbot.steps.shell import Test [as 别名]
# 或者: from buildbot.steps.shell.Test import __init__ [as 别名]
def __init__(self,
fileloc=None,
config=None,
**kwargs):
"""
Create the Rpmlint object.
@type fileloc: str
@param fileloc: Location glob of the specs or rpms.
@type config: str
@param config: path to the rpmlint user config.
@type kwargs: dict
@param fileloc: all other keyword arguments.
"""
Test.__init__(self, **kwargs)
if fileloc:
self.fileloc = fileloc
if config:
self.config = config
self.addFactoryArguments(fileloc=fileloc, config=config)
self.command = ["rpmlint", "-i"]
if self.config:
self.command += ['-f', self.config]
self.command.append(self.fileloc)
self.obs = pkgutil.WEObserver()
self.addLogObserver('stdio', self.obs)
示例2: __init__
# 需要导入模块: from buildbot.steps.shell import Test [as 别名]
# 或者: from buildbot.steps.shell.Test import __init__ [as 别名]
def __init__(self, dbpool=None, test_type=None, test_info="",
description=None, descriptionDone=None,
autoCreateTables=False, textLimit=5, testNameLimit=16,
parallel=4, logfiles=None, lazylogfiles=True,
warningPattern="MTR's internal check of the test case '.*' failed",
mtr_subdir="mysql-test", **kwargs):
if logfiles is None:
logfiles = {}
if description is None:
description = ["testing"]
if test_type:
description.append(test_type)
if descriptionDone is None:
descriptionDone = ["test"]
if test_type:
descriptionDone.append(test_type)
Test.__init__(self, logfiles=logfiles, lazylogfiles=lazylogfiles,
description=description, descriptionDone=descriptionDone,
warningPattern=warningPattern, **kwargs)
self.dbpool = dbpool
self.test_type = test_type
self.test_info = test_info
self.autoCreateTables = autoCreateTables
self.textLimit = textLimit
self.testNameLimit = testNameLimit
self.parallel = parallel
self.mtr_subdir = mtr_subdir
self.progressMetrics += ('tests',)
示例3: __init__
# 需要导入模块: from buildbot.steps.shell import Test [as 别名]
# 或者: from buildbot.steps.shell.Test import __init__ [as 别名]
def __init__(self, dbpool=None, test_type="mysql-test-run", test_info="",
autoCreateTables=False, textLimit=5, testNameLimit=16,
parallel=4, logfiles = {}, lazylogfiles = True,
warningPattern="MTR's internal check of the test case '.*' failed",
mtr_subdir="mysql-test", **kwargs):
Test.__init__(self, logfiles=logfiles, lazylogfiles=lazylogfiles,
warningPattern=warningPattern, **kwargs)
self.dbpool = dbpool
self.test_type = test_type
self.test_info = test_info
self.autoCreateTables = autoCreateTables
self.textLimit = textLimit
self.testNameLimit = testNameLimit
self.parallel = parallel
self.mtr_subdir = mtr_subdir
self.progressMetrics += ('tests',)
self.addFactoryArguments(dbpool=self.dbpool,
test_type=self.test_type,
test_info=self.test_info,
autoCreateTables=self.autoCreateTables,
textLimit=self.textLimit,
testNameLimit=self.testNameLimit,
parallel=self.parallel,
mtr_subdir=self.mtr_subdir)
示例4: __init__
# 需要导入模块: from buildbot.steps.shell import Test [as 别名]
# 或者: from buildbot.steps.shell.Test import __init__ [as 别名]
def __init__(self, ignore=[], flaky=[], max_logs=20,
*args, **kwargs):
Test.__init__(self, *args, **kwargs)
self.maxLogs = int(max_logs)
self.logObserver = LitLogObserver(self.maxLogs)
self.addFactoryArguments(max_logs=max_logs)
self.addLogObserver('stdio', self.logObserver)
示例5: __init__
# 需要导入模块: from buildbot.steps.shell import Test [as 别名]
# 或者: from buildbot.steps.shell.Test import __init__ [as 别名]
def __init__(self, dbpool=None, test_type="mysql-test-run", test_info="",
autoCreateTables=False, textLimit=5, testNameLimit=16,
parallel=4, logfiles = {}, lazylogfiles = True, **kwargs):
# Add mysql server logfiles.
for mtr in range(0, parallel+1):
for mysqld in range(1, 4+1):
if mtr == 0:
logname = "mysqld.%d.err" % mysqld
filename = "mysql-test/var/log/mysqld.%d.err" % mysqld
else:
logname = "mysqld.%d.err.%d" % (mysqld, mtr)
filename = "mysql-test/var/%d/log/mysqld.%d.err" % (mtr, mysqld)
logfiles[logname] = filename
Test.__init__(self, logfiles=logfiles, lazylogfiles=lazylogfiles, **kwargs)
self.dbpool = dbpool
self.test_type = test_type
self.test_info = test_info
self.autoCreateTables = autoCreateTables
self.textLimit = textLimit
self.testNameLimit = testNameLimit
self.parallel = parallel
self.progressMetrics += ('tests',)
self.addFactoryArguments(dbpool=self.dbpool,
test_type=self.test_type,
test_info=self.test_info,
autoCreateTables=self.autoCreateTables,
textLimit=self.textLimit,
testNameLimit=self.testNameLimit,
parallel=self.parallel)
示例6: __init__
# 需要导入模块: from buildbot.steps.shell import Test [as 别名]
# 或者: from buildbot.steps.shell.Test import __init__ [as 别名]
def __init__(self, fileloc="*rpm", **kwargs):
"""
Create the Rpmlint object.
@type fileloc: str
@param fileloc: Location glob of the specs or rpms.
@type kwargs: dict
@param fileloc: all other keyword arguments.
"""
Test.__init__(self, **kwargs)
self.command = ["/usr/bin/rpmlint", "-i"]
self.command.append(fileloc)
示例7: __init__
# 需要导入模块: from buildbot.steps.shell import Test [as 别名]
# 或者: from buildbot.steps.shell.Test import __init__ [as 别名]
def __init__(self, python, db, verbosity=2, **kwargs):
kwargs["command"] = [
"../venv-python%s-%s%s/bin/python" % (python, db.name, db.version),
"tests/runtests.py",
"--settings=testsettings",
"--verbosity=%s" % verbosity,
]
kwargs["env"] = {"PYTHONPATH": "$PWD:$PWD/tests", "LC_ALL": "en_US.utf8"}
Test.__init__(self, **kwargs)
# Make sure not to spuriously count a warning from test cases
# using the word "warning". So skip any "warnings" on lines starting
# with "test_"
self.addSuppression([(None, "^test_", None, None)])
self.addFactoryArguments(python=python, db=db, verbosity=verbosity)
示例8: __init__
# 需要导入模块: from buildbot.steps.shell import Test [as 别名]
# 或者: from buildbot.steps.shell.Test import __init__ [as 别名]
def __init__(self, **kwargs):
self.failed__ = False # there's a 'failed' method in Test, ouch!
Test.__init__(self, **kwargs)
示例9: __init__
# 需要导入模块: from buildbot.steps.shell import Test [as 别名]
# 或者: from buildbot.steps.shell.Test import __init__ [as 别名]
def __init__(self, ignore=[], flaky=[], max_logs=20, *args, **kwargs):
Test.__init__(self, *args, **kwargs)
self.logObserver = DejaGNULogObserver()
self.addLogObserver("gdb.log", self.logObserver)
示例10: __init__
# 需要导入模块: from buildbot.steps.shell import Test [as 别名]
# 或者: from buildbot.steps.shell.Test import __init__ [as 别名]
def __init__(self, ignore=[], flaky=[], max_logs=20, *args, **kwargs):
Test.__init__(self, *args, **kwargs)
self.logObserver = LitLogObserver()
self.addLogObserver("stdio", self.logObserver)