From 7359858b4c996d1172eda261b53fc0fedf0eddc3 Mon Sep 17 00:00:00 2001 From: mquinson Date: Tue, 11 Nov 2008 01:09:04 +0000 Subject: [PATCH 1/1] Add svn revision to build overall status in a new CleanupCommand, used in tester builders git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6024 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- build/buildbot/extensions.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/build/buildbot/extensions.py b/build/buildbot/extensions.py index 185f38670a..23e2b308e9 100644 --- a/build/buildbot/extensions.py +++ b/build/buildbot/extensions.py @@ -3,10 +3,14 @@ import re from buildbot.steps.source import SVN from buildbot.steps.shell import ShellCommand +from buildbot.steps.transfer import FileDownload from buildbot.status import builder from buildbot.status.builder import SUCCESS,FAILURE, EXCEPTION,WARNINGS +from buildbot.process.properties import WithProperties + + # Define a new builder status # Configure return the exit code 77 when the target platform don't # bear ucontext functionnality. In this case the CustomConfigure returns @@ -78,7 +82,19 @@ class CustomConfigure(ShellCommand): return [] +""" +Cleanup the build dir, and setup a SVN revision in the waterfall afterward +""" +class CleanupCommand(ShellCommand): + name="cleanup" + descriptionDone="cleanup" + command=["bash","-c","rm -rf * .svn"] + def maybeGetText2(self,cmd,results): + if self.build.getProperty("revision") == None: + return ["Missing svn revision"] + return ["SVN r%s" % self.build.getProperty("revision")] + """ Just like a plain SVN, but displays the current revision in the waterfall afterall """ @@ -97,7 +113,7 @@ class CustomSVN(SVN): lines = cmd.logs['stdio'].getText() r = re.search(' (\d+).',lines) if results == SUCCESS and r: - return ["SVN revision %s" % r.group(1)] + return ["SVN r%s" % r.group(1)] else: return [] -- 2.20.1