[llvm-commits] [zorg] r126764 - /zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py
David Dean
david_dean at apple.com
Tue Mar 1 10:12:02 PST 2011
Author: ddean
Date: Tue Mar 1 12:12:02 2011
New Revision: 126764
URL: http://llvm.org/viewvc/llvm-project?rev=126764&view=rev
Log:
Add new method to LLVMGCCBuilder.py to package and upload llvm-gcc artifacts after build. Add new parameter to getLLVMGCCBuildFactory() to enable using new method. Add call to new method into getLLVMGCCBuildFactory() when new parameter is set.
Modified:
zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py
Modified: zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py?rev=126764&r1=126763&r2=126764&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py Tue Mar 1 12:12:02 2011
@@ -15,7 +15,7 @@
stage2_config='Release+Asserts', make='make',
extra_configure_args=[], extra_languages=None,
verbose=False, env = {}, defaultBranch='trunk',
- timeout=20):
+ timeout=20, package_dst=None):
if build or host or target:
if not build or not host or not target:
raise ValueError,"Must specify all of 'build', 'host', 'target' if used."
@@ -259,6 +259,34 @@
"llvm-gcc",
"(stage 2)"],
workdir="llvm-gcc.obj.2", env=env))
+ if package_dst:
+ addPackageStep(f, package_dst, obj_path='llvm-gcc.install.2')
return f
+import os
+def addPackageStep(f, package_dst,
+ obj_path,
+ project = '%(builder)s',
+ info_string='r%(got_revision)s'):
+
+ # Package and upload.
+ name = WithProperties(
+ os.path.join("%(builddir)s", obj_path,
+ "%s-%s-b%%(buildnumber)s.tar.gz" % (project, info_string)))
+ f.addStep(ShellCommand(name='pkg.tar',
+ description="tar root",
+ command=["tar", "zcvf", name, "./"],
+ workdir=os.path.join(obj_path, "%s.roots" % project,
+ "%s~dst" % project),
+ 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))
+
More information about the llvm-commits
mailing list