[PATCH] [zorg] Rev2: Fix get slave environment in LLDB Windows builder.

Rick Foos rfoos at codeaurora.org
Fri Jan 23 08:29:04 PST 2015


Hi gkistanova, zturner,

Fixes for lldb-x86-windows-msvc
    Change vcvars_command to use '\\' to join paths.
    Change vs_common default to r"""...""" string.
Fixes for lldb-x86-win7-msvc
    Change ninja_cmd to unique build, install, and check commands.
    Use a list append to attach job control property variable.
    Add ignoreInstallFail
    Add warnings and halt to ignore fail actions.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7149

Files:
  zorg/buildbot/builders/LLDBBuilder.py

Index: zorg/buildbot/builders/LLDBBuilder.py
===================================================================
--- zorg/buildbot/builders/LLDBBuilder.py
+++ zorg/buildbot/builders/LLDBBuilder.py
@@ -36,11 +36,11 @@
                   workdir='%s/tools/lldb' % llvmTopDir))
     return f
 
-def generateVisualStudioEnvironment(vs_common=r"%VS120COMNTOOLS%", target_arch=None):
+def generateVisualStudioEnvironment(vs_common=r"""%VS120COMNTOOLS%""", target_arch=None):
     arch_arg = {'x86': 'x86', 'x64': 'amd64', 'amd64': 'amd64'}.get(target_arch, '%PROCESSOR_ARCHITECTURE%')
     
-    vcvars_command = "\"" + os.path.join(vs_common, '..','..','VC', 'vcvarsall.bat') + "\""
-    vcvars_command = "%s %s && set" % (vcvars_command, arch_arg)
+    vcvars_command = "\"" + r"\\".join((vs_common, '..','..','VC', 'vcvarsall.bat')) + "\""
+    vcvars_command = r"%s %s && set" % (vcvars_command, arch_arg)
     return vcvars_command
 
 # CMake Windows builds
@@ -53,13 +53,13 @@
             python_source_dir=r'C:/src/python',
 
             # Default values for VS devenv and build configuration
-            vs_common=r"%VS120COMNTOOLS%",
+            vs_common=r"""%VS120COMNTOOLS%""",
             config='Release',
             target_arch='x86',
 
             extra_cmake_args=[],
             test='ignoreFail',
-            install=True):
+            install='ignoreFail'):
 
     ############# PREPARING
     f = buildbot.process.factory.BuildFactory()
@@ -72,8 +72,15 @@
 
     f = getLLDBSource(f,'llvm')
 
-    ninja_cmd=['ninja', WithProperties("-j%s" % jobs)]
+    build_cmd=['ninja']
+    install_cmd = ['ninja','install']
+    test_cmd = ['ninja','check-lldb']
 
+    if jobs:
+        build_cmd.append(WithProperties("-j%s" % jobs))
+        install_cmd.append(WithProperties("-j%s" % jobs))
+        test_cmd.append(WithProperties("-j%s" % jobs))
+
     # Global configurations
     build_dir='build'
 
@@ -118,24 +125,29 @@
                            env=Property('slave_env')))
 
     f.addStep(WarningCountingShellCommand(name='build',
-                          command=ninja_cmd,
+                          command=build_cmd,
                           haltOnFailure=True,
                           description='ninja build',
                           workdir=build_dir,
                           env=Property('slave_env')))
 
+    ignoreInstallFail = bool(install != 'ignoreFail')
     f.addStep(ShellCommand(name='install',
-                          command=[ninja_cmd,'install'],
-                          haltOnFailure=False,
+                          command=install_cmd,
+                          haltOnFailure=ignoreInstallFail,
+                          warnOnFailure=ignoreInstallFail,
+                          flunkOnFailure=ignoreInstallFail,
                           description='ninja install',
                           workdir=build_dir,
-                          doStepIf=install,
+                          doStepIf=bool(install),
                           env=Property('slave_env')))
 
+    ignoreTestFail = bool(test != 'ignoreFail')
     f.addStep(ShellCommand(name='test',
-                          command=[ninja_cmd,'check-lldb'],
-                          haltOnFailure=False,
-                          flunkOnFailure=bool(test != 'ignoreFail'),
+                          command=test_cmd,
+                          haltOnFailure=ignoreTestFail,
+                          warnOnFailure=ignoreTestFail,
+                          flunkOnFailure=ignoreTestFail,
                           description='ninja test',
                           workdir=build_dir,
                           doStepIf=bool(test),

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7149.18680.patch
Type: text/x-patch
Size: 3677 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150123/5c54f647/attachment.bin>


More information about the llvm-commits mailing list