Trees | Indices | Help |
|
---|
|
1 # This file is part of Buildbot. Buildbot is free software: you can 2 # redistribute it and/or modify it under the terms of the GNU General Public 3 # License as published by the Free Software Foundation, version 2. 4 # 5 # This program is distributed in the hope that it will be useful, but WITHOUT 6 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 # details. 9 # 10 # You should have received a copy of the GNU General Public License along with 11 # this program; if not, write to the Free Software Foundation, Inc., 51 12 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 # 14 # Copyright Buildbot Team Members 15 16 17 # Build classes specific to the Twisted codebase 18 19 from buildbot.process.base import Build 20 from buildbot.process.factory import BuildFactory 21 from buildbot.steps import shell 22 from buildbot.steps.python_twisted import HLint, ProcessDocs, BuildDebs, \ 23 Trial, RemovePYCs 24 3335 tests = "twisted" 36 # the Trial in Twisted >=2.1.0 has --recurse on by default, and -to 37 # turned into --reporter=bwverbose . 38 recurse = False 39 trialMode = ["--reporter=bwverbose"] 40 testpath = None 41 trial = "./bin/trial"4244 buildClass = TwistedBuild 45 # bin/trial expects its parent directory to be named "Twisted": it uses 46 # this to add the local tree to PYTHONPATH during tests 47 workdir = "Twisted" 485153 treeStableTimer = 30 54 useProgress = 0 556657 TwistedBaseFactory.__init__(self, source) 58 if type(python) is str: 59 python = [python] 60 self.addStep(HLint, python=python[0]) 61 self.addStep(RemovePYCs) 62 for p in python: 63 cmd = [p, "setup.py", "build_ext", "-i"] 64 self.addStep(shell.Compile, command=cmd, flunkOnFailure=True) 65 self.addStep(TwistedTrial, python=p, testChanges=True)68 treeStableTimer = 5*60 698770 - def __init__(self, source, python="python", 71 processDocs=False, runTestsRandomly=False, 72 compileOpts=[], compileOpts2=[]):73 TwistedBaseFactory.__init__(self, source) 74 if processDocs: 75 self.addStep(ProcessDocs) 76 77 if type(python) == str: 78 python = [python] 79 assert isinstance(compileOpts, list) 80 assert isinstance(compileOpts2, list) 81 cmd = (python + compileOpts + ["setup.py", "build_ext"] 82 + compileOpts2 + ["-i"]) 83 84 self.addStep(shell.Compile, command=cmd, flunkOnFailure=True) 85 self.addStep(RemovePYCs) 86 self.addStep(TwistedTrial, python=python, randomly=runTestsRandomly)89 treeStableTimer = 10*60 909592 TwistedBaseFactory.__init__(self, source) 93 self.addStep(ProcessDocs, haltOnFailure=True) 94 self.addStep(BuildDebs, warnOnWarnings=True)97 treeStableTimer = 5*60 9813499 - def __init__(self, source, 100 python="python", compileOpts=[], compileOpts2=[], 101 reactors=None):102 TwistedBaseFactory.__init__(self, source) 103 104 if type(python) == str: 105 python = [python] 106 assert isinstance(compileOpts, list) 107 assert isinstance(compileOpts2, list) 108 cmd = (python + compileOpts + ["setup.py", "build_ext"] 109 + compileOpts2 + ["-i"]) 110 111 self.addStep(shell.Compile, command=cmd, warnOnFailure=True) 112 113 if reactors == None: 114 reactors = [ 115 'gtk2', 116 'gtk', 117 #'kqueue', 118 'poll', 119 'c', 120 'qt', 121 #'win32', 122 ] 123 for reactor in reactors: 124 flunkOnFailure = 1 125 warnOnFailure = 0 126 #if reactor in ['c', 'qt', 'win32']: 127 # # these are buggy, so tolerate failures for now 128 # flunkOnFailure = 0 129 # warnOnFailure = 1 130 self.addStep(RemovePYCs) # TODO: why? 131 self.addStep(TwistedTrial, name=reactor, python=python, 132 reactor=reactor, flunkOnFailure=flunkOnFailure, 133 warnOnFailure=warnOnFailure)
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Dec 19 18:26:52 2010 | http://epydoc.sourceforge.net |