[Scummvm-cvs-logs] SF.net SVN: scummvm:[48960] buildbot/config
dhewg at users.sourceforge.net
dhewg at users.sourceforge.net
Thu May 6 20:54:56 CEST 2010
Revision: 48960
http://scummvm.svn.sourceforge.net/scummvm/?rev=48960&view=rev
Author: dhewg
Date: 2010-05-06 18:54:56 +0000 (Thu, 06 May 2010)
Log Message:
-----------
Split the configure step into two steps to make the waterfall page less confusing.
Modified Paths:
--------------
buildbot/config/master.cfg
buildbot/config/scumm.py
Modified: buildbot/config/master.cfg
===================================================================
--- buildbot/config/master.cfg 2010-05-05 21:59:37 UTC (rev 48959)
+++ buildbot/config/master.cfg 2010-05-06 18:54:56 UTC (rev 48960)
@@ -617,16 +617,17 @@
# Dynamic generated builders based on the platforms defined at the top of this file
+configure_path = "../../src-trunk/src/configure"
for name, config in scumm_platforms_trunk.items():
f = factory.BuildFactory()
f.useProgress = False
- f.addStep(scumm.Configure(command = [
- "../../src-trunk/src/configure",
- "--enable-all-engines"
- ] + config["configureargs"],
- env = config["env"]))
+ f.addStep(scumm.Prepare(configure = configure_path))
+ f.addStep(scumm.Configure(command = [ configure_path, "--enable-all-engines" ] +
+ config["configureargs"],
+ env = config["env"]))
+
f.addStep(Compile(command = [
"make",
"-j2",
@@ -658,14 +659,17 @@
"category": "trunk"
})
+configure_path = "../../src-branch/src/configure"
for name, config in scumm_platforms_branch.items():
f = factory.BuildFactory()
f.useProgress = False
- f.addStep(scumm.Configure(command = [
- "../../src-branch/src/configure"
- ] + config["configureargs"],
- env = config["env"]))
+ f.addStep(scumm.Prepare(configure = configure_path))
+
+ f.addStep(scumm.Configure(command = [ configure_path ] +
+ config["configureargs"],
+ env = config["env"]))
+
f.addStep(Compile(command = [
"make",
"-j2",
Modified: buildbot/config/scumm.py
===================================================================
--- buildbot/config/scumm.py 2010-05-05 21:59:37 UTC (rev 48959)
+++ buildbot/config/scumm.py 2010-05-06 18:54:56 UTC (rev 48960)
@@ -21,38 +21,62 @@
from string import join, capitalize, lower
-# Buildstep class for our build system. A ./configure run is forced on nightly builds,
-# which results in a full rebuild. For incremental builds, its only run when no
-# Makefile exists (which is generated by the script itself).
+# buildstep class to determine if a configure run is required
+# if the modification time of config.mk is newer that the one of
+# configure, the build property "skip_configure" is set
+class Prepare(ShellCommand):
+ name = "prepare"
+ haltOnFailure = 1
+ flunkOnFailure = 1
+ description = [ "preparing" ]
+ descriptionDone = [ "prepare" ]
+
+ def __init__(self, **kwargs):
+ self.configure = kwargs['configure']
+ del kwargs['configure']
+
+ ShellCommand.__init__(self, **kwargs)
+
+ self.addFactoryArguments(configure = self.configure)
+
+ def start(self):
+ self.command = "(stat --format=%%Y config.mk 2>/dev/null || echo 0); " \
+ "(stat --format=%%Y %s 2>/dev/null || echo 0)" % self.configure
+
+ ShellCommand.start(self)
+
+ def evaluateCommand(self, cmd):
+ lines = cmd.logs['stdio'].getText().split("\n")
+
+ try:
+ timestamp_mk = int(lines[0])
+ timestamp_conf = int(lines[1])
+ except:
+ return WARNINGS
+
+ if timestamp_mk >= timestamp_conf:
+ self.setProperty("skip_configure", True, "Prepare Step")
+
+ return SUCCESS
+
+# buildstep class to run the configure script
+# if the build property "skip_configure" is present, this step won't do anything
class Configure(ShellCommand):
name = "configure"
haltOnFailure = 1
flunkOnFailure = 1
description = [ "configuring" ]
descriptionDone = [ "configure" ]
- descriptionDoneSkipped = [ "configure", "(skipped)" ]
- skipped = False
def start(self):
properties = self.build.getProperties()
- self.command = "[ -f Makefile ] || " + " ".join(self.command)
+ if properties.has_key("skip_configure"):
+ return SKIPPED
ShellCommand.start(self)
- def commandComplete(self, cmd):
- if cmd.rc == 0 and len(cmd.logs["stdio"].getText()) < 1:
- self.skipped = True
-
- ShellCommand.commandComplete(self, cmd)
-
- def describe(self, done = False):
- if done and self.skipped:
- self.descriptionDone = self.descriptionDoneSkipped
-
- return ShellCommand.describe(self, done)
-
-# Small buildstep class to strip binaries, only done on nightly builds.
+# buildstep class to strip binaries, only done on nightly builds.
class Strip(ShellCommand):
name = "strip"
haltOnFailure = 1
@@ -68,7 +92,7 @@
ShellCommand.start(self)
-# Buildstep class to package binaries, only done on nightly builds.
+# buildstep class to package binaries, only done on nightly builds.
class Package(ShellCommand):
name = "package"
haltOnFailure = 1
@@ -141,6 +165,7 @@
ShellCommand.start(self)
+# buildstep class to wipe all build folders (eg "trunk-*") and to clear the ccache cache
class Clean(ShellCommand):
name = "clean"
haltOnFailure = 1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list