[Buildbot-devel] Few things I'd like ...
Greg Ward
gerg.ward+buildbot at gmail.com
Tue Jul 24 13:08:51 UTC 2007
[Frédéric posts a patch for running autogen]
> I joined a patch for this one. It works, but review is welcome.
OK. Better late than never.
@@ -54,11 +54,15 @@ class GNUAutoconf(BuildFactory):
def __init__(self, source, configure="./configure",
configureEnv={},
configureFlags=[],
+ autogen=None,
compile=["make", "all"],
test=["make", "check"]):
assert isinstance(source, tuple)
assert issubclass(source[0], BuildStep)
BuildFactory.__init__(self, [source])
+ # for some project, we need to generate configure
+ if autogen is not None:
+ self.addStep(Autogen, command=autogen)
[...]
+class Autogen(ShellCommand):
+
+ name = "autogen"
+ haltOnFailure = 1
+ description = ["autogen..."]
+ descriptionDone = ["autogen"]
+ command = ["./autogen.sh"]
Two comments:
1) isn't having a default 'command' attribute in Autogen
semi-pointless, since you always instantiate it with a 'command'
argument? (OTOH, I suppose this makes it easier for people outside of
GNUAutoconf.__init__() to instantiate Autogen.)
2) wouldn't it be more powerful and general if the 'autogen' argument
to GNUAutoconf.__init__() were a BuildStep object rather than a
command? I don't know precisely how you use it now, but I assume it's
something like
factory = GNUAutoconf(..., autogen=["./autogen.sh"], ...)
which pretty much limits you to what your Autogen build step can do.
But if you were allowed to pass any BuildStep object, that call would
become
factory = GNUAutoconf(..., autogen=Autogen(), ...)
which is less typing, less specific knowledge about how to invoke
autogen.sh, and more general. And it makes my comment #1 irrelevant,
since now the default Autogen.command is very sensible and useful.
Greg
P.S. I don't see a ticket for this in the buildbot trac system.
More information about the devel
mailing list