Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make so that the tester builders are trigered when makeDist one is done
[simgrid.git] / build / buildbot / master / master.cfg
index 81b87cf..1d0d41b 100644 (file)
@@ -18,7 +18,7 @@ c['projectURL']= "http://simgrid.gforge.inria.fr/"
 c['buildbotURL'] = "http://bob.loria.fr:8010/"
 
 # Gets bot from account module (hide passphrases)
 c['buildbotURL'] = "http://bob.loria.fr:8010/"
 
 # Gets bot from account module (hide passphrases)
-from account import slaves,all_slaves
+from account import slaves
 c['slaves'] = slaves
 
 # Port number used by slaves
 c['slaves'] = slaves
 
 # Port number used by slaves
@@ -29,7 +29,7 @@ c['slavePortnum'] = 9989
 ####################################################################################
 # builders declarations
 
 ####################################################################################
 # builders declarations
 
-from extensions import CustomSVN, CustomConfigure, CustomCheck
+from extensions import CustomSVN, CustomConfigure, CustomCheck, CleanupCommand
 from buildbot.process import factory
 from buildbot.steps.transfer import FileUpload,FileDownload
 from buildbot.steps.shell import ShellCommand
 from buildbot.process import factory
 from buildbot.steps.transfer import FileUpload,FileDownload
 from buildbot.steps.shell import ShellCommand
@@ -60,7 +60,7 @@ dist_factory.addStep(FileUpload(name="Upload archive",haltOnFailure = True,
 archive = "simgrid-3.3-svn-r%(revision:-)sM.tar.gz"
 # Test tarball factories
 pthreads_factory_O3= factory.BuildFactory()
 archive = "simgrid-3.3-svn-r%(revision:-)sM.tar.gz"
 # Test tarball factories
 pthreads_factory_O3= factory.BuildFactory()
-pthreads_factory_O3.addStep(ShellCommand,name="cleanup",descriptionDone="cleanup",command=["bash","-c","rm -rf * .svn"])
+pthreads_factory_O3.addStep(CleanupCommand)
 pthreads_factory_O3.addStep(FileDownload(name="get archive",haltOnFailure=True,slavedest=WithProperties(archive),mastersrc=WithProperties(archive)))
 pthreads_factory_O3.addStep(ShellCommand, name ="open archive",descriptionDone="open archive", command=["tar","xvfz",WithProperties(archive),"--strip","1"])
 pthreads_factory_O3.addStep(ShellCommand,name = "configure", description="running configure",   descriptionDone="configure",
 pthreads_factory_O3.addStep(FileDownload(name="get archive",haltOnFailure=True,slavedest=WithProperties(archive),mastersrc=WithProperties(archive)))
 pthreads_factory_O3.addStep(ShellCommand, name ="open archive",descriptionDone="open archive", command=["tar","xvfz",WithProperties(archive),"--strip","1"])
 pthreads_factory_O3.addStep(ShellCommand,name = "configure", description="running configure",   descriptionDone="configure",
@@ -71,7 +71,7 @@ pthreads_factory_O3.addStep(CustomCheck,name ="check all",        description =
                             haltOnFailure = True,command=["./checkall"])
                             
 ucontext_factory_O3= factory.BuildFactory()
                             haltOnFailure = True,command=["./checkall"])
                             
 ucontext_factory_O3= factory.BuildFactory()
-ucontext_factory_O3.addStep(ShellCommand,name="cleanup",descriptionDone="cleanup",command=["bash","-c","rm -rf * .svn"])
+ucontext_factory_O3.addStep(CleanupCommand)
 ucontext_factory_O3.addStep(FileDownload(name="get archive",haltOnFailure=True,slavedest=WithProperties(archive),mastersrc=WithProperties(archive)))
 ucontext_factory_O3.addStep(ShellCommand, name ="open archive",descriptionDone="open archive", command=["tar","xvfz",WithProperties(archive),"--strip","1"])
 ucontext_factory_O3.addStep(CustomConfigure,name ="configure",description="running configure",descriptionDone="configure",
 ucontext_factory_O3.addStep(FileDownload(name="get archive",haltOnFailure=True,slavedest=WithProperties(archive),mastersrc=WithProperties(archive)))
 ucontext_factory_O3.addStep(ShellCommand, name ="open archive",descriptionDone="open archive", command=["tar","xvfz",WithProperties(archive),"--strip","1"])
 ucontext_factory_O3.addStep(CustomConfigure,name ="configure",description="running configure",descriptionDone="configure",
@@ -90,61 +90,57 @@ windows_factory.addStep(ShellCommand,name = "{test suite}",description= "running
 
 # One lock per machine since some tests open sockets on fixed ports
 from buildbot import locks
 
 # One lock per machine since some tests open sockets on fixed ports
 from buildbot import locks
-bob_lock = locks.MasterLock("bob_lock")
 artimon_lock = locks.MasterLock("artimon_lock")
 fastnet_lock = locks.MasterLock("fastnet_lock")
 
 # builders
 artimon_lock = locks.MasterLock("artimon_lock")
 fastnet_lock = locks.MasterLock("fastnet_lock")
 
 # builders
-c['builders'] = [    
-     {'name':'distBuilder',
-     'slavename':'bob_dist',
-     'builddir':'/var/lib/buildbot/simgrid/dist-worker',
-     'factory':dist_factory},
+c['builders'] = []    
+c['builders'].append({'name':'distBuilder',
+                      'slavename':'bob_dist',
+                      'builddir':'/var/lib/buildbot/simgrid/dist-worker',
+                      'factory':dist_factory})
      
      
-     {'name':'linux_amd64_pthreads_O3',
-     'slavename':'bob',
-     'builddir':'/var/lib/buildbot/simgrid/linux_amd64_pthreads/builddir_O3',
-     'factory':pthreads_factory_O3},
-       
-     {'name':'linux_amd64_ucontext_O3',
-     'slavename':'bob',
-     'builddir':'/var/lib/buildbot/simgrid/linux_amd64_ucontext/builddir_O3',
-     'factory':ucontext_factory_O3},
+c['builders'].append({'name':'linux_amd64_pth',
+                       'slavename':'bob',
+                       'builddir':'/var/lib/buildbot/simgrid/linux_amd64_pthreads/builddir_O3',
+                       'factory':pthreads_factory_O3})
+c['builders'].append({'name':'linux_amd64_uctx',
+                      'slavename':'bob',
+                      'builddir':'/var/lib/buildbot/simgrid/linux_amd64_ucontext/builddir_O3',
+                      'factory':ucontext_factory_O3})
+
+                      
+c['builders'].append({'name':'linux_i386_pth',
+                      'slavename':'artimon_pthreads',
+                      'builddir':'/var/lib/buildbot/simgrid/linux_i386_pthreads/builddir_O3',
+                      'factory':pthreads_factory_O3,
+                      'locks': [artimon_lock]})
+c['builders'].append({'name':'linux_i386_uctx',
+                      'slavename':'artimon_ucontext',
+                      'builddir':'/var/lib/buildbot/simgrid/linux_i386_ucontext/builddir_O3',
+                      'factory':ucontext_factory_O3,
+                      'locks': [artimon_lock]})
      
      
-     {'name':'linux_i386_pthreads_O3',
-     'slavename':'artimon_pthreads',
-     'builddir':'/var/lib/buildbot/simgrid/linux_i386_pthreads/builddir_O3',
-     'factory':pthreads_factory_O3,
-     'locks': [artimon_lock]},
-              
-     {'name':'linux_i386_ucontext_O3',
-     'slavename':'artimon_ucontext',
-     'builddir':'/var/lib/buildbot/simgrid/linux_i386_ucontext/builddir_O3',
-     'factory':ucontext_factory_O3,
-     'locks': [artimon_lock]},
+c['builders'].append({'name':'mac_osx_pth',
+                      'slavename':'fastnet_pthreads',
+                      'builddir':'/var/buildbot/simgrid/mac_os_x_pthreads/builddir',
+                      'factory':pthreads_factory_O3})
+# Next one not very interesting: it constitently fails (arch not supported yet)                      
+#c['builders'].append({'name':'mac_os_x_ucontext',
+#                      'slavename':'fastnet',    
+#                      'factory':ucontext_factory_O3,
+#                      'builddir':'/var/buildbot/simgrid/mac_os_x_ucontext/builddir',
+#                      'locks': [fastnet_lock]})
      
      
-     
-     
-     {'name':'mac_os_x_pthreads',
-     'slavename':'fastnet_pthreads',
-     'builddir':'/var/buildbot/simgrid/mac_os_x_pthreads/builddir',
-     'factory':pthreads_factory_O3,
-     'locks': [fastnet_lock]},
-       
-     {'name':'mac_os_x_ucontext',
-     'slavename':'fastnet_ucontext',    
-     'factory':ucontext_factory_O3,
-     'builddir':'/var/buildbot/simgrid/mac_os_x_ucontext/builddir',
-     'locks': [fastnet_lock]},
-     
-     
-     
-     {'name':'windows_builder',
-     'slavename':'windows_slave',
-     'builddir':"C:\\buildslave\\projects\\simgrid\\builddir",
-     'factory':windows_factory}
-     ]
+c['builders'].append({'name':'windows_builder',
+                      'slavename':'windows_slave',
+                      'builddir':"C:\\buildslave\\projects\\simgrid\\builddir",
+                      'factory':windows_factory})
+
 
 
+test_builders = [b['name'] for b in c['builders']]
+test_builders.sort()
+test_builders.remove("distBuilder")
 
 ####### CHANGESOURCES
 
 
 ####### CHANGESOURCES
 
@@ -153,13 +149,18 @@ from buildbot.changes.svnpoller import SVNPoller
 c['change_source'] = SVNPoller("svn://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk", pollinterval=600)
 
 # Once we have a change, build a tarball
 c['change_source'] = SVNPoller("svn://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk", pollinterval=600)
 
 # Once we have a change, build a tarball
-
 from buildbot import scheduler
 from buildbot import scheduler
-maketarball = scheduler.Scheduler(name="maketarball", branch=None, treeStableTimer=60, builderNames=['distBuilder'])
 
 
-c['schedulers'] = [maketarball]
+c['schedulers'] = []
+c['schedulers'].append( scheduler.Scheduler(name="maketarball", branch=None, treeStableTimer=60, builderNames=['distBuilder']) )
 
 
+# and build everything afterward, when the archive is builded
+c['schedulers'].append( scheduler.Triggerable(name="run tests", builderNames=test_builders) )
 
 
+from buildbot.steps import trigger
+dist_factory.addStep(trigger.Trigger(schedulerNames=['run tests'], waitForFinish=False,
+                                     set_properties={"revision":WithProperties("%(got_revision)s"),
+                                                     "got_revision":WithProperties("%(got_revision)s")}))
 # status targets
 
 c['status'] = []
 # status targets
 
 c['status'] = []