* buildfactory.py (GNUBuildSystem.__init__)
(QMakeBuildSystem.__init__): Here.
---
buildbot/masters/ChangeLog | 7 +++++++
buildbot/masters/buildfactory.py | 22 ++++++++++++++++++++--
2 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/buildbot/masters/ChangeLog b/buildbot/masters/ChangeLog
index f7990fb..b27b032 100644
--- a/buildbot/masters/ChangeLog
+++ b/buildbot/masters/ChangeLog
@@ -1,3 +1,10 @@
+2011-09-12 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Support the generation of SCM statistics.
+
+ * buildfactory.py (GNUBuildSystem.__init__)
+ (QMakeBuildSystem.__init__): Here.
+
2011-01-13 Roland Levillain <roland(a)lrde.epita.fr>
Help seattle find Qt4 tools (qmake, moc, uic).
diff --git a/buildbot/masters/buildfactory.py b/buildbot/masters/buildfactory.py
index 632ea03..5e30e6f 100644
--- a/buildbot/masters/buildfactory.py
+++ b/buildbot/masters/buildfactory.py
@@ -52,7 +52,7 @@ class GNUBuildSystem(BuildFactory):
def __init__ (self, project_repos,
project_name="", kernel_path=None,
extra_configure_args="",
- scm_step="", bootstrap_cmd="",
configure_cmd="",
+ scm_step="", scmstats_cmd="",
bootstrap_cmd="", configure_cmd="",
compile_cmd="", check_cmd="",
install_cmd="",
install_dir=None, upload_cmd="", distcheck_cmd="",
distcheck_configure_args="", dist_cmd="",
extra_path=None,
@@ -122,6 +122,15 @@ class GNUBuildSystem(BuildFactory):
self.install_dir = install_dir
home_inst_path = '$HOME/built/' + self.install_dir
+ if scmstats_cmd == "":
+ self.scmstats_cmd = None
+ else:
+ self.scmstats_cmd = scmstats_cmd
+ if self.scmstats_cmd is not None:
+ self.addStep(step.ShellCommand, command=self.scmstats_cmd,
+ description='Updating SCM Stats',
+ descriptionDone='SCM Stats Updated',
name='scmstats_update')
+
if bootstrap_cmd == "":
self.bootstrap_cmd = './bootstrap'
else:
@@ -303,7 +312,7 @@ class QMakeBuildSystem(BuildFactory):
"""
def __init__ (self, project_repos,
- project_name="", extra_qmake_args="",
scm_step="",
+ project_name="", extra_qmake_args="",
scm_step="", scmstats_cmd=None,
bootstrap_cmd=None, configure_cmd="",
compile_cmd="",
check_cmd=None, install_cmd=None, install_dir=None,
upload_cmd=None, extra_path=None, branch=""):
@@ -356,6 +365,15 @@ class QMakeBuildSystem(BuildFactory):
description='bootstrapping',
descriptionDone='bootstrap', name='bootstrap')
+ if scmstats_cmd == "":
+ self.scmstats_cmd = None
+ else:
+ self.scmstats_cmd = ['lrde-scmstats.sh', '/tmp/built/' +
self.install_dir]
+ if self.scmstats_cmd is not None:
+ self.addStep(step.ShellCommand, command=self.scmstats_cmd,
+ description='Updating SCM Stats',
+ descriptionDone='SCM Stats Updated',
name='scmstats_update')
+
if configure_cmd == "":
self.configure_cmd = 'echo Using *.pro; qmake *.pro ' +
self.extra_qmake_args
else:
--
1.7.2.5