1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 from buildbot import interfaces, util
17 from buildbot.process.build import Build
18 from buildbot.steps.source import CVS, SVN
19 from buildbot.steps.shell import Configure, Compile, Test, PerlModuleTest
20
22 """When calling BuildFactory.addStep(stepinstance), addStep() only takes
23 one argument. You passed extra arguments to addStep(), which you probably
24 intended to pass to your BuildStep constructor instead. For example, you
25 should do::
26
27 f.addStep(ShellCommand(command=['echo','stuff'], haltOnFailure=True))
28
29 instead of::
30
31 f.addStep(ShellCommand(command=['echo','stuff']), haltOnFailure=True)
32 """
33
35 """
36 @cvar buildClass: class to use when creating builds
37 @type buildClass: L{buildbot.process.build.Build}
38 """
39 buildClass = Build
40 useProgress = 1
41 workdir = "build"
42 compare_attrs = ['buildClass', 'steps', 'useProgress', 'workdir']
43
48
60
63
67
68
69
71 - def __init__(self, source, configure="./configure",
72 configureEnv={},
73 configureFlags=[],
74 compile=["make", "all"],
75 test=["make", "check"]):
95
96 -class CPAN(BuildFactory):
97 - def __init__(self, source, perl="perl"):
102
104 - def __init__(self, source, python="python", test=None):
109
110 -class Trial(BuildFactory):
111 """Build a python module that uses distutils and trial. Set 'tests' to
112 the module in which the tests can be found, or set useTestCaseNames=True
113 to always have trial figure out which tests to run (based upon which
114 files have been changed).
115
116 See docs/factories.xhtml for usage samples. Not all of the Trial
117 BuildStep options are available here, only the most commonly used ones.
118 To get complete access, you will need to create a custom
119 BuildFactory."""
120
121 trial = "trial"
122 randomly = False
123 recurse = False
124
125 - def __init__(self, source,
126 buildpython=["python"], trialpython=[], trial=None,
127 testpath=".", randomly=None, recurse=None,
128 tests=None, useTestCaseNames=False, env=None):
129 BuildFactory.__init__(self, [source])
130 assert tests or useTestCaseNames, "must use one or the other"
131 if trial is not None:
132 self.trial = trial
133 if randomly is not None:
134 self.randomly = randomly
135 if recurse is not None:
136 self.recurse = recurse
137
138 from buildbot.steps.python_twisted import Trial
139 buildcommand = buildpython + ["./setup.py", "build"]
140 self.addStep(Compile, command=buildcommand, env=env)
141 self.addStep(Trial,
142 python=trialpython, trial=self.trial,
143 testpath=testpath,
144 tests=tests, testChanges=useTestCaseNames,
145 randomly=self.randomly,
146 recurse=self.recurse,
147 env=env,
148 )
149
150
151
152
153
154
155 ConfigurableBuildFactory = BuildFactory
156
158
159
160 - def __init__(self, cvsroot, cvsmodule,
161 configure=None, configureEnv={},
162 compile="make all",
163 test="make check", cvsCopy=False):
172
174 useProgress = False
175
176 - def __init__(self, cvsroot, cvsmodule,
177 configure=None, configureEnv={},
178 compile="make all",
179 test="make check", cvsCopy=False):
186
188
189 - def __init__(self, svnurl,
190 configure=None, configureEnv={},
191 compile="make all",
192 test="make check"):
198