]> AND Public Git Repository - simgrid.git/blobdiff - build/buildbot/extensions.py
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Added parameters to indicate flow id, so unique flows use a reliable msg_task_send...
[simgrid.git] / build / buildbot / extensions.py
index 22717b7ee2b168852dac7b7bf2ce482a009b6761..23e2b308e9096e494ec33a0979b8c229d77fb6e7 100644 (file)
@@ -1,11 +1,16 @@
 
 
 import re        
-from buildbot.process import step
-from buildbot.process.step import ShellCommand, SVN
+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
@@ -77,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
 """
@@ -96,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 []