def __init__(self, **kwargs): self.configure = kwargs['configure'] del kwargs['configure'] ShellCommand.__init__(self, **kwargs) self.addFactoryArguments(configure = self.configure)
def __init__(self, **kwargs): self.disttarget = kwargs["disttarget"] del kwargs["disttarget"] self.srcpath = kwargs["srcpath"] del kwargs["srcpath"] self.dstpath = kwargs["dstpath"] del kwargs["dstpath"] self.package = kwargs["package"] del kwargs["package"] self.buildname = kwargs["buildname"] del kwargs["buildname"] self.platform_package = kwargs["platform_package"] del kwargs["platform_package"] self.archive_format = kwargs["archive_format"] del kwargs["archive_format"] ShellCommand.__init__(self, **kwargs) self.addFactoryArguments(disttarget = self.disttarget) self.addFactoryArguments(srcpath = self.srcpath) self.addFactoryArguments(dstpath = self.dstpath) self.addFactoryArguments(package = self.package) self.addFactoryArguments(buildname = self.buildname) self.addFactoryArguments(platform_package = self.platform_package) self.addFactoryArguments(archive_format = self.archive_format)
def __init__(self, **kwargs): self.prefix = kwargs["prefix"] del kwargs["prefix"] ShellCommand.__init__(self, **kwargs) self.addFactoryArguments(prefix = self.prefix)
def __init__(self, cvsroot, **kwargs): self.cvsroot = cvsroot self.workdir = "." kwargs['workdir'] = "." # command may be overridden in start() kwargs['command'] = ["cvs", "-d", cvsroot, "co", "mozilla/client.mk"] ShellCommand.__init__(self, **kwargs)
def __init__(self, build_mode = None, build_extras = None, jobs=None, verbose=False, **kwargs): command = ["test/run.py", "-d", "../database"] if build_mode: command.extend(["--mode" , build_mode]) else: command.extend([Interpolate("%(prop:build_mode:#?|--mode|)s"), Interpolate("%(prop:build_mode)s")]) if build_extras: command.extend(["--extras" , build_extras]) else: command.extend([Interpolate("%(prop:build_extras:#?|--extras|)s"), Interpolate("%(prop:build_extras)s")]) if jobs: command.extend(["-j", jobs]) if not verbose: command.extend(["--mute", "all"]) ShellCommand.__init__(self, command=command, **kwargs) self.test_summary = "" self.tests_failed = None self.result = None
def __init__(self, **kwargs): ShellCommand.__init__(self, **kwargs) LogLineObserver.__init__(self) self.addLogObserver("stdio", self) self.metrics = {"run": 0, "Failures": 0, "Errors": 0, "Incomplete": 0, "Skipped": 0, "Time elapsed": 0} self.progressMetrics += tuple(self.metrics.keys()) self.phpError = False
def __init__(self, factory, argdict=None, **kwargs): self.factory = factory for k, v in argdict.iteritems(): setattr(self, k, v) self.description = "Running Preamble" self.command = ". ./oe-init-build-env" ShellCommand.__init__(self, **kwargs)
def __init__(self, factory, argdict=None, **kwargs): self.machine="" self.buildapp="" self.distro="poky" self.packages=None self.buildhistory=False self.gplv3=True self.multilib=False self.swabber=False self.x32=False self.atext=None self.emgd=False self.pvr=False self.atextprepend=None self.atextappend=None self.SDKMACHINE="i686" self.adtdev=False self.factory = factory self.buildappsrcrev = "${AUTOREV}" self.initmgr=None self.kwargs = kwargs for k, v in argdict.iteritems(): if type(v) is bool: setattr(self, k, str(v)) else: setattr(self, k, v) self.description = "Create Auto Configuration" ShellCommand.__init__(self, **kwargs)
def __init__(self, specfile=None, topdir='`pwd`', builddir='`pwd`', rpmdir='`pwd`', sourcedir='`pwd`', specdir='`pwd`', srcrpmdir='`pwd`', dist='.el5', autoRelease=False, vcsRevision=False, **kwargs): ShellCommand.__init__(self, **kwargs) self.addFactoryArguments(topdir=topdir, builddir=builddir, rpmdir=rpmdir, sourcedir=sourcedir, specdir=specdir, srcrpmdir=srcrpmdir, specfile=specfile, dist=dist, autoRelease=autoRelease, vcsRevision=vcsRevision) self.rpmbuild = ( 'rpmbuild --define "_topdir %s" --define "_builddir %s"' ' --define "_rpmdir %s" --define "_sourcedir %s"' ' --define "_specdir %s" --define "_srcrpmdir %s"' ' --define "dist %s"' % (topdir, builddir, rpmdir, sourcedir, specdir, srcrpmdir, dist)) self.specfile = specfile self.autoRelease = autoRelease self.vcsRevision = vcsRevision
def __init__(self, python, db, **kwargs): ### XXX explain wtf is going on below - double string interpolation, WithProperties... ugh. command = [ r"PYTHON=%%(python%s)s;" % python, r"VENV=../venv-python%s-%s%s;" % (python, db.name, db.version), # Create or update the virtualenv r"$PYTHON virtualenv.py --distribute --no-site-packages $VENV || exit 1;", # Reset $PYTHON and $PIP to the venv python r"PYTHON=$PWD/$VENV/bin/python;", r"PIP=$PWD/$VENV/bin/pip;", ] # Commands to install database dependencies if needed. if db.name == "sqlite": command.extend( [ r"$PYTHON -c 'import sqlite3' 2>/dev/null || ", r"$PYTHON -c 'import pysqlite2.dbapi2' ||", r"$PIP install pysqlite || exit 1;", ] ) elif db.name == "postgresql": command.append("$PYTHON -c 'import psycopg2' 2>/dev/null || $PIP install psycopg2==2.2.2 || exit 1") elif db.name == "mysql": command.append("$PYTHON -c 'import MySQLdb' 2>/dev/null || $PIP install MySQL-python==1.2.3 || exit 1") else: raise ValueError("Bad DB: %r" % db.name) kwargs["command"] = WithProperties("\n".join(command)) ShellCommand.__init__(self, **kwargs) self.addFactoryArguments(python=python, db=db)
def __init__(self, builder, resultFile, **kwargs): reportFile = "abi_report.html" logFile = "abi_log.txt" # TODO Used? cmd = builder.envCmd.split() + [ "abi-compliance-checker", ] + (["-api"] if not isBranch34(builder) else []) + [ "-l", "opencv", "-old", Interpolate("%(prop:abi_base_file)s"), "-new", resultFile, "-report-path", reportFile, ] + ([ "-skip-internal", ".*UMatData.*|.*randGaussMixture.*|.*cv.*hal.*(Filter2D|Morph|SepFilter2D).*|" + \ "_ZN2cv3ocl7ProgramC1ERKNS_6StringE|_ZN2cv3ocl7ProgramC2ERKNS_6StringE|" + \ ".*experimental_.*" + \ "|_ZN9_IplImageC.*|_ZN7CvMatNDC.*" + \ "|.*2cv10AutoBuffer.*" + \ "|_ZN2cv7MomentsC.*" + \ "|.*Durand.*" + \ "|_ZN[0-9]+Cv.+(C1|C2|D0|D1|D2|SE).*" ] if isBranch34(builder) else [ "-skip-internal", "_ZN2cv11GGPUContext.*|" + \ "_ZN2cv10GGPUKernel.*|" + \ ".*scalar_wrapper_gpu.*|" + \ "_ZN2cv4gapi3gpu7backendEv|" + \ "_ZN2cv4gapi7imgproc3gpu7kernelsEv" + \ "|.*Durand.*" + \ "|_ZN2cv3dnn16readNetFromTorchERKNSt7__cxx1112basic_stringIcEEb" + \ "|_ZN2cv7MatExprC.*" + \ "|_ZN2cv4gapi7combineERKNS0_14GKernelPackageES3_NS_12unite_policyE" + \ "|_ZNK2cv4gapi14GKernelPackage6lookupERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorINS0_8GBackendESaISB_EE" + \ "" ]) ShellCommand.__init__(self, workdir='build', command=cmd, logfiles={"report": reportFile}, **kwargs)
def __init__(self, **kwargs): # cleanup kwargs if 'installdir' in kwargs: self.installdir = kwargs['installdir'] del kwargs['installdir'] if 'mode' in kwargs: self.config = kwargs['mode'] del kwargs['mode'] if 'projectfile' in kwargs: self.projectfile = kwargs['projectfile'] del kwargs['projectfile'] if 'config' in kwargs: self.config = kwargs['config'] del kwargs['config'] if 'useenv' in kwargs: self.useenv = kwargs['useenv'] del kwargs['useenv'] # one of those next two forces the usage of env variables if 'INCLUDE' in kwargs: self.useenv = True self.INCLUDE = kwargs['INCLUDE'] del kwargs['INCLUDE'] if 'LIB' in kwargs: self.useenv = True self.LIB = kwargs['LIB'] del kwargs['LIB'] if 'PATH' in kwargs: self.PATH = kwargs['PATH'] del kwargs['PATH'] # always upcall ! ShellCommand.__init__(self, **kwargs)
def __init__(self, factory, argdict=None, **kwargs): self.time="0" self.funny="False" self.factory = factory for k, v in argdict.iteritems(): if k=="time": self.time=v else: setattr(self, k, v) sleep_quotes = ["Sleep, those little slices of death, how I loathe them.", "No day is so bad it can't be fixed with a nap.", "People who say they sleep like a baby usually don't have one.", "Life is too short to sleep on low thread-count sheets", "Sleep is a symptom of caffeine deprivation.", "Without enough sleep, we all become tall two-year-olds.", "I'm not asleep... but that doesn't mean I'm awake.", "When you have insomnia, you're never really asleep, and you're never really awake.", "Life is something that happens when you can't get to sleep.", "Sleeping is no mean art: for its sake one must stay awake all day.", "I count it as a certainty that in paradise, everyone naps.", "Early to rise and early to bed, makes a man healthy and wealthy and dead.", "I like sleeping, its like death without commitment.", "I do 5 sit-ups every morning. May not sound like much, but there's only so many times you can hit the snooze button.", "The early bird gets the worm. The early worm...gets eaten."] from random import choice if self.funny == "True": self.description = choice(sleep_quotes) + "<br><br>Sleeping for " + self.time + " sec." else: self.description = "Sleeping for " + self.time + " sec." self.command = "/bin/sleep " + self.time # Timeout needs to be passed to LoggingBuildStep as a kwarg self.timeout = 1000 kwargs['timeout']=self.timeout ShellCommand.__init__(self, **kwargs)
def __init__(self, installdir=None, mode="rebuild", projectfile=None, config='release', useenv=False, project=None, INCLUDE=None, LIB=None, PATH=None, **kwargs): if INCLUDE is None: INCLUDE = [] if LIB is None: LIB = [] if PATH is None: PATH = [] self.installdir = installdir self.mode = mode self.projectfile = projectfile self.config = config self.useenv = useenv self.project = project if len(INCLUDE) > 0: self.INCLUDE = INCLUDE self.useenv = True if len(LIB) > 0: self.LIB = LIB self.useenv = True if len(PATH) > 0: self.PATH = PATH # always upcall ! ShellCommand.__init__(self, **kwargs)
def __init__(self, testdir=None, **kwargs): if not testdir: config.error("please pass testdir") kwargs['command'] = 'run_maxq.py %s' % (testdir,) ShellCommand.__init__(self, **kwargs) self.observer = MaxQObserver() self.addLogObserver('stdio', self.observer)
def __init__(self, installdir=None, mode="rebuild", projectfile=None, config=None, useenv=False, INCLUDE=[], LIB=[], PATH=[], **kwargs): self.installdir = installdir self.mode = mode self.projectfile = projectfile self.config = config self.useenv = useenv if len(INCLUDE) > 0: self.INCLUDE = INCLUDE self.useenv = True if len(LIB) > 0: self.LIB = LIB self.useenv = True if len(PATH) > 0: self.PATH = PATH # always upcall ! ShellCommand.__init__(self, **kwargs) self.addFactoryArguments(installdir=installdir, mode=mode, projectfile=projectfile, config=config, useenv=useenv, INCLUDE=INCLUDE, LIB=LIB, PATH=PATH)
def __init__( self, specfile=None, topdir="`pwd`", builddir="`pwd`", rpmdir="`pwd`", sourcedir="`pwd`", specdir="`pwd`", srcrpmdir="`pwd`", dist=".el5", autoRelease=False, vcsRevision=False, **kwargs ): """ Creates the RpmBuild object. @type specfile: str @param specfile: the name of the spec file for the rpmbuild @type topdir: str @param topdir: the top directory for rpm building. @type builddir: str @param builddir: the directory to use for building @type rpmdir: str @param rpmdir: the directory to dump the rpms into @type sourcedir: str @param sourcedir: the directory that houses source code @type srcrpmdir: str @param srcrpmdir: the directory to dump source rpms into @type dist: str @param dist: the distribution to build for @type autoRelease: boolean @param autoRelease: if the auto release mechanics should be used @type vcsRevision: boolean @param vcsRevision: if the vcs revision mechanics should be used @type kwargs: dict @param kwargs: All further keyword arguments. """ ShellCommand.__init__(self, **kwargs) self.addFactoryArguments( topdir=topdir, builddir=builddir, rpmdir=rpmdir, sourcedir=sourcedir, specdir=specdir, srcrpmdir=srcrpmdir, specfile=specfile, dist=dist, autoRelease=autoRelease, vcsRevision=vcsRevision, ) self.rpmbuild = ( 'rpmbuild --define "_topdir %s" --define "_builddir %s"' ' --define "_rpmdir %s" --define "_sourcedir %s"' ' --define "_specdir %s" --define "_srcrpmdir %s"' ' --define "dist %s"' % (topdir, builddir, rpmdir, sourcedir, specdir, srcrpmdir, dist) ) self.specfile = specfile self.autoRelease = autoRelease self.vcsRevision = vcsRevision
def __init__(self, toxEnv, reactor, tests=[], commandNumber=0, allowSystemPackages=False, _env=None, **kwargs): ShellCommand.__init__(self, **kwargs) self._toxEnv = toxEnv self.tests = tests self._commandNumber = commandNumber self._reactor = reactor self._systemPackages = allowSystemPackages self.logfiles = { "test.log": "build/" + self._toxEnv + "/tmp/_trial_temp/test.log" } self.name = self._reactor self.description = ["testing", "(%s)" % self._reactor] self.descriptionDone = ["tests"] self.addLogObserver('stdio', TrialTestCaseCounter()) if _env is None: _env = {} self._env = _env
def __init__(self, *args, **kwargs): ShellCommand.__init__(self, *args, **kwargs) # importing here gets around an import loop from buildbot.process import subunitlogobserver self.ioObverser = subunitlogobserver.SubunitLogObserver() self.addLogObserver('stdio', self.ioObverser) self.progressMetrics = self.progressMetrics + ('tests', 'tests failed')
def __init__(self, python): ShellCommand.__init__(self) self.command = python + [ "-c", 'import codecs; exec(codecs.decode("%s", "hex"))' % (self.source.encode('hex'), ), "_trial_temp" ]
def __init__(self, **kwargs): assert 'platform' in kwargs platform = kwargs['platform'] assert platform.startswith('win32') or platform.startswith('macosx') \ or platform.startswith('linux') if 'leakFailureThreshold' in kwargs: self.leakFailureThreshold = kwargs['leakFailureThreshold'] if not 'mallocLog' in kwargs: return FAILURE self.mallocLog = kwargs['mallocLog'] if 'testname' in kwargs: testname = kwargs['testname'] + " " else: testname = "" self.testname = testname self.name = "compare " + testname + "leak logs" self.description = "compare " + testname + "leak logs" self.descriptionDone = "compare " + testname + "leak logs complete" if platform.startswith("win32"): kwargs['command'] = ['obj-firefox\\dist\\bin\\leakstats.exe', kwargs['mallocLog']] else: kwargs['command'] = ['obj-firefox/dist/bin/leakstats', kwargs['mallocLog']] ShellCommand.__init__(self, **kwargs)
def __init__(self, build_status_oracle, coverage_url, coverage_dir, coverage_file, **kwargs): """Prepares the coverage command. Args: build_status_oracle: class that knows if the current build has failed. coverage_url: The base URL for the serving web server we will use when we generate the link to the coverage. This will generally be the slave's URL (something like http://slave-hostname/). coverage_dir: Where to write coverage HTML. coverage_file: The LCOV file to generate the coverage from. """ ShellCommand.__init__(self, **kwargs) self.addFactoryArguments(build_status_oracle=build_status_oracle, coverage_url=coverage_url, coverage_dir=coverage_dir, coverage_file=coverage_file) self.build_status_oracle = build_status_oracle self.coverage_url = coverage_url self.description = ['Coverage Report'] self.name = 'LCOV (Report)' self.warnOnFailure = True self.flunkOnFailure = False output_dir = os.path.join(coverage_dir, '%(buildername)s_%(buildnumber)s') generate_script = PosixPathJoin('tools', 'continuous_build', 'build_internal', 'scripts', 'generate_coverage_html.sh') self.setCommand([generate_script, coverage_file, WithProperties(output_dir)])
def __init__(self, artifactBuilderName=None, artifact=None, artifactDirectory=None, artifactDestination=None, artifactServer=None, artifactServerDir=None, artifactServerPort=None, usePowerShell=True, **kwargs): self.artifactBuilderName = artifactBuilderName self.artifact = artifact self.artifactDirectory = artifactDirectory self.artifactServer = artifactServer self.artifactServerDir = artifactServerDir self.artifactServerPort = artifactServerPort self.artifactDestination = artifactDestination or artifact self.master = None self.usePowerShell = usePowerShell name = "Download Artifact for '%s'" % artifactBuilderName description = "Downloading artifact '%s'..." % artifactBuilderName descriptionDone = "Downloaded '%s'." % artifactBuilderName ShellCommand.__init__(self, name=name, description=description, descriptionDone=descriptionDone, **kwargs)
def __init__(self, username, api_key, **kwargs): kwargs.setdefault("logfiles", {})["sauce.log"] = "sauce.log" ShellCommand.__init__(self, **kwargs) self.addFactoryArguments(username=username, api_key=api_key) self.username = username self.api_key = api_key
def __init__(self, installdir=None, mode="rebuild", projectfile=None, config='release', useenv=False, project=None, INCLUDE=[], LIB=[], PATH=[], **kwargs): self.installdir = installdir self.mode = mode self.projectfile = projectfile self.config = config self.useenv = useenv self.project = project if len(INCLUDE) > 0: self.INCLUDE = INCLUDE self.useenv = True if len(LIB) > 0: self.LIB = LIB self.useenv = True if len(PATH) > 0: self.PATH = PATH # always upcall ! ShellCommand.__init__(self, **kwargs)
def __init__(self, *args, **kwargs): for name, default in [('binary', 'cppcheck'), ('source', ['.']), ('enable', []), ('inconclusive', False), ('extra_args', [])]: setattr(self, name, default) if name in kwargs: setattr(self, name, kwargs[name]) del kwargs[name] ShellCommand.__init__(self, *args, **kwargs) self.addLogObserver( 'stdio', logobserver.LogLineObserver()) command = [self.binary] command.extend(self.source) if self.enable: command.append('--enable=%s' % ','.join(self.enable)) if self.inconclusive: command.append('--inconclusive') command.extend(self.extra_args) self.setCommand(command) counts = self.counts = {} summaries = self.summaries = {} for m in self.MESSAGES: counts[m] = 0 summaries[m] = []
def __init__(self, upload_furlfile=None, egg_filename_base=None, *args, **kwargs): kwargs['command'] = 'flappclient --furlfile %s upload-file %s*.egg' \ % (upload_furlfile, egg_filename_base) ShellCommand.__init__(self, *args, **kwargs) self.addFactoryArguments(upload_furlfile=upload_furlfile, egg_filename_base=egg_filename_base)
def __init__(self, failureOnNoTests=False, *args, **kwargs): ShellCommand.__init__(self, *args, **kwargs) self.failureOnNoTests = failureOnNoTests self.ioObserver = SubunitLogObserver() self.addLogObserver('stdio', self.ioObserver) self.progressMetrics = self.progressMetrics + ('tests', 'tests failed')
def __init__(self, **kwargs): """ @type workdir: string @keyword workdir: the workdir to start from (must be the base of the Twisted tree) """ ShellCommand.__init__(self, **kwargs)
def __init__(self, fileloc=None, suppressTags=None, **kwargs): """ Create the DebLintian object. @type fileloc: str @param fileloc: Location of the .deb or .changes to test. @type suppressTags: list @param suppressTags: List of tags to suppress. @type kwargs: dict @param kwargs: all other keyword arguments. """ ShellCommand.__init__(self, **kwargs) if fileloc: self.fileloc = fileloc if suppressTags: self.suppressTags = suppressTags if not self.fileloc: config.error("You must specify a fileloc") self.command = ["lintian", "-v", self.fileloc] if self.suppressTags: for tag in self.suppressTags: self.command += ['--suppress-tags', tag]
def __init__(self, testdir=None, **kwargs): if not testdir: config.error("please pass testdir") kwargs['command'] = 'run_maxq.py %s' % (testdir, ) ShellCommand.__init__(self, **kwargs) self.observer = MaxQObserver() self.addLogObserver('stdio', self.observer)
def __init__(self, stage=None, module=None, moduleset=None, **kwargs): ShellCommand.__init__(self, **kwargs) self.testsLogs = {} self.testsPassed = [] self.testsFailed = [] self.all_tests_passed = False self.disabledTestsCount = 0
def __init__(self, **kwargs): assert 'platform' in kwargs platform = kwargs['platform'] assert platform.startswith('win32') or platform.startswith('macosx') \ or platform.startswith('linux') if 'leakFailureThreshold' in kwargs: self.leakFailureThreshold = kwargs['leakFailureThreshold'] if not 'mallocLog' in kwargs: return FAILURE self.mallocLog = kwargs['mallocLog'] if 'testname' in kwargs: testname = kwargs['testname'] + " " else: testname = "" self.testname = testname self.name = "compare " + testname + "leak logs" self.description = "compare " + testname + "leak logs" self.descriptionDone = "compare " + testname + "leak logs complete" if platform.startswith("win32"): kwargs['command'] = [ 'obj-firefox\\dist\\bin\\leakstats.exe', kwargs['mallocLog'] ] else: kwargs['command'] = [ 'obj-firefox/dist/bin/leakstats', kwargs['mallocLog'] ] ShellCommand.__init__(self, **kwargs)
def __init__(self, installdir=None, mode="rebuild", projectfile=None, config='release', useenv=False, project=None, INCLUDE=None, LIB=None, PATH=None, **kwargs): if INCLUDE is None: INCLUDE = [] if LIB is None: LIB = [] if PATH is None: PATH = [] self.installdir = installdir self.mode = mode self.projectfile = projectfile self.config = config self.useenv = useenv self.project = project if INCLUDE: self.INCLUDE = INCLUDE self.useenv = True if LIB: self.LIB = LIB self.useenv = True if PATH: self.PATH = PATH # always upcall ! ShellCommand.__init__(self, **kwargs)
def __init__(self, root=None, resultdir=None, **kwargs): """ Creates the Mock object. @type root: str @param root: the name of the mock buildroot @type resultdir: str @param resultdir: the path of the result dir @type kwargs: dict @param kwargs: All further keyword arguments. """ ShellCommand.__init__(self, **kwargs) if root: self.root = root if resultdir: self.resultdir = resultdir if not self.root: config.error("You must specify a mock root") self.command = ['mock', '--root', self.root] if self.resultdir: self.command += ['--resultdir', self.resultdir]
def __init__(self, branch_name=None, ftp_server="ftp.securactive.lan", base_dir="/rd/nova/packages", **kwargs): self.branch_name = branch_name self.ftp_server = ftp_server self.base_dir = base_dir ShellCommand.__init__(self, **kwargs) self.addFactoryArguments(branch_name=branch_name, ftp_server=ftp_server, base_dir=base_dir)
def __init__(self, *args, **kwargs): for name, default in [('binary', 'cppcheck'), ('source', ['.']), ('enable', []), ('inconclusive', False), ('extra_args', [])]: setattr(self, name, kwargs.pop(name, default)) ShellCommand.__init__(self, *args, **kwargs) self.addLogObserver( 'stdio', logobserver.LineConsumerLogObserver(self.logConsumer)) command = [self.binary] command.extend(self.source) if self.enable: command.append('--enable=%s' % ','.join(self.enable)) if self.inconclusive: command.append('--inconclusive') command.extend(self.extra_args) self.setCommand(command) counts = self.counts = {} summaries = self.summaries = {} for m in self.MESSAGES: counts[m] = 0 summaries[m] = []
def __init__(self, clientdir, linkname, MAKE, *args, **kwargs): ShellCommand.__init__(self, *args, **kwargs) self.addFactoryArguments(clientdir=clientdir, linkname=linkname, MAKE=MAKE) self.command = [MAKE, "check-speed", "TESTCLIENTDIR=%s" % clientdir] self.linkname = linkname
def __init__(self, installdir = None, mode = "rebuild", projectfile = None, config = None, useenv = False, INCLUDE = [], LIB = [], PATH = [], **kwargs): self.installdir = installdir self.mode = mode self.projectfile = projectfile self.config = config self.useenv = useenv if len(INCLUDE) > 0: self.INCLUDE = INCLUDE self.useenv = True if len(LIB) > 0: self.LIB = LIB self.useenv = True if len(PATH) > 0: self.PATH = PATH # always upcall ! ShellCommand.__init__(self, **kwargs) self.addFactoryArguments( installdir = installdir, mode = mode, projectfile = projectfile, config = config, useenv = useenv, INCLUDE = INCLUDE, LIB = LIB, PATH = PATH )
def __init__(self, factory, argdict=None, **kwargs): self.vmname=None self.vmnames="" self.vmcount=1 self.startupscript=None self.metadata=None self.zone="us-central1-a" self.image=None self.machine=None self.network=None self.disksize=None self.factory = factory self.description = "Provision Google VMs" for k, v in argdict.iteritems(): if type(v) is bool: setattr(self, k, str(v)) else: setattr(self, k, v) if self.vmname is None or self.vmname == "": self.finished(FAILURE) else: self.command = "" if self.zone is None or self.zone not in ["us-central1-a", "us-central1-b", "us-central1-f", "europe-west1-a", "europe-west1-b", "asia-east1-a", "asia-east1-b", "asia-east1-b"]: self.zone = "us-central1-a" for x in range(0, self.vmcount): self.vmnames += " " + self.vmname + "-" + str(x) self.command += " gcloud compute instances delete" self.command += self.vmnames self.command += " --zone " + self.zone + " --quiet;" self.command += " gcloud compute instances create" self.command += self.vmnames self.command += " --zone " + self.zone if self.disksize is not None and self.disksize != "": self.command += " --boot-disk-size " + self.disksize else: self.command += " --boot-disk-size 200GB" if self.image is None: self.command += " --image debian-7" else: self.command += " --image " + self.image if self.machine is not None and self.machine in ["g1-small", "f1-micro", "n1-standard-1", "n1-standard-2", "n1-standard-4", "n1-standard-8", "n1-standard-16", "n1-highmem-2", "n1-highmem-4"]: self.command += " --machine-type " + self.machine else: self.command += " --machine-type n1-standard-1" if self.network is not None and self.network != "": self.command += " --network " + self.network if self.startupscript is not None and self.startupscript != "": self.command += " --metadata-from-file startup-script="+YOCTO_ABBASE+"/bin/"+self.startupscript if self.metadata is not None and self.metadata != "": self.command += " --metadata " + self.metadata self.command += " 1> /dev/null"; # Timeout needs to be passed to LoggingBuildStep as a kwarg self.timeout = 1000 kwargs['timeout']=self.timeout ShellCommand.__init__(self, **kwargs)
def __init__(self, factory, argdict=None, **kwargs): self.factory = factory for k, v in argdict.iteritems(): setattr(self, k, v) # Timeout needs to be passed to LoggingBuildStep as a kwarg self.timeout = 100000 kwargs['timeout']=self.timeout ShellCommand.__init__(self, **kwargs)
def __init__(self, python="python", python_command=None, *args, **kwargs): python = python or self.python if python is None: python = "python" python_command = python_command or self.python_command kwargs["command"] = [python] + python_command ShellCommand.__init__(self, *args, **kwargs) self.addFactoryArguments(python=python, python_command=python_command)
def __init__(self, factory, argdict=None, **kwargs): for k, v in argdict.iteritems(): setattr(self, k, v) self.description = "Generic Fail Step" for k, v in argdict.iteritems(): setattr(self, k, v) self.command = "echo 'Failing out'" ShellCommand.__init__(self, **kwargs)
def __init__(self, resumeBuild=True, resumeSlavepool=None, haltOnFailure=True, **kwargs): self.resumeBuild = resumeBuild if resumeBuild is not None else True self.resumeSlavepool = "slavenames" if resumeSlavepool is None else resumeSlavepool ShellCommand.__init__(self, haltOnFailure=haltOnFailure, **kwargs)
def __init__(self, specfile=None, topdir='`pwd`', builddir='`pwd`', rpmdir='`pwd`', sourcedir='`pwd`', specdir='`pwd`', srcrpmdir='`pwd`', dist='.el5', autoRelease=False, vcsRevision=False, **kwargs): """ Creates the RpmBuild object. @type specfile: str @param specfile: the name of the spec file for the rpmbuild @type topdir: str @param topdir: the top directory for rpm building. @type builddir: str @param builddir: the directory to use for building @type rpmdir: str @param rpmdir: the directory to dump the rpms into @type sourcedir: str @param sourcedir: the directory that houses source code @type srcrpmdir: str @param srcrpmdir: the directory to dump source rpms into @type dist: str @param dist: the distribution to build for @type autoRelease: boolean @param autoRelease: if the auto release mechanics should be used @type vcsRevision: boolean @param vcsRevision: if the vcs revision mechanics should be used @type kwargs: dict @param kwargs: All further keyword arguments. """ ShellCommand.__init__(self, **kwargs) self.addFactoryArguments(topdir=topdir, builddir=builddir, rpmdir=rpmdir, sourcedir=sourcedir, specdir=specdir, srcrpmdir=srcrpmdir, specfile=specfile, dist=dist, autoRelease=autoRelease, vcsRevision=vcsRevision) self.rpmbuild = ( 'rpmbuild --define "_topdir %s" --define "_builddir %s"' ' --define "_rpmdir %s" --define "_sourcedir %s"' ' --define "_specdir %s" --define "_srcrpmdir %s"' ' --define "dist %s"' % (topdir, builddir, rpmdir, sourcedir, specdir, srcrpmdir, dist)) self.specfile = specfile self.autoRelease = autoRelease self.vcsRevision = vcsRevision
def __init__(self, specfile=None, topdir='`pwd`', builddir='`pwd`', rpmdir='`pwd`', sourcedir='`pwd`', specdir='`pwd`', srcrpmdir='`pwd`', dist='.el6', autoRelease=False, vcsRevision=False, **kwargs): """ Create the RpmBuild object. @type specfile: str @param specfile: location of the specfile to build @type topdir: str @param topdir: define the _topdir rpm parameter @type builddir: str @param builddir: define the _builddir rpm parameter @type rpmdir: str @param rpmdir: define the _rpmdir rpm parameter @type sourcedir: str @param sourcedir: define the _sourcedir rpm parameter @type specdir: str @param specdir: define the _specdir rpm parameter @type srcrpmdir: str @param srcrpmdir: define the _srcrpmdir rpm parameter @type dist: str @param dist: define the dist string. @type autoRelease: boolean @param autoRelease: Use auto incrementing release numbers. @type vcsRevision: boolean @param vcsRevision: Use vcs version number as revision number. """ ShellCommand.__init__(self, **kwargs) self.dist = dist self.base_rpmbuild = ( 'rpmbuild --define "_topdir %s" --define "_builddir %s"' ' --define "_rpmdir %s" --define "_sourcedir %s"' ' --define "_specdir %s" --define "_srcrpmdir %s"' % (topdir, builddir, rpmdir, sourcedir, specdir, srcrpmdir)) self.specfile = specfile self.autoRelease = autoRelease self.vcsRevision = vcsRevision if not self.specfile: config.error("You must specify a specfile") self.addLogObserver( 'stdio', logobserver.LineConsumerLogObserver(self.logConsumer))
def __init__(self, name, source, alwaysRun=True): self._name = name self._source = source ShellCommand.__init__( self, command='base64 %s' % (self._source, ), description='attaching screen', descriptionDone='screen attached', alwaysRun=alwaysRun, )
def __init__(self, translationArgs, targetArgs, workdir="build/pypy/goal", *a, **kw): self.command = self.command + translationArgs + [ self.translationTarget ] + targetArgs ShellCommand.__init__(self, workdir, *a, **kw)
def __init__(self, **kwargs): self.filename = "" self.branch = "" if 'branch' in kwargs: self.branch = kwargs['branch'] if 'filename' in kwargs: self.filename = kwargs['filename'] if not 'command' in kwargs: kwargs['command'] = ["bash", "installdmg.sh", "$FILENAME"] ShellCommand.__init__(self, **kwargs)
def __init__(self, **kwargs): self.filename = "" self.branch = "" if 'branch' in kwargs: self.branch = kwargs['branch'] if 'filename' in kwargs: self.filename = kwargs['filename'] if not 'command' in kwargs: kwargs['command'] = ["tar", "-zvxf"] ShellCommand.__init__(self, **kwargs)