本文整理汇总了Python中buildbot.steps.shell.Compile类的典型用法代码示例。如果您正苦于以下问题:Python Compile类的具体用法?Python Compile怎么用?Python Compile使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Compile类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: start
def start(self):
try:
self.getProperty('release')
except KeyError:
self.setProperty('release', False)
Compile.start(self)
示例2: compile
def compile(self, builddir='build', config='release', target=None, useClean=False, desc=None, doStepIf=True,
warningPattern=None, suppressionFile=None, suppressions=None,
runParallel=True, **kwargs):
@renderer
def compileCommand(props):
command = '%s cmake --build . --config %s' % (self.envCmd, config)
if not target is None:
command += ' --target %s' % target
if useClean:
command += ' --clean-first'
if runParallel:
cpus = props.getProperty('CPUs')
if not cpus:
cpus = 1
if self.compiler and self.compiler.startswith('vc'):
command += ' -- /maxcpucount:%s /consoleloggerparameters:NoSummary' % cpus
else:
command += ' -- -j%s' % cpus
return command
if desc is None:
desc = 'compile %s' % config
if warningPattern is None:
warningPattern = self.r_warning_pattern
step = \
Compile(command=compileCommand, workdir=builddir, env=self.env,
name=desc, descriptionDone=desc, description=desc, doStepIf=doStepIf,
warningPattern=warningPattern,
warnOnWarnings=True, haltOnFailure=True,
suppressionFile=suppressionFile, **kwargs)
if suppressions or self.suppressions:
step.addSuppression((suppressions or []) + (self.suppressions or []))
yield self.processStep(step)
示例3: createSummary
def createSummary(self, log):
Compile.createSummary(self, log)
if not self.warningPattern:
return
wre = self.warningPattern
if isinstance(wre, str):
import re
wre = re.compile(wre)
interested = True
if self.partialwarningStart:
interested = False
warnings = []
for line in log.getText().split("\n"):
if line == self.partialwarningStart:
interested = True
if line == self.partialwarningEnd:
interested = False
if interested and wre.match(line):
warnings.append(line)
if warnings:
self.addCompleteLog("partialwarnings", "\n".join(warnings) + "\n")
if self.partialwarningProperty is not None:
old_count = self.getProperty(self.partialwarningProperty, 0)
self.setProperty(self.partialwarningProperty, old_count + len(warnings), "PartialWarningsCompile")
else:
old_count = self.getProperty("partial-warnings-count", 0)
self.setProperty("partial-warnings-count", old_count + len(warnings), "PartialWarningsCompile")
示例4: __init__
def __init__(self, partialwarningStart=None, partialwarningEnd=None, partialwarningProperty=None, **kwargs):
Compile.__init__(self, **kwargs)
self.partialwarningStart = partialwarningStart
self.partialwarningEnd = partialwarningEnd
self.partialwarningProperty = partialwarningProperty
self.addFactoryArguments(partialwarningStart=self.partialwarningStart)
self.addFactoryArguments(partialwarningEnd=self.partialwarningEnd)
self.addFactoryArguments(partialwarningProperty=self.partialwarningProperty)
示例5: commandComplete
def commandComplete(self, cmd):
log = cmd.logs['stdio']
for line in log.readlines():
mt = self.filename_rx.search(line)
if mt:
filename = mt.group(1).strip()
if self.filesuffix is not None:
filename += self.filesuffix
if self.fileprefix is not None:
filename = self.fileprefix + filename
self.setProperty('filename', filename)
self.setProperty('basefilename', filename[filename.rfind(self.sep) + 1:])
break
Compile.commandComplete(self, cmd)
示例6: describe
def describe(self, done=False):
d = Compile.describe(self, done)
if isinstance(d, (str, unicode)):
return "%s: %s" % (self.locale, d)
d = list(d)
d.insert(0, "%s:" % self.locale)
return d
示例7: __init__
def __init__(
self,
build_targets = Interpolate("%(prop:build_targets)s"),
build_mode = Interpolate("%(prop:build_mode)s"),
build_cat = Interpolate("%(prop:build_cat)s"),
build_extras = Interpolate("%(prop:build_extras)s"),
jobs = None,
**kwargs):
Compile.__init__(
self,
command=SconsCommandRenderer(
build_targets,
build_mode,
build_cat,
build_extras,
jobs),
**kwargs)
示例8: start
def start(self):
multi = self.getProperties().getProperty('cc','').startswith("vc")
command = ["cmake", "--build", "." if multi else self.config]
if multi:
command.append("--config")
command.append(self.config)
if self.target is not None:
command.append("--target")
command.append(self.target)
self.setCommand(command)
return Compile.start(self)
示例9: __init__
def __init__(self, config, target = None, **kwargs):
self.config = config
self.target = target
Compile.__init__(self, **kwargs)
示例10: __init__
def __init__(self, locale, **kwargs):
Compile.__init__(self, **kwargs)
self.addFactoryArguments(locale=locale)
self.locale = locale
示例11: createSummary
def createSummary(self, log):
Compile.createSummary(self, log)
self.addURL('coverage',
'http://www.fraca7.net/TaskCoach-coverage/%s/index.html' % (self.getProperty('buildername')))
示例12: __init__
def __init__(self, **kwargs):
kwargs['command'] = ['make', self.name,
WithProperties('TCVERSION=r%s', 'got_revision')]
Compile.__init__(self, **kwargs)
示例13: __init__
def __init__(self, **kwargs):
name = kwargs.pop('name')
kwargs['command'] = ['./uploadppa.sh', name]
Compile.__init__(self, **kwargs)
self.addFactoryArguments(name=name)
示例14: __init__
def __init__(self, **kwargs):
name = kwargs.pop('name')
kwargs['command'] = ['make', 'ppa-' + name]
Compile.__init__(self, **kwargs)
self.addFactoryArguments(name=name)