[llvm-commits] [zorg] r125159 - in /zorg/trunk/buildbot/llvmlab/master/config: builders.py schedulers.py

David Dean david_dean at apple.com
Tue Feb 8 18:53:36 PST 2011


Author: ddean
Date: Tue Feb  8 20:53:36 2011
New Revision: 125159

URL: http://llvm.org/viewvc/llvm-project?rev=125159&view=rev
Log:
address a majority of Daniel's style nits

Modified:
    zorg/trunk/buildbot/llvmlab/master/config/builders.py
    zorg/trunk/buildbot/llvmlab/master/config/schedulers.py

Modified: zorg/trunk/buildbot/llvmlab/master/config/builders.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/llvmlab/master/config/builders.py?rev=125159&r1=125158&r2=125159&view=diff
==============================================================================
--- zorg/trunk/buildbot/llvmlab/master/config/builders.py (original)
+++ zorg/trunk/buildbot/llvmlab/master/config/builders.py Tue Feb  8 20:53:36 2011
@@ -6,24 +6,22 @@
 from buildbot.steps import source
 
 def setProperty(f, new_property, new_value):
-    f.addStep(buildbot.steps.shell.SetProperty(
-                                               command=['echo', new_value],
+    f.addStep(buildbot.steps.shell.SetProperty(command=['echo', new_value],
                                                property=new_property,
-                                               description=['set property', new_property],
-                                               ))
+                                               description=['set property', new_property]))
     return f
 
-def pullsrc(f, repo_name, URL, dir, pull_mode='clobber', def_branch='trunk', UseLatest='False'):
-    f.addStep(source.SVN(name='pull ' + repo_name,
+# This serves as a generic method to pull different repositories.
+def pullsrc(f, repo_name, URL, dir, pull_mode='clobber', def_branch='trunk', UseLatest=False):
+    f.addStep(source.SVN(name='pull.' + repo_name,
                          mode=pull_mode,
                          baseURL=URL,
-                         defaultBranch=def_branch, workdir=dir, always_purge='True'
-                        ))
+                         defaultBranch=def_branch, workdir=dir, always_purge=True,
+                         alwaysUseLatest=UseLatest))
     return f
 
-
 def pullClang(f):
-   pullsrc(f, 'clang', 'http://llvm.org/svn/llvm-project/cfe/', 'llvm/tools/clang', )
+   pullsrc(f, 'clang', 'http://llvm.org/svn/llvm-project/cfe/', 'llvm/tools/clang')
    return f
 
 def pullllvm(f):
@@ -31,57 +29,50 @@
    return f
 
 def pulltest_suite(f):
-   pullsrc(f, 'llvm tests', 'http://llvm.org/svn/llvm-project/test-suite/', 'test-suite', 'clobber', 'trunk', 'True')
+   pullsrc(f, 'llvm tests', 'http://llvm.org/svn/llvm-project/test-suite/', 'test-suite', 
+           'clobber', 'trunk', 'True')
    return f
 
 def pullclang_tests(f):
    pullsrc(f, 'clang tests', 'http://llvm.org/svn/llvm-project/clang-tests/', 'test-suite')
    return f
 
-def pulllibcxx(f):
-   pullsrc(f, 'libc++', 'http://llvm.org/svn/llvm-project/libcxx/', 'libcxx')
-   return f
-
 def pullboostrunner(f):
-#alwaysUseLatest
-#pullsrc(f, 'boost runner', 'http://svn.boost.org/svn/boost/%%BRANCH%%/tools/regression/src/', 'boost_runner')
-    f.addStep(source.SVN(name='pull boost runner',
-                         mode='clobber',
-                         baseURL='http://svn.boost.org/svn/boost/%%BRANCH%%/tools/regression/src/',
-                         defaultBranch='trunk', workdir='boost_runner', alwaysUseLatest='True',
-                        ))
+    pullsrc(f, 'boost.runner', 'http://svn.boost.org/svn/boost/%%BRANCH%%/tools/regression/src/', 
+            'boost_runner', 'clobber', 'trunk', 'True')
     return f
 
 def getBuildDir(f):
-    f.addStep(buildbot.steps.shell.SetProperty(name='get_builddir',
+    f.addStep(buildbot.steps.shell.SetProperty(name='get.build.dir',
                                                command=['pwd'],
                                                property='builddir',
                                                description='set build dir',
-                                               workdir='.',
-                                               ))
+                                               workdir='.'))
     return f
 
 def GetCompilerArtifacts(f):
+    # The 'revision' property is always defined, so it is safer to use.
+    # That being said, it has not yet been set to a valid number for phase 1 builds.
+    # You must use 'got_build' to determine which revision was actually pulled.
     if WithProperties('%(revision)s')=='None':
-        src_file = WithProperties('buildmaster at llvmlab.local:~/artifacts/%(use_builder)s/%(got_revision)s/clang-*.tar.gz')
+         src_file = WithProperties('buildmaster at llvmlab.local:~/artifacts/%(use_builder)s/' +
+                                    'clang-r%(got_revision)s-*.tar.gz')
     else:
-        src_file = WithProperties('buildmaster at llvmlab.local:~/artifacts/%(use_builder)s/%(revision)s/clang-*.tar.gz')
+         src_file = WithProperties('buildmaster at llvmlab.local:~/artifacts/%(use_builder)s/' +
+                                    'clang-r%(revision)s-*.tar.gz')
     slavedest=WithProperties('%(builddir)s/clang-host.tar.gz')
     f.addStep(buildbot.steps.shell.ShellCommand(
-              name='download_artifacts',
-              command=['rsync', '-ave', 'ssh', src_file, slavedest ],
+              name='download.artifacts',
+              command=['rsync', '-ave', 'ssh', src_file, slavedest],
               haltOnFailure=True,
               description=['download build artifacts'],
-              workdir=WithProperties('%(builddir)s'),
-              ))
-    #extract compiler artifacts used for this build
+              workdir=WithProperties('%(builddir)s')))
     f.addStep(buildbot.steps.shell.ShellCommand(
               name='unzip',
-              command=['tar', '-zxvf','../clang-host.tar.gz',],
+              command=['tar', '-zxvf','../clang-host.tar.gz'],
               haltOnFailure=True,
               description=['extract', 'clang-host'],
-              workdir='clang-host',
-              ))
+              workdir='clang-host'))
     return f
 
 def cleanCompilerDir(f):
@@ -89,106 +80,104 @@
             command=['rm', '-rfv', 'clang-install'],
             haltOnFailure=False,
             description=['rm dir', 'clang-install'],
-            workdir=WithProperties('%(builddir)s'),
-            ))
+            workdir=WithProperties('%(builddir)s')))
     f.addStep(buildbot.steps.shell.ShellCommand(
             command=['rm', '-rfv', 'clang-host'],
             haltOnFailure=False,
             description=['rm dir', 'clang-host'],
-            workdir=WithProperties('%(builddir)s'),
-            ))
+            workdir=WithProperties('%(builddir)s')))
     f.addStep(buildbot.steps.shell.ShellCommand(
             command=['sh', '-c', 'rm -rfv clang*.tar.gz'],
             haltOnFailure=False,
             description=['rm archives'],
-            workdir=WithProperties('%(builddir)s'),
-            ))
+            workdir=WithProperties('%(builddir)s')))
     f.addStep(buildbot.steps.shell.ShellCommand(
             command=['rm', '-rfv', WithProperties('%(compiler_built:-)s')],
             haltOnFailure=False,
             description=['rm dir', WithProperties('%(compiler_built:-)s')],
-            workdir=WithProperties('%(builddir)s'),
-            ))
+            workdir=WithProperties('%(builddir)s')))
     return f
 
 def uploadArtifacts(f):
     f.addStep(buildbot.steps.shell.ShellCommand(
-              name='tar_and_zip',
-              command=['tar', 'czvf', WithProperties('../clang-r%(got_revision)s-b%(buildnumber)s.tar.gz'),
+              name='tar.and.zip',
+              command=['tar', 'czvf', 
+                       WithProperties('../clang-r%(got_revision)s-b%(buildnumber)s.tar.gz'),
                        './'],
               haltOnFailure=True,
               description=['tar', '&', 'zip'],
-              workdir='clang-install',
-              ))
+              workdir='clang-install'))
     archive_src = WithProperties('%(builddir)s/clang-r%(got_revision)s-b%(buildnumber)s.tar.gz')
+    archive_dest = WithProperties('buildmaster at llvmlab.local:~/artifacts/%(buildername)s')
     f.addStep(buildbot.steps.shell.ShellCommand(
-              name='upload_artifacts',
-              command=['rsync', '-ave', 'ssh', archive_src, 
-                       WithProperties('buildmaster at llvmlab.local:~/artifacts/%(buildername)s/%(got_revision)s/')
-                      ],
+              name='upload.artifacts',
+              command=['rsync', '-ave', 'ssh', archive_src, archive_dest],
               haltOnFailure=True,
               description=['upload build artifacts'],
-              workdir=WithProperties('%(builddir)s'),
-              ))
-    setProperty(f, 'artifactsURL', WithProperties('http://smooshlab.apple.com/artifacts/%(buildername)s/clang-r%(got_revision)s-b%(buildnumber)s.tar.gz') )
+              workdir=WithProperties('%(builddir)s')))
+    artifactsURL = WithProperties('http://smooshlab.apple.com/artifacts/%(buildername)s' +
+                                  '/clang-r%(got_revision)s-b%(buildnumber)s.tar.gz')
+    setProperty(f, 'artifactsURL', artifactsURL)
     return f
 
 def regressionTests(f):
     f.addStep(buildbot.steps.shell.ShellCommand(
-        name='run_llvm_tests',
-        command=['make', '-j', WithProperties('%(jobs)s'),
-                ],
+        name='run.llvm.tests',
+        command=['make', '-j', WithProperties('%(jobs)s')],
          haltOnFailure=True,
          description=['llvm', 'tests'],
-         env={'PATH': WithProperties('%(builddir)s/%(compiler_built)s/%(compiler_type)s/bin:${PATH}')},
+         env={'PATH': 
+              WithProperties('%(builddir)s/%(compiler_built)s/%(compiler_type)s/bin:${PATH}')},
          workdir=WithProperties('%(compiler_built)s/test')))
     f.addStep(buildbot.steps.shell.ShellCommand(
-        name='run_clang_tests',
-        command=['make', '-j', WithProperties('%(jobs)s'),
-                ],
+        name='run.clang.tests',
+        command=['make', '-j', WithProperties('%(jobs)s')],
          haltOnFailure=True,
          description=['clang', 'tests'],
-         env={'PATH': WithProperties('%(builddir)s/%(compiler_built)s/%(compiler_type)s/bin:${PATH}')},
+         env={'PATH': 
+              WithProperties('%(builddir)s/%(compiler_built)s/%(compiler_type)s/bin:${PATH}')},
          workdir=WithProperties('%(compiler_built)s/tools/clang/test')))
     return f
 
 
 def createPhase1():
-    # create the factory
+    # Create an instance of the Builder.
     f = buildbot.process.factory.BuildFactory()
     f = clangStage1(f)
+    # Save artifacts of thids build for use by other builders.
     f = uploadArtifacts(f)
     f = regressionTests(f)
     return f
     
 
-def clangStage1(f,config_options=''):
+def clangStage1(f, config_options=''):
     # Determine the build directory.
     f = getBuildDir(f)
-    # clean out the directory used for the stage 1 compiler
+    # Clean out the directories/archives used to ensure a clean build.
     f = cleanCompilerDir(f)
-    # pull sources
+    # Pull sources.
     f = pullllvm(f)
     f = pullClang(f)
-    # do config/make
+    # Configure to use built-in compiler.
     f.addStep(buildbot.steps.shell.ShellCommand(
             name='configure',
             command=[
                      '../llvm/configure', '--enable-optimized', '--disable-bindings',
                      '--with-llvmcc=clang', '--without-llvmgcc', '--without-llvmgxx',
-                     WithProperties('--prefix=/'),
-                    ],
+                     WithProperties('--prefix=/')],
             haltOnFailure=True,
             description=['configure'],
             workdir=WithProperties('%(compiler_built)s')))
+    # Build clang.
     f.addStep(buildbot.steps.shell.ShellCommand(
             name='make',
-            command=['make', '-j', WithProperties('%(jobs)s'),],
+            command=['make', '-j', WithProperties('%(jobs)s')],
             haltOnFailure=True,
             description=['make'],
             workdir=WithProperties('%(compiler_built)s')))
+    # Use make inatall-clang to produce minimal archive for use by downstream builders.
     f.addStep(buildbot.steps.shell.ShellCommand(
-            name='make install',
+            name='make.install-clang',
             command=['make', 'install-clang', '-j', WithProperties('%(jobs)s'),
                      WithProperties('DESTDIR=%(builddir)s/clang-install')],
             haltOnFailure=True,
@@ -197,54 +186,53 @@
     return f
 
 def clangHost(config_options):
-    # create the factory
+    # Create an instance of the Builder.
     f = buildbot.process.factory.BuildFactory()
     # Determine the build directory.
     f = getBuildDir(f)
     f = setProperty(f, 'use_path', WithProperties('%(builddir)s/clang-host/bin'))
-    # clean out the directory/archives used for the stage 1 compiler
-    # clean out the directory used to build compiler
+    # Clean out the directories/archives used to ensure a clean build.
     f = cleanCompilerDir(f)
-    # pull sources
+    # Pull sources.
     f = pullllvm(f)
     f = pullClang(f)
-    #Download artifacts from phase 1 compiler build
+    # Download artifacts from phase 1 compiler build.
     f = GetCompilerArtifacts(f)
-    # configure to use stage1 compiler (artifacts from phase 1 build)
     if config_options == ():
        config_options = []
     else:
        config_options = list(config_options)
+    # Configure to use artifacts from upstream builder.
     f.addStep(buildbot.steps.shell.ShellCommand(
-            name='configure_with_host',
+            name='configure.with.host',
             command=[
-                     '../llvm/configure',] + config_options + ['--disable-bindings',
+                     '../llvm/configure'] + config_options + ['--disable-bindings',
                      '--with-llvmcc=clang', '--without-llvmgcc', '--without-llvmgxx',
                      WithProperties('CC=%(use_path)s/clang'),
                      WithProperties('CXX=%(use_path)s/clang++'),
-                     WithProperties('--prefix=/'),
-                     ],
+                     WithProperties('--prefix=/')],
             haltOnFailure=True,
             description=['configure'],
             env={'PATH': WithProperties('%(use_path)s:${PATH}')},
             workdir=WithProperties('%(compiler_built)s')))
-    # build stage 2 compiler
+    # Build clang using clang.
     f.addStep(buildbot.steps.shell.ShellCommand(
-            name='stage_2_make',
+            name='stage.2.make',
             command=['make', '-j', WithProperties('%(jobs)s')],
             haltOnFailure=True,
             description=['make'],
             env={'PATH': WithProperties('%(use_path)s:${PATH}')},
             workdir=WithProperties('%(compiler_built)s')))
+    # Use make inatall-clang to produce minimal archive for use by downstream builders.
     f.addStep(buildbot.steps.shell.ShellCommand(
-            name='make install',
+            name='make.install-clang',
             command=['make', 'install-clang', '-j', WithProperties('%(jobs)s'),
                      WithProperties('DESTDIR=%(builddir)s/clang-install')],
             env={'PATH': WithProperties('%(use_path)s:${PATH}')},
             haltOnFailure=True,
             description=['make install'],
             workdir=WithProperties('%(compiler_built)s')))
-    # save artifacts of thids build for use by other builders
+    # Save artifacts of thids build for use by other builders.
     f = uploadArtifacts(f)
     f = regressionTests(f)
     return f
@@ -255,20 +243,18 @@
                        waitForFinish=True,
                        haltOnFailure=True,
                        updateSourceStamp=True,
-                       set_properties={'revision': WithProperties('%(revision)s'), 'got_revision': WithProperties('%(revision)s')}
-#                        set_properties={'use_compiler': WithProperties('%(use_compiler:-stage1)s'),
-#                                        'use_builder': WithProperties('%(use_builder:-phase1)s')},
-                       ))
+                       set_properties={'revision': WithProperties('%(revision)s'), 
+                                       'got_revision': WithProperties('%(revision)s')}))
     f.addStep(Trigger(schedulerNames=[next],
                        waitForFinish=False,
                        updateSourceStamp=True,
-                       set_properties={'revision': WithProperties('%(revision)s'), 'got_revision': WithProperties('%(revision)s')}
-                       ))
+                       set_properties={'revision': WithProperties('%(revision)s'), 
+                                       'got_revision': WithProperties('%(revision)s')}))
     return f
 
 def PublishGoodBuild():
     f = buildbot.process.factory.BuildFactory()
-    #add steps to prepare a release and announce a good build
+    # TODO: Add steps to prepare a release and announce a good build.
     return f
 
 def Placeholder():
@@ -279,8 +265,7 @@
     return { 'name' : bldname,
              'factory' : getGatedFactory(trigger1, trigger2),
              'slavenames' : bldslaves ,
-             'category' : 'status',
-           }
+             'category' : 'status'}
 
 def HostedClang(myname, compiler_type, use_compiler, slaves, *config_options):
     return { 'name' : myname,
@@ -290,8 +275,7 @@
              'category' : 'clang',
              'properties' : {'compiler_type': compiler_type, 
                              'use_builder': use_compiler,
-                             'compiler_built': 'clang-build'
-                            }}
+                             'compiler_built': 'clang-build'}}
 
 def CreateNightly(options):
     f = buildbot.process.factory.BuildFactory()
@@ -303,40 +287,37 @@
     # Determine the build directory.
     f = getBuildDir(f)
     f = setProperty(f, 'use_path', WithProperties('%(builddir)s/clang-host/bin'))
-    #clean out the directory/archives prior to extracting compiler
+    # Clean out the directories/archives used to ensure a clean build.
     f = cleanCompilerDir(f) 
-    #Download compiler artifacts to be used for this build
+    # Download compiler artifacts to be used for this build.
     f = GetCompilerArtifacts(f)
     f.addStep(buildbot.steps.shell.ShellCommand(
-            name='sanity_test',
+            name='sanity.test',
             command=[WithProperties('%(use_path)s/clang'),
                      '--version'],
              haltOnFailure=True,
              description=['sanity test'],
-             env={'PATH': WithProperties('%(use_path)s:${PATH}')},
-             ))
-    # pull source code
+             env={'PATH': WithProperties('%(use_path)s:${PATH}')}))
+    # Pull source code.
     f = pullllvm(f)
     f = pullClang(f)
     f = pulltest_suite(f)
-    # must build llvm utils, so configure llvm and build
-    # TODO: build less of llvm
+    # It is currently necessary to build llvm in order for nightly tests to build and run.
+    # TODO: build less of llvm.
     f.addStep(buildbot.steps.shell.ShellCommand(
-            name='configure_with_host',
+            name='configure.with.host',
             command=[
                      '../llvm/configure', '--enable-optimized', '--disable-bindings',
                      '--with-llvmcc=clang', '--without-llvmgcc', '--without-llvmgxx',
                      WithProperties('CC=%(use_path)s/clang'),
-                     WithProperties('CXX=%(use_path)s/clang++'),
-                     ],
+                     WithProperties('CXX=%(use_path)s/clang++')],
             haltOnFailure=True,
             description=['configure'],
             env={'PATH': WithProperties('%(use_path)s:${PATH}')},
             workdir='llvm.obj'))
     f.addStep(buildbot.steps.shell.ShellCommand(
             name='make',
-            command=['make', 'tools-only', '-j', WithProperties('%(jobs)s'),
-                    ],
+            command=['make', 'tools-only', '-j', WithProperties('%(jobs)s')],
             env={'PATH': WithProperties('%(use_path)s:${PATH}')},
             haltOnFailure=True,
             description=['make'],
@@ -348,37 +329,32 @@
                                command=["rm", "-rfv", "test-suite-build"],
                                haltOnFailure=True,
                                description="rm test-suite build dir",
-                               workdir=WithProperties('%(builddir)s'),
-                              ))
-    # Configure.
+                               workdir=WithProperties('%(builddir)s')))
+    # Configure tests to use clang from upstream build.
     f.addStep(buildbot.steps.shell.ShellCommand(
-            name='configure_tests',
+            name='configure.tests',
             command=['../test-suite/configure',
                      WithProperties('CC=%(use_path)s/clang'),
                      WithProperties('CXX=%(use_path)s/clang++'),
                      'CFLAGS='+options,
                      'CXXFLAGS='+options,
                       WithProperties('--with-llvmsrc=%(builddir)s/llvm'),
-                      WithProperties('--with-llvmobj=%(builddir)s/llvm.obj'),
-                     ],
+                      WithProperties('--with-llvmobj=%(builddir)s/llvm.obj')],
             haltOnFailure=True,
             description=['configure tests'],
             env={'PATH': WithProperties('%(use_path)s:${PATH}')},
-            workdir='test-suite-build',
-            ))
+            workdir='test-suite-build'))
     # Build and test.
     f.addStep(NightlyTestCommand(
-            name='run_fast_nightly_tests',
+            name='run.fast.nightly.tests',
             command=['make', WithProperties('-j%(jobs)s'), 'ENABLE_PARALLEL_REPORT=1',
-                     'DISABLE_CBE=1', 'DISABLE_JIT=1', 'TEST=nightly', 'report'
-                 ],
+                     'DISABLE_CBE=1', 'DISABLE_JIT=1', 'TEST=nightly', 'report'],
             env={'PATH': WithProperties('%(use_path)s:${PATH}')},
             haltOnFailure=True,
             description=["run", "test-suite"],
             workdir='test-suite-build',
-            logfiles={ 'report' : 'report.nightly.txt' },
-            xfails=xfails
-            ))
+            logfiles={ 'report' : 'report.nightly.txt'},
+            xfails=xfails))
     return f
 
 def Nightly(compiler, slaves, options=''):
@@ -387,7 +363,7 @@
              'factory' : CreateNightly(options),
              'slavenames' : slaves,
              'category' : 'tests',
-             'properties' : {'use_builder': compiler }}
+             'properties' : {'use_builder': compiler}}
 
 def stage1Clang(compiler, compiler_type, slave):
     return { 'name' : compiler,
@@ -396,55 +372,53 @@
              'slavename' : slave,
              'category' : 'clang',
              'properties' : {'compiler_type': compiler_type,
-                             'compiler_built': 'clang-build'
-                            }}
+                             'compiler_built': 'clang-build'}}
 
 def HostStage3Clang(config_options):
-    # create the factory
+    # Create instance of Builder.
     f = buildbot.process.factory.BuildFactory()
     # Determine the build directory.
     f = getBuildDir(f)
     f = setProperty(f, 'use_path', WithProperties('%(builddir)s/clang-host/bin'))
-    # clean out the directory/archives used for the stage 2 compiler
-    # clean out the directory used to build compiler
+    # Clean out the directories/archives used to ensure a clean build.
     f = cleanCompilerDir(f)
-    # pull sources
+    # Pull sources.
     f = pullllvm(f)
     f = pullClang(f)
-    #Download artifacts from phase 1 compiler build
+    # Download artifacts from upstream builder.
     f = GetCompilerArtifacts(f)
-    # configure to use stage1 compiler (artifacts from phase 1 build)
+    # Configure to use compiler from upstream builder.
     f.addStep(buildbot.steps.shell.ShellCommand(
-            name='configure_with_host',
+            name='configure.with.host',
             command=[
                      '../llvm/configure', '--enable-optimized', '--disable-bindings',
                      '--with-llvmcc=clang', '--without-llvmgcc', '--without-llvmgxx',
                      config_options,
                      WithProperties('CC=%(use_path)s/clang'),
                      WithProperties('CXX=%(use_path)s/clang++'),
-                     WithProperties('--prefix=/'),
-                     ],
+                     WithProperties('--prefix=/')],
             haltOnFailure=True,
             description=['configure'],
             env={'PATH': WithProperties('%(use_path)s:${PATH}')},
             workdir=WithProperties('%(compiler_built)s')))
-    # build stage 2 compiler
+    # Build clang using clang.
     f.addStep(buildbot.steps.shell.ShellCommand(
-            name='stage_3_make',
+            name='stage.3.make',
             command=['make', '-j', WithProperties('%(jobs)s')],
             haltOnFailure=True,
             description=['make'],
             env={'PATH': WithProperties('%(use_path)s:${PATH}')},
             workdir=WithProperties('%(compiler_built)s')))
+    # Use make inatall-clang to produce minimal archive for use by downstream builders.
     f.addStep(buildbot.steps.shell.ShellCommand(
-            name='make install',
+            name='make.install-clang',
             command=['make', 'install-clang', '-j', WithProperties('%(jobs)s'),
                      WithProperties('DESTDIR=%(builddir)s/clang-install')],
             env={'PATH': WithProperties('%(use_path)s:${PATH}')},
             haltOnFailure=True,
             description=['make install'],
             workdir=WithProperties('%(compiler_built)s')))
-    # save artifacts of thids build for use by other builders
+    # Save artifacts of thids build for use by downstream builders.
     f = uploadArtifacts(f)
     f = regressionTests(f)
     NightlyFactory(f, '')
@@ -458,8 +432,7 @@
              'category' : 'clang',
              'properties' : {'use_builder': use_compiler,
                              'compiler_type': 'Release+Asserts',
-                             'compiler_built': 'clang-build'
-                            }}
+                             'compiler_built': 'clang-build'}}
 
 def gccTestSuite(use_compiler, slaves, config_options=''):
     return { 'name' : 'gccTestSuite-'+ use_compiler,
@@ -467,17 +440,7 @@
              'factory' : gccRunSuite(config_options),
              'slavenames' : slaves,
              'category' : 'clang',
-             'properties' : { 'use_builder': use_compiler,
-                            }}
-
-def libcxx(use_compiler, slaves, config_options=''):
-    return { 'name' : 'libcxx-'+ use_compiler,
-             'builddir' : 'build.'+ 'libcxx-'+ use_compiler,
-             'factory' : runlibcxx(config_options),
-             'slavenames' : slaves,
-             'category' : 'clang',
-             'properties' : { 'use_builder': use_compiler,
-                            }}
+             'properties' : { 'use_builder': use_compiler}}
 
 def boost(tag, use_compiler, slaves, config_options=''):
     return { 'name' : 'boost-' + tag + '-' + use_compiler,
@@ -486,8 +449,7 @@
              'slavenames' : slaves,
              'category' : 'clang',
              'properties' : {'use_builder': use_compiler,
-                             'boost_tag': tag
-                            }}
+                             'boost_tag': tag}}
 
 def gccRunSuite(config_options):
     f = buildbot.process.factory.BuildFactory()
@@ -495,63 +457,34 @@
     getBuildDir(f)
     setProperty(f, 'use_path', WithProperties('%(builddir)s/clang-host/bin'))
     cleanCompilerDir(f)
-    # pull test-suite
+    # Pull test-suite.
     pullclang_tests(f)
-    #Download compiler artifacts to be used for this build
+    # Download compiler from upstream builder.
     GetCompilerArtifacts(f)
-    # run tests
+    # Run gcc test suite.
+    # TODO: This step returns as a failure because it does not handle expected failures.
 #     f.addStep(buildbot.steps.shell.ShellCommand(
-#             name='make_check',
+#             name='make.check',
 #             command=['make', 'check', 
 #             WithProperties('CC_UNDER_TEST=%(use_path)s/clang'),
-#             WithProperties('CXX_UNDER_TEST=%(use_path)s/clang++'),],
+#             WithProperties('CXX_UNDER_TEST=%(use_path)s/clang++')],
 #             haltOnFailure=True,
 #             description=['make check'],
 #             env={'PATH': WithProperties('/usr/local/bin/:%(use_path)s:${PATH}')},
 #             workdir='test-suite/gcc-4_2-testsuite'))
     return f
 
-def runlibcxx(config_options):
-    f = buildbot.process.factory.BuildFactory()
-    # Determine the build directory.
-    getBuildDir(f)
-    setProperty(f, 'use_path', WithProperties('%(builddir)s/clang-host/bin'))
-    cleanCompilerDir(f)
-    # pull test-suite
-    pulllibcxx(f)
-    #Download compiler artifacts to be used for this build
-    GetCompilerArtifacts(f)
-    # run tests
-#     f.addStep(buildbot.steps.shell.ShellCommand(
-#             name='buildit',
-#             command=['./buildit',],
-#             haltOnFailure=True,
-#             description=['build libc++'],
-#             env={'PATH': WithProperties('%(use_path)s:${PATH}')},
-#             workdir='libcxx/lib'))
-#     f.addStep(buildbot.steps.shell.ShellCommand(
-#             name='testit',
-#             command=['testit',],
-#             haltOnFailure=True,
-#             description=['test libc++'],
-#             env={'PATH': WithProperties('%(use_path)s:${PATH}')},
-#             workdir='libcxx/test'))
-    return f
-
 def runboost(config_options):
     f = buildbot.process.factory.BuildFactory()
     # Determine the build directory.
     getBuildDir(f)
     f = setProperty(f, 'use_path', WithProperties('%(builddir)s/clang-host/bin'))
     cleanCompilerDir(f)
-    # pull test-suite
+    # Pull Boost's test-suite.
     pullboostrunner(f)
-    #Download compiler artifacts to be used for this build
+    # Download compiler artifacts to be used for this build.
     GetCompilerArtifacts(f)
-    # run tests
-    # runner=llvmlab
-    # BOOST_ROOT=builddir/boost
-    # echo using borland : "integration" : %CD:\=/%/integration/bin/bcc32 : ; > %MYJAMFILE%
+    # Run boost test suite.
     f.addStep(buildbot.steps.shell.ShellCommand(
               name='user-config.jam',
               command=['echo', 'using', 'clang', ':', 'darwin-4.2.1', ':', 
@@ -559,21 +492,18 @@
                        ';', '>', 'user-config.jam'],
               haltOnFailure=True,
               description=['create user-config.jam'],
-              workdir=WithProperties('%(builddir)s'),
-              ))
-    #--bjam-options=target-os=windows --bjam-options=-l300 --bjam-options=--debug-level=3 --bjam-options=--user-config=%MYJAMFILE% --have-source --skip-script-download --ftp=ftp://boost:4peiV8Xwxfv9@ftp.siliconman.net >runner.log
+              workdir=WithProperties('%(builddir)s')))
     f.addStep(buildbot.steps.shell.ShellCommand(
               name='run.py',
               command=['python', 'boost_runner/run.py', WithProperties('--tag=%(boost_tag)s'), 
                        '--runner=llvmlab', '--bjam-options=--toolset=clang-darwin', 
                        WithProperties('--bjam-options=--user-config=%(builddir)s/userconfig.jam'),
                        '--ftp=ftp://boost:4peiV8Xwxfv9@ftp.siliconman.net',
-                       WithProperties('--bjam-options=-j%(jobs)s'),'--user=""',],
+                       WithProperties('--bjam-options=-j%(jobs)s'),'--user=""'],
               haltOnFailure=True,
               description=['boost regression harness'],
               workdir=WithProperties('%(builddir)s'),
-              timeout=14400
-              ))
+              timeout=14400))
     return f
 
 def get_builders(all_slaves):
@@ -585,27 +515,31 @@
     phase1_slave = 'llvmlab.local'
     phaseRunners = [phase1_slave]
     phase3_slaves = ['lab-mini-04.local']
-    #phase2_slaves = filter(lambda x:x not in [phase1_slave], all_slaves)
     return [
-            #Build to announce good build and prepare potential release candidate
+            # This builder should announce good builds and prepare potential release candidates.
             { 'name' : 'Validated Build',
               'factory' : PublishGoodBuild(),
               'slavenames' : phaseRunners,
-              'category' : 'status',
-            },
-            #parent builds for each phase
+              'category' : 'status'},
+
+            # These builds coordinate and gate each phase as part of the staged design.
             makePhaseBuilder('phase1 - sanity', 'doPhase1','phase2', phaseRunners),
             makePhaseBuilder('phase2 - living', 'doPhase2','phase3', phaseRunners),
             makePhaseBuilder('phase3 - tree health', 'doPhase3','phase4', phaseRunners),
             makePhaseBuilder('phase4 - validation', 'doPhase4','GoodBuild', phaseRunners),
-            # phase 1 build
+
+            # These are phase 1 build(s).
             stage1Clang(phase1, typeRA, phase1_slave),
-            #phase 2 Builds
+
+            # These are phase 2 builds.
             HostedClang ('clang-x86_64-osx10-DA', typeDA, phase1, ['lab-mini-01.local']),
-            HostedClang (final_reference, typeRA, phase1, ['lab-mini-02.local'], '--enable-optimized'),
+            HostedClang (final_reference, typeRA, phase1, ['lab-mini-02.local'], 
+                         '--enable-optimized'),
             Nightly(phase1, ['lab-mini-03.local']),
-            #phase3 builds
-            HostedClang ('clang-i386-osx10-RA', typeRA, phase1, phase3_slaves, '--enable-optimized', '--target=i386'),
+
+            # These are phase 3 builds.
+            HostedClang ('clang-i386-osx10-RA', typeRA, phase1, phase3_slaves, 
+                         '--enable-optimized', '--target=i386'),
             Nightly('clang-x86_64-osx10-DA', phase3_slaves),
             Nightly(final_reference, phase3_slaves),
             Nightly(final_reference, phase3_slaves, '-O0'),
@@ -614,22 +548,11 @@
             Nightly(final_reference, phase3_slaves, '-flto'),
             Nightly(final_reference, phase3_slaves, '-g'),
            
-            #phase4 builds
+            # These are phase 4 builds.
             Nightly('clang-i386-osx10-RA', phase3_slaves),
             stage3Clang(final_reference, phase3_slaves),
             gccTestSuite(final_reference, phase3_slaves),
-            libcxx(final_reference, phase3_slaves),
-            boost('trunk', final_reference, phase3_slaves),
-#            boost('branches/release', final_reference, phase3_slaves),
-#            boost('tags/release/Boost_1_44_0', final_reference, phase3_slaves),
-            #A Placeholder builder is required for triggers which haven't had builders
-            #configured yet, otherwise build will hang
-#             { 'name' : 'Placeholder',
-#               'factory' : Placeholder(),
-#               'slavenames' : phaseRunners,
-#               'category' : 'clang',
-#             },
-           ]
+            boost('trunk', final_reference, phase3_slaves)]
 
 def prioritizeBuilders(buildmaster, builders):
     builderPriorities = {
@@ -653,10 +576,8 @@
             'clang-x86_64-osx10-RA-stage3':4,
             'gccTestSuite-clang-x86_64-osx10-RA':4,
             'nightly_clang-x86_64-osx10-RA-stage3-g':5,
-            'libcxx-clang-x86_64-osx10-RA':4,
             'boost-trunk-clang-x86_64-osx10-RA':6,
-            'Validated Build':7,
-            }
+            'Validated Build':7}
     builders.sort(key=lambda b: builderPriorities.get(b.name, 0))
     return builders
 

Modified: zorg/trunk/buildbot/llvmlab/master/config/schedulers.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/llvmlab/master/config/schedulers.py?rev=125159&r1=125158&r2=125159&view=diff
==============================================================================
--- zorg/trunk/buildbot/llvmlab/master/config/schedulers.py (original)
+++ zorg/trunk/buildbot/llvmlab/master/config/schedulers.py Tue Feb  8 20:53:36 2011
@@ -45,7 +45,6 @@
                                        'clang-x86_64-osx10-RA-stage3',
                                        'nightly_clang-i386-osx10-RA',
                                        'gccTestSuite-clang-x86_64-osx10-RA',
-                                       'libcxx-clang-x86_64-osx10-RA',
                                        'boost-trunk-clang-x86_64-osx10-RA',
                                       ],
                          properties = {'revision':WithProperties('%(got_revision)s')})





More information about the llvm-commits mailing list