[llvm-commits] [zorg] r142923 - /zorg/trunk/zorg/buildbot/builders/ClangBuilder.py
Peter Collingbourne
peter at pcc.me.uk
Tue Oct 25 07:38:45 PDT 2011
Author: pcc
Date: Tue Oct 25 09:38:45 2011
New Revision: 142923
URL: http://llvm.org/viewvc/llvm-project?rev=142923&view=rev
Log:
Add trunk_revision and force_checkout parameters to ClangBuilder.getClangBuildFactory()
trunk_revision is used to specify a specific revision of LLVM/Clang
trunk to check out. It is subject to WithProperties substitution.
force_checkout is used to control whether to supply the --force
argument to "svn checkout" when checking out LLVM/Clang. It currently
only works if trunk_revision is set.
Modified:
zorg/trunk/zorg/buildbot/builders/ClangBuilder.py
Modified: zorg/trunk/zorg/buildbot/builders/ClangBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/ClangBuilder.py?rev=142923&r1=142922&r2=142923&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/ClangBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/ClangBuilder.py Tue Oct 25 09:38:45 2011
@@ -34,6 +34,8 @@
env={}, # Environmental variables for all steps.
extra_configure_args=[],
use_pty_in_tests=False,
+ trunk_revision=None,
+ force_checkout=False,
checkout_compiler_rt=False):
# Prepare environmental variables. Set here all env we want everywhere.
merged_env = {
@@ -79,22 +81,48 @@
env=merged_env))
# Checkout sources.
- f.addStep(SVN(name='svn-llvm',
- mode='update',
- baseURL='http://llvm.org/svn/llvm-project/llvm/',
- defaultBranch='trunk',
- workdir=llvm_srcdir))
- f.addStep(SVN(name='svn-clang',
- mode='update',
- baseURL='http://llvm.org/svn/llvm-project/cfe/',
- defaultBranch='trunk',
- workdir='%s/tools/clang' % llvm_srcdir))
- if checkout_compiler_rt:
- f.addStep(SVN(name='svn-compiler-rt',
+ if trunk_revision:
+ # The SVN build step provides no mechanism to check out a specific revision
+ # based on a property, so just run the commands directly here.
+ svn_co = ['svn', 'checkout']
+ if force_checkout:
+ svn_co += ['--force']
+ svn_co += ['--revision', WithProperties(trunk_revision)]
+
+ svn_co_llvm = svn_co + \
+ [WithProperties('http://llvm.org/svn/llvm-project/llvm/trunk@%s' %
+ trunk_revision),
+ llvm_srcdir]
+ svn_co_clang = svn_co + \
+ [WithProperties('http://llvm.org/svn/llvm-project/cfe/trunk@%s' %
+ trunk_revision),
+ '%s/tools/clang' % llvm_srcdir]
+
+ f.addStep(ShellCommand(name='svn-llvm',
+ command=svn_co_llvm,
+ haltOnFailure=True,
+ workdir='.'))
+ f.addStep(ShellCommand(name='svn-clang',
+ command=svn_co_clang,
+ haltOnFailure=True,
+ workdir='.'))
+ else:
+ f.addStep(SVN(name='svn-llvm',
+ mode='update',
+ baseURL='http://llvm.org/svn/llvm-project/llvm/',
+ defaultBranch='trunk',
+ workdir=llvm_srcdir))
+ f.addStep(SVN(name='svn-clang',
mode='update',
- baseURL='http://llvm.org/svn/llvm-project/compiler-rt/',
+ baseURL='http://llvm.org/svn/llvm-project/cfe/',
defaultBranch='trunk',
- workdir='%s/projects/compiler-rt' % llvm_srcdir))
+ workdir='%s/tools/clang' % llvm_srcdir))
+ if checkout_compiler_rt:
+ f.addStep(SVN(name='svn-compiler-rt',
+ mode='update',
+ baseURL='http://llvm.org/svn/llvm-project/compiler-rt/',
+ defaultBranch='trunk',
+ workdir='%s/projects/compiler-rt' % llvm_srcdir))
# Clean up llvm (stage 1); unless in-dir.
if clean and llvm_srcdir != llvm_1_objdir:
More information about the llvm-commits
mailing list