A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add svn revision to build overall status in a new CleanupCommand, used in tester...
[simgrid.git]
/
build
/
buildbot
/
extensions.py
diff --git
a/build/buildbot/extensions.py
b/build/buildbot/extensions.py
index
185f386
..
23e2b30
100644
(file)
--- 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
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.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
# 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 []
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
"""
"""
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:
lines = cmd.logs['stdio'].getText()
r = re.search(' (\d+).',lines)
if results == SUCCESS and r:
- return ["SVN r
evision
%s" % r.group(1)]
+ return ["SVN r%s" % r.group(1)]
else:
return []
else:
return []