[llvm-commits] [zorg] r142405 - in /zorg/trunk: buildbot/osuosl/master/config/builders.py zorg/buildbot/builders/LLVMBuilder.py zorg/buildbot/builders/LLVMGCCBuilder.py zorg/buildbot/builders/NightlytestBuilder.py
Galina Kistanova
gkistanova at gmail.com
Tue Oct 18 12:48:45 PDT 2011
Author: gkistanova
Date: Tue Oct 18 14:48:45 2011
New Revision: 142405
URL: http://llvm.org/viewvc/llvm-project?rev=142405&view=rev
Log:
Add passing env settings to one of builders and changes to support this. Cosmetic.
Modified:
zorg/trunk/buildbot/osuosl/master/config/builders.py
zorg/trunk/zorg/buildbot/builders/LLVMBuilder.py
zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py
zorg/trunk/zorg/buildbot/builders/NightlytestBuilder.py
Modified: zorg/trunk/buildbot/osuosl/master/config/builders.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/master/config/builders.py?rev=142405&r1=142404&r2=142405&view=diff
==============================================================================
--- zorg/trunk/buildbot/osuosl/master/config/builders.py (original)
+++ zorg/trunk/buildbot/osuosl/master/config/builders.py Tue Oct 18 14:48:45 2011
@@ -49,22 +49,23 @@
'slavenames':["arxan_bellini"],
'builddir':"llvm-ppc-darwin",
'factory': LLVMBuilder.getLLVMBuildFactory("ppc-darwin", jobs=1, clean=True)},
- {'name': "llvm-i686-linux-vg_leak",
- 'slavenames':["osu8"],
- 'builddir':"llvm-i686-linux-vg_leak",
- 'factory': LLVMBuilder.getLLVMBuildFactory("i686-pc-linux-gnu", valgrind=True,
+ {'name': "llvm-i686-linux-vg_leak",
+ 'slavenames':["osu8"],
+ 'builddir':"llvm-i686-linux-vg_leak",
+ 'factory': LLVMBuilder.getLLVMBuildFactory("i686-pc-linux-gnu", valgrind=True,
valgrindLeakCheck=True,
valgrindSuppressions='utils/valgrind/i386-pc-linux-gnu.supp')},
- {'name': "llvm-x86_64-linux-vg_leak",
- 'slavenames':["osu7"],
- 'builddir':"llvm-x86_64-linux-vg_leak",
- 'factory': LLVMBuilder.getLLVMBuildFactory("x86_64-pc-linux-gnu", valgrind=True,
+ {'name': "llvm-x86_64-linux-vg_leak",
+ 'slavenames':["osu7"],
+ 'builddir':"llvm-x86_64-linux-vg_leak",
+ 'factory': LLVMBuilder.getLLVMBuildFactory("x86_64-pc-linux-gnu", valgrind=True,
valgrindLeakCheck=True,
valgrindSuppressions='utils/valgrind/x86_64-pc-linux-gnu.supp')},
{'name': "llvm-i686-debian",
'slavenames': ["gcc15"],
'builddir': "llvm-i686-debian",
- 'factory': LLVMBuilder.getLLVMBuildFactory("i686-pc-linux-gnu")},
+ 'factory': LLVMBuilder.getLLVMBuildFactory("i686-pc-linux-gnu",
+ env = { 'CC' : "gcc -m32", 'CXX' : "g++ -m32" }),
{'name': "llvm-x86_64-ubuntu",
'slavenames':["arxan_davinci"],
'builddir':"llvm-x86_64-ubuntu",
@@ -114,16 +115,16 @@
'factory':LLVMGCCBuilder.getLLVMGCCBuildFactory(triple='x86_64-pc-linux-gnu',
extra_configure_args=['--disable-multilib'])},
{'name' : "llvm-x86_64-linux-checks",
- 'slavenames':["gcc10"],
- 'builddir':"llvm-x86_64-linux-checks",
- 'factory':LLVMGCCBuilder.getLLVMGCCBuildFactory(triple='x86_64-pc-linux-gnu',
- stage1_config='Release+Asserts+Checks',
- stage2_config='Debug+Asserts+Checks',
- extra_languages="fortran",
- extra_configure_args=['--disable-multilib',
- '--with-mpfr=/opt/cfarm/mpfr',
- '--with-gmp=/opt/cfarm/gmp'],
- timeout=120)},
+ 'slavenames':["gcc10"],
+ 'builddir':"llvm-x86_64-linux-checks",
+ 'factory':LLVMGCCBuilder.getLLVMGCCBuildFactory(triple='x86_64-pc-linux-gnu',
+ stage1_config='Release+Asserts+Checks',
+ stage2_config='Debug+Asserts+Checks',
+ extra_languages="fortran",
+ extra_configure_args=['--disable-multilib',
+ '--with-mpfr=/opt/cfarm/mpfr',
+ '--with-gmp=/opt/cfarm/gmp'],
+ timeout=120)},
]
clang_i386_linux_xfails = [
@@ -335,7 +336,7 @@
'category' : 'clang'},
{'name': "clang-native-mingw32-win7",
- 'slavenames':["kistanova8"],
+ 'slavenames':["kistanova8"],
'builddir':"clang-native-mingw32-win7",
'factory' : ClangBuilder.getClangBuildFactory(triple='i686-pc-mingw32',
useTwoStage=True, test=True,
Modified: zorg/trunk/zorg/buildbot/builders/LLVMBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/LLVMBuilder.py?rev=142405&r1=142404&r2=142405&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/LLVMBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/LLVMBuilder.py Tue Oct 18 14:48:45 2011
@@ -11,27 +11,52 @@
from Util import getConfigArgs
-def getLLVMBuildFactory(triple=None, clean=True, test=True,
- expensive_checks=False, examples=False, valgrind=False,
- valgrindLeakCheck=False, valgrindSuppressions=None,
- jobs='%(jobs)s', timeout=20, make='make',
- enable_shared=False, enable_targets=None, defaultBranch='trunk',
- llvmgccdir=None, config_name='Debug+Asserts',
- extra_configure_args=[]):
+def getLLVMBuildFactory(
+ triple = None, # Triple to build, host, and target.
+ clean = True, # "clean-llvm" step is requested if true.
+ test = True, # "test-llvm" step is requested if true.
+ expensive_checks = False,
+ examples = False, # "compile.examples" step is requested if true.
+ valgrind = False, # Valgrind is used on "test-llvm" step if true.
+ valgrindLeakCheck = False, # Valgrind leak check is requested if true.
+ valgrindSuppressions = None, # Valgrind suppression file.
+ jobs = '%(jobs)s', # Number of concurrent jobs.
+ timeout = 20, # Timeout if no activity seen (minutes).
+ make = 'make', # Make command.
+ enable_shared = False, # Enable shared (--enable-shared configure parameters added) if true.
+ enable_targets = None, # List of enabled targets (--enable-targets configure param).
+ defaultBranch = 'trunk', # Branch to build.
+ llvmgccdir = None, # Path to llvm-gcc.
+ config_name = 'Debug+Asserts', # Configuration name.
+ env = {}, # Environmental variables for all steps.
+ extra_configure_args = []): # Extra args for the conigure step.
+ # Prepare environmental variables. Set here all env we want everywhere.
+ merged_env = {
+ 'TERM' : 'dumb' # Make sure Clang doesn't use color escape sequences.
+ }
+ if env is not None:
+ merged_env.update(env) # Overwrite pre-set items with the given ones, so user can set anything.
+
f = buildbot.process.factory.BuildFactory()
# Determine the build directory.
- f.addStep(buildbot.steps.shell.SetProperty(name="get_builddir",
- command=["pwd"],
- property="builddir",
- description="set build dir",
- workdir="."))
+ f.addStep(
+ buildbot.steps.shell.SetProperty(
+ name = "get_builddir",
+ command = ["pwd"],
+ property = "builddir",
+ description = "set build dir",
+ workdir = ".",
+ env = merged_env))
# Checkout sources.
- f.addStep(SVN(name='svn-llvm',
- mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm/',
- defaultBranch=defaultBranch,
- workdir='llvm'))
+ f.addStep(
+ SVN(
+ name = 'svn-llvm',
+ mode = 'update', baseURL='http://llvm.org/svn/llvm-project/llvm/',
+ defaultBranch = defaultBranch,
+ workdir = 'llvm',
+ env = merged_env))
# Force without llvm-gcc so we don't run afoul of Frontend test failures.
configure_args = ["./configure"]
@@ -49,35 +74,47 @@
if enable_shared:
configure_args.append('--enable-shared')
configure_args.extend(extra_configure_args)
- f.addStep(Configure(command=configure_args,
- workdir='llvm',
- description=['configuring',config_name],
- descriptionDone=['configure',config_name]))
+ f.addStep(
+ Configure(
+ command = configure_args,
+ description = ['configuring', config_name],
+ descriptionDone = ['configure', config_name],
+ workdir = 'llvm',
+ env = merged_env))
if clean:
- f.addStep(WarningCountingShellCommand(name="clean-llvm",
- command=[make, 'clean'],
- haltOnFailure=True,
- description="cleaning llvm",
- descriptionDone="clean llvm",
- workdir='llvm'))
- f.addStep(WarningCountingShellCommand(name="compile",
- command=['nice', '-n', '10',
- make, WithProperties("-j%s" % jobs)],
- haltOnFailure=True,
- description="compiling llvm",
- descriptionDone="compile llvm",
- workdir='llvm',
- timeout=timeout*60))
+ f.addStep(
+ WarningCountingShellCommand(
+ name = "clean-llvm",
+ command = [make, 'clean'],
+ haltOnFailure = True,
+ description = "cleaning llvm",
+ descriptionDone = "clean llvm",
+ workdir = 'llvm',
+ env = merged_env))
+ f.addStep(
+ WarningCountingShellCommand(
+ name = "compile",
+ command = ['nice', '-n', '10',
+ make, WithProperties("-j%s" % jobs)],
+ haltOnFailure = True,
+ description = "compiling llvm",
+ descriptionDone = "compile llvm",
+ workdir = 'llvm',
+ env = merged_env,
+ timeout = timeout * 60))
if examples:
- f.addStep(WarningCountingShellCommand(name="compile.examples",
- command=['nice', '-n', '10',
- make, WithProperties("-j%s" % jobs),
- 'BUILD_EXAMPLES=1'],
- haltOnFailure=True,
- description=["compiling", "llvm", "examples"],
- descriptionDone=["compile", "llvm", "examples"],
- workdir='llvm',
- timeout=timeout*60))
+ f.addStep(
+ WarningCountingShellCommand(
+ name = "compile.examples",
+ command = ['nice', '-n', '10',
+ make, WithProperties("-j%s" % jobs),
+ 'BUILD_EXAMPLES=1'],
+ haltOnFailure = True,
+ description = ["compiling", "llvm", "examples"],
+ descriptionDone = ["compile", "llvm", "examples"],
+ workdir = 'llvm',
+ env = merged_env,
+ timeout = timeout * 60))
if test:
litTestArgs = '-v -j %s' % jobs
if valgrind:
@@ -86,10 +123,13 @@
litTestArgs += ' --vg-leak'
if valgrindSuppressions is not None:
litTestArgs += ' --vg-arg --suppressions=%%(builddir)s/llvm/%s' % valgrindSuppressions
- f.addStep(ClangTestCommand(name='test-llvm',
- command=[make, "check-lit", "VERBOSE=1",
- WithProperties("LIT_ARGS=%s" % litTestArgs)],
- description=["testing", "llvm"],
- descriptionDone=["test", "llvm"],
- workdir='llvm'))
+ f.addStep(
+ ClangTestCommand(
+ name = 'test-llvm',
+ command = [make, "check-lit", "VERBOSE=1",
+ WithProperties("LIT_ARGS=%s" % litTestArgs)],
+ description = ["testing", "llvm"],
+ descriptionDone = ["test", "llvm"],
+ workdir = 'llvm',
+ env = merged_env))
return f
Modified: zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py?rev=142405&r1=142404&r2=142405&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py Tue Oct 18 14:48:45 2011
@@ -24,35 +24,47 @@
elif triple:
build = host = target = triple
+ # Prepare environmental variables. Set here all env we want everywhere.
+ merged_env = {
+ 'TERM' : 'dumb' # Make sure Clang doesn't use color escape sequences.
+ }
+ if env is not None:
+ merged_env.update(env) # Overwrite pre-set items with the given ones, so user can set anything.
+
f = buildbot.process.factory.BuildFactory()
# Determine the build directory.
f.addStep(buildbot.steps.shell.SetProperty(name="get_builddir",
command=["pwd"],
- property="builddir",
- description="set build dir",
- workdir=".", env=env))
+ property = "builddir",
+ description = "set build dir",
+ workdir = ".",
+ env = merged_env))
# Get the sources.
if update:
f.addStep(SVN(name='svn-llvm',
mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm/',
- defaultBranch=defaultBranch,
- workdir="llvm.src"))
+ defaultBranch = defaultBranch,
+ workdir = "llvm.src",
+ env = merged_env))
+
f.addStep(SVN(name='svn-llvm-gcc',
mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm-gcc-4.2/',
- defaultBranch=defaultBranch,
- workdir="llvm-gcc.src"))
+ defaultBranch = defaultBranch,
+ workdir = "llvm-gcc.src",
+ env = merged_env))
# Clean up llvm (stage 1).
if clean:
f.addStep(ShellCommand(name="rm-llvm.obj.stage1",
command=["rm", "-rf", "llvm.obj"],
- haltOnFailure=True,
- description=["rm build dir",
- "llvm",
- "(stage 1)"],
- workdir=".", env=env))
+ haltOnFailure = True,
+ description = ["rm build dir",
+ "llvm",
+ "(stage 1)"],
+ workdir = ".",
+ env = merged_env))
# Configure llvm (stage 1).
base_llvm_configure_args = [WithProperties("%(builddir)s/llvm.src/configure")]
@@ -66,11 +78,12 @@
stage_configure_args +
["--without-llvmgcc",
"--without-llvmgxx"],
- description=["configure",
- "llvm",
- "(stage 1)",
- stage1_config],
- workdir="llvm.obj", env=env))
+ description = [ "configure",
+ "llvm",
+ "(stage 1)",
+ stage1_config ],
+ workdir = "llvm.obj",
+ env = merged_env))
# Build llvm (stage 1).
base_llvm_make_args = ['nice', '-n', '10',
@@ -78,30 +91,33 @@
if verbose:
base_llvm_make_args.append('VERBOSE=1')
f.addStep(WarningCountingShellCommand(name = "compile.llvm.stage1",
- command=base_llvm_make_args,
+ command = base_llvm_make_args,
haltOnFailure = True,
- description=["compile",
- "llvm",
- "(stage 1)",
- stage1_config],
- workdir="llvm.obj", env=env,
- timeout=timeout*60))
+ description = ["compile",
+ "llvm",
+ "(stage 1)",
+ stage1_config],
+ workdir = "llvm.obj",
+ env = merged_env,
+ timeout = timeout * 60))
# Run LLVM tests (stage 1).
f.addStep(ClangTestCommand(name = 'test.llvm.stage1',
command = [make, "check-lit", "VERBOSE=1"],
- description = ["testing", "llvm"],
- descriptionDone = ["test", "llvm"],
- workdir = 'llvm.obj', env=env))
+ description = ["testing", "llvm"],
+ descriptionDone = ["test", "llvm"],
+ workdir = 'llvm.obj',
+ env = merged_env))
# Clean up llvm-gcc.
if clean:
f.addStep(ShellCommand(name="rm-llvm-gcc.obj.stage1",
command=["rm", "-rf", "llvm-gcc.obj"],
haltOnFailure = True,
- description=["rm build dir",
- "llvm-gcc"],
- workdir=".", env=env))
+ description = ["rm build dir",
+ "llvm-gcc"],
+ workdir = ".",
+ env = merged_env))
# Configure llvm-gcc.
base_llvmgcc_configure_args = ["../llvm-gcc.src/configure"]
@@ -122,38 +138,42 @@
WithProperties("--prefix=%(builddir)s/llvm-gcc.install"),
WithProperties("--enable-llvm=%(builddir)s/llvm.obj")]),
haltOnFailure = True,
- description=["configure",
- "llvm-gcc",
- "(stage 1)"],
- workdir="llvm-gcc.obj", env=env))
+ description = ["configure",
+ "llvm-gcc",
+ "(stage 1)"],
+ workdir = "llvm-gcc.obj",
+ env = merged_env))
# Build llvm-gcc.
f.addStep(WarningCountingShellCommand(name="compile.llvm-gcc.stage1",
command=['nice', '-n', '10',
make, WithProperties("-j%s" % jobs)],
- haltOnFailure=True,
- description=["compile",
- "llvm-gcc"],
- workdir="llvm-gcc.obj", env=env,
- timeout=timeout*60))
+ haltOnFailure = True,
+ description = ["compile",
+ "llvm-gcc"],
+ workdir = "llvm-gcc.obj",
+ env = merged_env,
+ timeout = timeout * 60))
# Clean up llvm-gcc install.
if clean:
f.addStep(ShellCommand(name="rm-llvm-gcc.install.stage1",
command=["rm", "-rf", "llvm-gcc.install"],
haltOnFailure = True,
- description=["rm install dir",
- "llvm-gcc"],
- workdir=".", env=env))
+ description = ["rm install dir",
+ "llvm-gcc"],
+ workdir = ".",
+ env = merged_env))
# Install llvm-gcc.
f.addStep(WarningCountingShellCommand(name="install.llvm-gcc.stage1",
command=['nice', '-n', '10',
make, 'install'],
- haltOnFailure=True,
- description=["install",
- "llvm-gcc"],
- workdir="llvm-gcc.obj", env=env))
+ haltOnFailure = True,
+ description = ["install",
+ "llvm-gcc"],
+ workdir = "llvm-gcc.obj",
+ env = merged_env))
# We are done if not doing a two-stage build.
if not useTwoStage:
@@ -163,15 +183,16 @@
if clean:
f.addStep(ShellCommand(name="rm-llvm.obj.stage2",
command=["rm", "-rf", "llvm.obj.2"],
- haltOnFailure=True,
- description=["rm build dir",
- "llvm",
- "(stage 2)"],
- workdir=".", env=env))
+ haltOnFailure = True,
+ description = ["rm build dir",
+ "llvm",
+ "(stage 2)"],
+ workdir = ".",
+ env = merged_env))
# Configure llvm (stage 2).
stage_configure_args = getConfigArgs(stage2_config)
- local_env = dict(env)
+ local_env = dict(merged_env)
local_env['CC'] = WithProperties("%(builddir)s/llvm-gcc.install/bin/llvm-gcc")
local_env['CXX'] = WithProperties("%(builddir)s/llvm-gcc.install/bin/llvm-g++")
f.addStep(Configure(name="configure.llvm.stage2",
@@ -179,43 +200,47 @@
stage_configure_args +
[WithProperties("--with-llvmgcc=%(builddir)s/llvm-gcc.install/bin/llvm-gcc"),
WithProperties("--with-llvmgxx=%(builddir)s/llvm-gcc.install/bin/llvm-g++")],
- haltOnFailure=True,
- workdir="llvm.obj.2",
- description=["configure",
- "llvm",
- "(stage 2)",
- stage2_config], env=local_env))
+ haltOnFailure = True,
+ description = ["configure",
+ "llvm",
+ "(stage 2)",
+ stage2_config],
+ workdir = "llvm.obj.2",
+ env = local_env))
# Build LLVM (stage 2).
f.addStep(WarningCountingShellCommand(name = "compile.llvm.stage2",
command = base_llvm_make_args,
haltOnFailure = True,
- description=["compile",
- "llvm",
- "(stage 2)",
- stage2_config],
- workdir="llvm.obj.2", env=env,
- timeout=timeout*60))
+ description = ["compile",
+ "llvm",
+ "(stage 2)",
+ stage2_config],
+ workdir = "llvm.obj.2",
+ env = merged_env,
+ timeout = timeout * 60))
# Run LLVM tests (stage 2).
f.addStep(ClangTestCommand(name = 'test.llvm.stage2',
command = [make, "check-lit", "VERBOSE=1"],
- description = ["testing", "llvm", "(stage 2)"],
- descriptionDone = ["test", "llvm", "(stage 2)"],
- workdir = 'llvm.obj.2', env=env))
+ description = ["testing", "llvm", "(stage 2)"],
+ descriptionDone = ["test", "llvm", "(stage 2)"],
+ workdir = 'llvm.obj.2',
+ env = merged_env))
# Clean up llvm-gcc (stage 2).
if clean:
f.addStep(ShellCommand(name="rm-llvm-gcc.obj.stage2",
command=["rm", "-rf", "llvm-gcc.obj.2"],
haltOnFailure = True,
- description=["rm build dir",
- "llvm-gcc",
- "(stage 2)"],
- workdir=".", env=env))
+ description = ["rm build dir",
+ "llvm-gcc",
+ "(stage 2)"],
+ workdir = ".",
+ env = merged_env))
# Configure llvm-gcc (stage 2).
- local_env = dict(env)
+ local_env = dict(merged_env)
local_env['CC'] = WithProperties("%(builddir)s/llvm-gcc.install/bin/llvm-gcc")
local_env['CXX'] = WithProperties("%(builddir)s/llvm-gcc.install/bin/llvm-g++")
f.addStep(Configure(name = 'configure.llvm-gcc.stage2',
@@ -224,67 +249,75 @@
WithProperties("--prefix=%(builddir)s/llvm-gcc.install.2"),
WithProperties("--enable-llvm=%(builddir)s/llvm.obj.2")],
haltOnFailure = True,
- description=["configure",
- "llvm-gcc",
- "(stage 2)"],
- workdir="llvm-gcc.obj.2", env=local_env))
+ description = ["configure",
+ "llvm-gcc",
+ "(stage 2)"],
+ workdir = "llvm-gcc.obj.2",
+ env = local_env))
# Build llvm-gcc (stage 2).
f.addStep(WarningCountingShellCommand(name="compile.llvm-gcc.stage2",
command=['nice', '-n', '10',
make, WithProperties("-j%s" % jobs)],
- haltOnFailure=True,
- description=["compile",
- "llvm-gcc",
- "(stage 2)"],
- workdir="llvm-gcc.obj.2", env=env,
- timeout=timeout*60))
+ haltOnFailure = True,
+ description = ["compile",
+ "llvm-gcc",
+ "(stage 2)"],
+ workdir = "llvm-gcc.obj.2",
+ env = merged_env,
+ timeout = timeout * 60))
# Clean up llvm-gcc install (stage 2).
if clean:
f.addStep(ShellCommand(name="rm-llvm-gcc.install.stage2",
command=["rm", "-rf", "llvm-gcc.install.2"],
haltOnFailure = True,
- description=["rm install dir",
- "llvm-gcc",
- "(stage 2)"],
- workdir=".", env=env))
+ description = ["rm install dir",
+ "llvm-gcc",
+ "(stage 2)"],
+ workdir = ".",
+ env = merged_env))
# Install llvm-gcc.
f.addStep(WarningCountingShellCommand(name="install.llvm-gcc.stage2",
command = ['nice', '-n', '10',
make, 'install'],
- haltOnFailure=True,
- description=["install",
- "llvm-gcc",
- "(stage 2)"],
- workdir="llvm-gcc.obj.2", env=env))
+ haltOnFailure = True,
+ description = ["install",
+ "llvm-gcc",
+ "(stage 2)"],
+ workdir = "llvm-gcc.obj.2",
+ env = merged_env))
if package_dst:
- addPackageStep(f, package_dst, obj_path='llvm-gcc.install.2')
+ addPackageStep(f, package_dst, obj_path = 'llvm-gcc.install.2', env = merged_env)
return f
import os
def addPackageStep(f, package_dst,
obj_path,
- info_string='%(phase_id)s'):
+ info_string = '%(phase_id)s',
+ env = {}):
# Package and upload.
name = WithProperties(
os.path.join("%(builddir)s", obj_path,
"llvm-gcc-%s.tar.gz" % info_string))
- f.addStep(ShellCommand(name='pkg.tar',
- description="tar root",
- command=["tar", "zcvf", name, "./"],
- workdir=obj_path,
- warnOnFailure=True,
- flunkOnFailure=False,
- haltOnFailure=False))
- f.addStep(ShellCommand(name='pkg.upload',
- description="upload root",
- command=["scp", name, package_dst],
- workdir=".",
- warnOnFailure=True,
- flunkOnFailure=False,
- haltOnFailure=False))
+ f.addStep(ShellCommand(name = 'pkg.tar',
+ description = "tar root",
+ command = ["tar", "zcvf", name, "./"],
+ workdir = obj_path,
+ env = env,
+ warnOnFailure = True,
+ flunkOnFailure = False,
+ haltOnFailure = False))
+
+ f.addStep(ShellCommand(name = 'pkg.upload',
+ description = "upload root",
+ command = ["scp", name, package_dst],
+ workdir = ".",
+ env = env,
+ warnOnFailure = True,
+ flunkOnFailure = False,
+ haltOnFailure = False))
Modified: zorg/trunk/zorg/buildbot/builders/NightlytestBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/NightlytestBuilder.py?rev=142405&r1=142404&r2=142405&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/NightlytestBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/NightlytestBuilder.py Tue Oct 18 14:48:45 2011
@@ -10,14 +10,24 @@
def getNightlytestBuildFactory(submitAux=None, *args, **kwargs):
f = LLVMGCCBuilder.getLLVMGCCBuildFactory(*args, **kwargs)
+ # Prepare environmental variables. Set here all env we want everywhere.
+ merged_env = {
+ 'TERM' : 'dumb' # Make sure Clang doesn't use color escape sequences.
+ }
+
+ env = kwargs.pop('env', None)
+ if env is not None:
+ merged_env.update(env) # Overwrite pre-set items with the given ones, so user can set anything.
+
# Copy NT script.
f.addStep(ShellCommand(name="cp test script",
command=["cp",
WithProperties("%(builddir)s/llvm.src/utils/NewNightlyTest.pl"),
"."],
- haltOnFailure=True,
- workdir="llvm.nt",
- description="cp test script"))
+ haltOnFailure = True,
+ description = "cp test script",
+ workdir = "llvm.nt",
+ env = merged_env))
submitCommand = []
if submitAux is not None:
@@ -37,13 +47,14 @@
"-test-cxxflags", "-I/usr/include/c++/4.2.1/i686-apple-darwin10 -I/usr/include/c++/4.2.1",
"-nosubmit",
"-teelogs"] + submitCommand,
- env={ 'LLVMGCCDIR' : WithProperties("%(builddir)s/llvm-gcc.install"),
- 'BUILDDIR' : WithProperties("%(builddir)s/llvm.nt/build"),
- 'WEBDIR' : WithProperties("%(builddir)s/llvm.nt/testresults"),
- },
- haltOnFailure=True,
- workdir="llvm.nt",
- description="nightlytest"))
+ haltOnFailure = True,
+ description = "nightlytest",
+ workdir = "llvm.nt",
+ env = {
+ 'LLVMGCCDIR' : WithProperties("%(builddir)s/llvm-gcc.install"),
+ 'BUILDDIR' : WithProperties("%(builddir)s/llvm.nt/build"),
+ 'WEBDIR' : WithProperties("%(builddir)s/llvm.nt/testresults"),
+ }.update(merged_env)))
return f
def getFastNightlyTestBuildFactory(triple, xfails=[], clean=True, test=False, **kwargs):
@@ -52,20 +63,30 @@
triple, outOfDir=True, clean=clean, test=test,
**kwargs)
+ # Prepare environmental variables. Set here all env we want everywhere.
+ merged_env = {
+ 'TERM' : 'dumb' # Make sure Clang doesn't use color escape sequences.
+ }
+ env = kwargs.pop('env', None)
+ if env is not None:
+ merged_env.update(env) # Overwrite pre-set items with the given ones, so user can set anything.
+
# Get the test-suite sources.
- f.addStep(SVN(name='svn-test-suite',
- mode='update',
- baseURL='http://llvm.org/svn/llvm-project/test-suite/',
- defaultBranch='trunk',
- workdir='test-suite.src'))
+ f.addStep(SVN(name = 'svn-test-suite',
+ mode = 'update',
+ baseURL = 'http://llvm.org/svn/llvm-project/test-suite/',
+ defaultBranch = 'trunk',
+ workdir = 'test-suite.src',
+ env = merged_env))
# Clean up.
if clean:
f.addStep(ShellCommand(name="rm.test-suite",
command=["rm", "-rf", "test-suite.obj"],
- haltOnFailure=True,
- description="rm test-suite build dir",
- workdir="."))
+ haltOnFailure = True,
+ description = "rm test-suite build dir",
+ workdir = ".",
+ env = merged_env))
# Configure.
f.addStep(Configure(name="configure.test-suite",
@@ -73,27 +94,32 @@
WithProperties("--with-llvmsrc=%(builddir)s/llvm.src"),
WithProperties("--with-llvmobj=%(builddir)s/llvm.obj"),
WithProperties("--with-built-clang")],
- haltOnFailure=True,
- workdir='test-suite.obj',
- description=["configure", "test-suite"]))
+ haltOnFailure = True,
+ description = ["configuring", "test-suite"],
+ descriptionDone = ["configure", "test-suite"],
+ workdir = 'test-suite.obj',
+ env = merged_env))
# Build and test.
f.addStep(ShellCommand(name="rm.test-suite.report",
command=["rm", "-rf",
"test-suite.obj/report.nightly.raw.out",
"test-suite.obj/report.nightly.txt"],
- haltOnFailure=True,
- description="rm test-suite report",
- workdir="."))
+ haltOnFailure = True,
+ description = "rm test-suite report",
+ workdir = ".",
+ env = merged_env))
f.addStep(NightlyTestCommand(name="make.test-suite",
command=["make", WithProperties("-j%(jobs)s"),
"ENABLE_PARALLEL_REPORT=1",
"DISABLE_CBE=1", "DISABLE_JIT=1",
"TEST=nightly", "report"],
- haltOnFailure=True,
- workdir='test-suite.obj',
- description=["run", "test-suite"],
- logfiles={ 'report' : 'report.nightly.txt' },
- xfails=xfails))
+ haltOnFailure = True,
+ logfiles = { 'report' : 'report.nightly.txt' },
+ xfails = xfails,
+ description = ["running", "test-suite"],
+ descriptionDone = ["run", "test-suite"],
+ workdir = 'test-suite.obj',
+ env = merged_env))
return f
More information about the llvm-commits
mailing list