[PATCH] D17666: [zorg] Correcting a bug in ClangLTO3StageBuilder.py.
Mike Edwards via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 16:48:52 PST 2016
sqlbyme created this revision.
sqlbyme added a reviewer: gkistanova.
sqlbyme added a subscriber: llvm-commits.
sqlbyme added a project: Zorg.
Herald added a subscriber: joker.eph.
Patch by Galina Kistanova & Mike Edwards
Galina fixed a bug by producing a much more elegant way to extract the current clang release version, which we need to set as a Buildbot property.
I fixed the fact that I had labeled the property incorrectly. It is now labeled correctly: clang_ver
I also corrected some of the names for build steps so they are more descriptive.
http://reviews.llvm.org/D17666
Files:
zorg/buildbot/builders/ClangLTOBuilder3Stage.py
Index: zorg/buildbot/builders/ClangLTOBuilder3Stage.py
===================================================================
--- zorg/buildbot/builders/ClangLTOBuilder3Stage.py
+++ zorg/buildbot/builders/ClangLTOBuilder3Stage.py
@@ -46,12 +46,22 @@
)
# We have to programatically determine the current llvm version.
+ def getClangVer(exit_status, stdout, stderr):
+ # We expect something like this:
+ # release = '3.9'
+ if exit_status:
+ return {}
+ k,v = stdout.split('=')
+ llvm_ver = v.strip().strip("\'\"")
+ return { 'clang_ver' : clang_ver }
+
f.addStep(
SetProperty(
- name="get_llvm_ver",
- command=["grep 'release =' %s/tools/clang/docs/conf.py | awk '{print $3;}' | sed \"s/'//g\"" % llvm_srcdir],
- property="llvm_ver",
- description="get llvm release ver",
+ name="get_clang_ver",
+ command=["grep", "release =", "./tools/clang/docs/conf.py"],
+ extract_fn=getClangVer,
+ property="clang_ver",
+ description="get clang release ver",
workdir=llvm_srcdir,
env=merged_env
)
@@ -98,7 +108,7 @@
if build_gold:
f.addStep(
- NinjaCommand(name='build',
+ NinjaCommand(name='build-LLVMgold.so',
targets=['lib/LLVMgold.so'],
haltOnFailure=True,
warnOnWarnings=True,
@@ -108,7 +118,7 @@
)
f.addStep(
- NinjaCommand(name='build',
+ NinjaCommand(name='build-stage3-clang',
targets=['stage3-clang'],
haltOnFailure=True,
warnOnWarnings=True,
@@ -118,7 +128,7 @@
)
f.addStep(
- NinjaCommand(name='build',
+ NinjaCommand(name='build-stage3-check-clang',
targets=['stage3-check-clang'],
haltOnFailure=True,
warnOnWarnings=True,
@@ -131,12 +141,12 @@
shell_command = [
"diff",
"-q",
- "tools/clang/stage2-bins/bin/clang-%(llvm_ver)s",
- "tools/clang/stage2-bins/tools/clang/stage3-bins/bin/clang-%(llvm_ver)s"
+ "tools/clang/stage2-bins/bin/clang-%(clang_ver)s",
+ "tools/clang/stage2-bins/tools/clang/stage3-bins/bin/clang-%(clang_ver)s"
]
f.addStep(
ShellCommand(
- name="compare",
+ name="compare-clang",
description=["comapre stage2 & stage3 clang"],
haltOnFailure=True,
command=WithProperties(" ".join(shell_command)),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17666.49268.patch
Type: text/x-patch
Size: 2585 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160227/0cc82e4c/attachment.bin>
More information about the llvm-commits
mailing list