1 # jhbuild - a build script for GNOME 1.x and 2.x
2 # Copyright (C) 2008 Igalia S.L., John Carr, Frederic Peters
4 # factory.py: procedures to update, build and check modules
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 from buildbot
.process
import factory
21 from steps
import JHBuildSource
, JHBuildCommand
, JHBuildModulePathCommand
, JHBuildCheckCommand
23 class JHBuildFactory(factory
.BuildFactory
):
29 def __init__(self
, module
, slave
):
30 factory
.BuildFactory
.__init
__(self
)
31 self
.moduleset
= jhbuild_config
.moduleset
37 self
.addStep(JHBuildSource
, moduleset
=self
.moduleset
, module
=self
.module
)
38 self
.addStep(JHBuildCommand
, stage
='build', moduleset
=self
.moduleset
, module
=self
.module
)
39 if self
.slave
.run_checks
:
40 self
.addStep(JHBuildCheckCommand
, moduleset
=self
.moduleset
, module
=self
.module
)
41 if self
.slave
.run_coverage_report
:
42 self
.addStep(JHBuildModulePathCommand
, moduleset
=self
.moduleset
,
43 module
=self
.module
, action
='module-reports.sh',
44 actionName
='Coverage')
45 if self
.slave
.run_clean_afterwards
:
46 self
.addStep(JHBuildCommand
, stage
='clean', moduleset
=self
.moduleset
,
49 def newBuild(self
, request
):
50 return factory
.BuildFactory
.newBuild(self
, request
)