|
Boost-Commit : |
From: grafikrobot_at_[hidden]
Date: 2007-08-13 02:12:15
Author: grafik
Date: 2007-08-13 02:11:14 EDT (Mon, 13 Aug 2007)
New Revision: 38615
URL: http://svn.boost.org/trac/boost/changeset/38615
Log:
SVN update and bjam build commands working.
Text files modified:
trunk/tools/buildbot/config/master/alpha/master.cfg | 4
trunk/tools/buildbot/src/boost/bot/factory.py | 131 +++++++++++++++++++--------------------
trunk/tools/buildbot/src/boost/bot/remote.py | 13 ++-
trunk/tools/buildbot/src/boost/bot/step.py | 23 ++++--
trunk/tools/buildbot/src/buildbot.py | 4 +
5 files changed, 95 insertions(+), 80 deletions(-)
Modified: trunk/tools/buildbot/config/master/alpha/master.cfg
==============================================================================
--- trunk/tools/buildbot/config/master/alpha/master.cfg (original)
+++ trunk/tools/buildbot/config/master/alpha/master.cfg 2007-08-13 02:11:14 EDT (Mon, 13 Aug 2007)
@@ -40,7 +40,9 @@
from boost.bot.factory import Boost_BuildFactory, action
factoryFull = Boost_BuildFactory(
- action('svn',root='http://svn.boost.org/svn/boost/')
+ action('svn',root='http://svn.boost.org/svn/boost/'),
+ action('bjam_build'),
+ action('test_tools_build', toolset='gcc')
)
c['builders'] = []
Modified: trunk/tools/buildbot/src/boost/bot/factory.py
==============================================================================
--- trunk/tools/buildbot/src/boost/bot/factory.py (original)
+++ trunk/tools/buildbot/src/boost/bot/factory.py 2007-08-13 02:11:14 EDT (Mon, 13 Aug 2007)
@@ -96,7 +96,7 @@
def action_tarball(self,b,*args,**kwargs):
return (
- [ s( boost.buildbot.step.Tarball
+ [ s( boost.bot.step.Tarball
,description = kwargs.get('description')
,archive = kwargs.get('archive',b.workdir)
,publishdir = kwargs['publishdir']
@@ -107,7 +107,7 @@
def action_selfupdate(self,b,*args,**kwargs):
return (
- [ s( boost.buildbot.step.SelfUpdate
+ [ s( boost.bot.step.SelfUpdate
,description = kwargs.get('description')
,**defaults(**kwargs)
) ],
@@ -115,10 +115,10 @@
def action_bjam_build(self,b,*args,**kwargs):
return (
- [ s( boost.buildbot.step.Boost_Jam_Build
+ [ s( boost.bot.step.Boost_Jam_Build
,description = kwargs.get('description')
,workdir = b.workdir
- ,jam_src = kwargs.get('jam_src','tools/build/jam_src')
+ ,jam_src = kwargs.get('jam_src','tools/jam/src')
,toolset = kwargs.get('toolset',None)
,**defaults(**kwargs)
) ],
@@ -126,14 +126,14 @@
def action_bjam(self,b,*args,**kwargs):
return (
- [ s( boost.buildbot.step.Boost_Jam
+ [ s( boost.bot.step.Boost_Jam
,description = kwargs.get('description')
,workdir = b.workdir
- ,bjam = kwargs.get('bjam','tools/build/jam_src/bin/bjam')
+ ,bjam = kwargs.get('bjam','tools/jam/src/bin/bjam')
,project = kwargs.get('project','.')
,options = kwargs.get('options',[])
,target = kwargs.get('target','all')
- ,locate = kwargs.get('locate','build')
+ ,locate = kwargs.get('locate','results')
,env = kwargs.get('env',{})
,logfile = kwargs.get('logfile',False)
,**defaults(**kwargs)
@@ -145,22 +145,21 @@
,description = kwargs.get('description',['test tools','build'])
,project = 'tools/regression/build'
,options = [
- '-sBUILD=release',
- '-sTOOLS=%s' % kwargs['toolset']
+ 'toolset=%s' % kwargs['toolset']
] + kwargs.get('options',[])
- ,target = 'run'
- ,locate = kwargs.get('locate','build')
+ ,target = 'release'
+ ,locate = kwargs.get('locate','results')
,env = kwargs.get('env',{})
,**defaults(**kwargs)
)
def action_btest(self,b,*args,**kwargs):
return (
- [ s( boost.buildbot.step.Boost_Test
+ [ s( boost.bot.step.Boost_Test
,description = kwargs.get('description')
,workdir = b.workdir
,tests = kwargs.get('tests',['.*'])
- ,bjam = kwargs.get('bjam','tools/build/jam_src/bin/bjam')
+ ,bjam = kwargs.get('bjam','tools/jam/src/bin/bjam')
,project = kwargs.get('project','status')
,options = kwargs.get('options',[
'--dump-tests',
@@ -169,7 +168,7 @@
'-sTOOLS=%s' % kwargs['toolset']
] + kwargs.get('options',[]))
,target = 'nothing'
- ,locate = kwargs.get('locate','build')
+ ,locate = kwargs.get('locate','results')
,env = kwargs.get('env',{})
,logfile = kwargs.get('logfile','bjam.log')
,**defaults(**kwargs)
@@ -187,7 +186,7 @@
'-sTOOLS=%s' % kwargs['toolset']
] + kwargs.get('options',[])
,target = 'test'
- ,locate = kwargs.get('locate','build')
+ ,locate = kwargs.get('locate','results')
,env = kwargs.get('env',{})
,logfile = kwargs.get('logfile','bjam.log')
,files = kwargs.get('files',['boost.*','libs.*','status.*'])
@@ -196,11 +195,11 @@
def action_process_jam_log(self,b,*args,**kwargs):
return (
- [ s( boost.buildbot.step.Boost_Process_Jam_Log
+ [ s( boost.bot.step.Boost_Process_Jam_Log
,description = kwargs.get('description',['process log'])
,workdir = b.workdir
,projcess_jam_log = kwargs.get('projcess_jam_log','tools/regression/build/run/process_jam_log')
- ,locate = kwargs.get('locate','build')
+ ,locate = kwargs.get('locate','results')
,logfile = kwargs.get('logfile','bjam.log')
,**defaults(**kwargs)
) ],
@@ -208,10 +207,10 @@
def action_collect_results(self,b,*args,**kwargs):
return (
- [ s( boost.buildbot.step.Boost_Collect_Results
+ [ s( boost.bot.step.Boost_Collect_Results
,description = kwargs.get('description')
,workdir = b.workdir
- ,locate = kwargs.get('locate',b.options.get('locate','build'))
+ ,locate = kwargs.get('locate',b.options.get('locate','results'))
,runner = kwargs['runner']
,branch = kwargs['branch']
,source_type = kwargs['source_type']
@@ -221,10 +220,10 @@
def action_publish_results(self,b,*args,**kwargs):
return (
- [ s( boost.buildbot.step.Boost_Publish_Results
+ [ s( boost.bot.step.Boost_Publish_Results
,description = kwargs.get('description')
,workdir = b.workdir
- ,locate = kwargs.get('locate',b.options.get('locate','build'))
+ ,locate = kwargs.get('locate',b.options.get('locate','results'))
,runner = kwargs['runner']
,branch = kwargs['branch']
,source_type = kwargs['source_type']
@@ -241,55 +240,55 @@
self.important_files = []
self.important_re = None
- def isFileImportant(self, filename):
- if self.important_re == None:
- self.important_re = []
- for file in self.important_files:
- self.important_re.append(re.compile(file))
- for file_re in self.important_re:
- if file_re.search(filename):
- return 1;
- return 0
+ #~ def isFileImportant(self, filename):
+ #~ if self.important_re == None:
+ #~ self.important_re = []
+ #~ for file in self.important_files:
+ #~ self.important_re.append(re.compile(file))
+ #~ for file_re in self.important_re:
+ #~ if file_re.search(filename):
+ #~ return 1;
+ #~ return 0
def setOptions(self,options = {}):
self.options = options or {}
self.workdir = self.options.get('workdir','build')
- def setupBuild(self, expectations):
- #~ Hack the stamp as an allowed arg for steps.
- if 'stamp' not in buildbot.process.buildstep.BuildStep.parms:
- buildbot.process.buildstep.BuildStep.parms.append('stamp')
+ #~ def setupBuild(self, expectations):
+ #~ # Hack the stamp as an allowed arg for steps.
+ #~ if 'stamp' not in buildbot.process.buildstep.BuildStep.parms:
+ #~ buildbot.process.buildstep.BuildStep.parms.append('stamp')
- return buildbot.process.base.Build.setupBuild(self,expectations)
+ #~ return buildbot.process.base.Build.setupBuild(self,expectations)
- def getNextStep(self):
- s = buildbot.process.base.Build.getNextStep(self)
- if s:
- #~ Add a stamp arg for the steps to use as needed.
- stamp = self._get_stamp()
- s.stamp = stamp
- if hasattr(s,'cmd'):
- if hasattr(s.cmd,'args'):
- s.cmd.args.update( { 'stamp' : stamp } )
- return s
-
- def _get_stamp(self):
- #~ The default is to use the revision sequence as the "time".
- #~ If not available, because of a forced build for example, we
- #~ use the current time.
- stamp = time.strftime( '%Y-%m-%dT%H:%M:%S', time.gmtime() )
- revision, patch = self.getSourceStamp()
- if not revision:
- changes = self.allChanges()
- if changes:
- last_change_time = max([c.when for c in changes])
- last_change_revision = max([c.revision for c in changes])
- #~ Prefer using the revision change if present. If it's not
- #~ it's likely a CVS like time sequence, so use the time sequence
- #~ int that case (adjusted with the tree timer).
- if last_change_revision:
- stamp = last_change_revision
- else:
- stamp = time.strftime( '%Y-%m-%dT%H:%M:%S',
- time.gmtime(last_change_time + self.treeStableTimer / 2) )
- return stamp
+ #~ def getNextStep(self):
+ #~ s = buildbot.process.base.Build.getNextStep(self)
+ #~ if s:
+ #~ # Add a stamp arg for the steps to use as needed.
+ #~ stamp = self._get_stamp()
+ #~ s.stamp = stamp
+ #~ if hasattr(s,'cmd'):
+ #~ if hasattr(s.cmd,'args'):
+ #~ s.cmd.args.update( { 'stamp' : stamp } )
+ #~ return s
+
+ #~ def _get_stamp(self):
+ #~ # The default is to use the revision sequence as the "time".
+ #~ # If not available, because of a forced build for example, we
+ #~ # use the current time.
+ #~ stamp = time.strftime( '%Y-%m-%dT%H:%M:%S', time.gmtime() )
+ #~ revision, patch = self.getSourceStamp()
+ #~ if not revision:
+ #~ changes = self.allChanges()
+ #~ if changes:
+ #~ last_change_time = max([c.when for c in changes])
+ #~ last_change_revision = max([c.revision for c in changes])
+ #~ # Prefer using the revision change if present. If it's not
+ #~ # it's likely a CVS like time sequence, so use the time sequence
+ #~ # int that case (adjusted with the tree timer).
+ #~ if last_change_revision:
+ #~ stamp = last_change_revision
+ #~ else:
+ #~ stamp = time.strftime( '%Y-%m-%dT%H:%M:%S',
+ #~ time.gmtime(last_change_time + self.treeStableTimer / 2) )
+ #~ return stamp
Modified: trunk/tools/buildbot/src/boost/bot/remote.py
==============================================================================
--- trunk/tools/buildbot/src/boost/bot/remote.py (original)
+++ trunk/tools/buildbot/src/boost/bot/remote.py 2007-08-13 02:11:14 EDT (Mon, 13 Aug 2007)
@@ -253,10 +253,10 @@
class Command_Boost_Jam(NoOpCommand):
def start(self):
+ _builddir = os.path.normpath(os.path.join(
+ self.builder.basedir,self.args.get('locate','results')))
_env = self.args.get('env',{})
_env.update({
- 'ALL_LOCATE_TARGET': os.path.normpath(os.path.join(
- self.builder.basedir,self.args.get('locate','build'))),
'BOOST_BUILD_PATH': "%s:%s:%s" % (
os.path.normpath(self.builder.basedir),
os.path.normpath(os.path.join(self.builder.basedir,'..')),
@@ -265,7 +265,7 @@
_logfile = False
if self.args.get('logfile'):
_logfile = os.path.normpath(os.path.join(
- _env['ALL_LOCATE_TARGET'],self.args['logfile']))
+ _builddir,self.args['logfile']))
return self._start( "boost.bjam",
c( self.doBJam
,bjam = os.path.normpath(os.path.join(self.builder.basedir,
@@ -273,6 +273,7 @@
,project = os.path.normpath(os.path.join(self.builder.basedir,
self.args['workdir'], self.args.get('project','.')))
,options = self.args.get('options',[])
+ ,builddir = _builddir
,target = self.args.get('target','all')
,env = _env
,logfile = _logfile
@@ -289,7 +290,11 @@
for item in env.items():
self.stdout(" %s = '%s'" % item)
- command = [ kwargs['bjam'] ] + kwargs['options'] + [ kwargs['target'] ]
+ command = \
+ [ kwargs['bjam'] ] \
+ + [ '--build-dir=%s' % (kwargs['builddir']) ] \
+ + kwargs['options'] \
+ + [ kwargs['target'] ]
self.command = LoggedShellCommand(self.builder
,command
,kwargs['project']
Modified: trunk/tools/buildbot/src/boost/bot/step.py
==============================================================================
--- trunk/tools/buildbot/src/boost/bot/step.py (original)
+++ trunk/tools/buildbot/src/boost/bot/step.py 2007-08-13 02:11:14 EDT (Mon, 13 Aug 2007)
@@ -6,6 +6,7 @@
# http://www.boost.org/LICENSE_1_0.txt)
from buildbot.steps.shell import ShellCommand
+from buildbot.process.buildstep import LoggedRemoteCommand
import re
import string
import twisted.python
@@ -13,17 +14,21 @@
class command_base(ShellCommand):
def __init__(self, _name, _description, **kwargs):
if kwargs.get('name'): _name = kwargs.get('name')
- if kwargs.get('description'): _description = kwargs.get('description')
-
+ if not kwargs.get('description'): kwargs['description'] = _description
ShellCommand.__init__(self,**kwargs)
-
self.name = _name
- self.description = _description
-
- #~ if kwargs.has_key('name'): del kwargs['name']
- #~ if kwargs.has_key('description'): del kwargs['description']
- #~ if kwargs.has_key('build'): del kwargs['build']
- #~ self.cmd = buildbot.process.step.LoggedRemoteCommand(_name,kwargs)
+
+ def start(self):
+ #~ command = self._interpolateProperties(self.command)
+ #~ assert isinstance(command, (list, tuple, str))
+ kwargs = self.remote_kwargs
+ #~ kwargs['command'] = command
+ if kwargs.get('env'): kwargs['env'] = kwargs['env'].copy()
+ kwargs['logfiles'] = self.logfiles
+ cmd = LoggedRemoteCommand(self.name,kwargs)
+ self.setupEnvironment(cmd)
+ self.checkForOldSlaveAndLogfiles()
+ self.startCommand(cmd)
class SelfUpdate(command_base):
def __init__(self, **kwargs):
Modified: trunk/tools/buildbot/src/buildbot.py
==============================================================================
--- trunk/tools/buildbot/src/buildbot.py (original)
+++ trunk/tools/buildbot/src/buildbot.py 2007-08-13 02:11:14 EDT (Mon, 13 Aug 2007)
@@ -60,6 +60,10 @@
'^Twisted[^/]+/zope.interface-[^/]+/src/zope/$' }
)
+#~ Since we have our own extra slave commands they have to loaded before
+#~ starting the slave deamon.
+if len(sys.argv) > 1 and sys.argv[1] == 'start':
+ import boost.bot.remote
#~ And run the buildbot frontend script.
from buildbot.scripts import runner
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk