[zorg] r220523 - Use the jobs property to specify number of threads LIT is allowed to use in LibcxxAndAbiBuilder.

Eric Fiselier eric at efcs.ca
Thu Oct 23 15:15:34 PDT 2014


Author: ericwf
Date: Thu Oct 23 17:15:34 2014
New Revision: 220523

URL: http://llvm.org/viewvc/llvm-project?rev=220523&view=rev
Log:
Use the jobs property to specify number of threads LIT is allowed to use in LibcxxAndAbiBuilder.

Currently LIT will always use all the threads on the system and ignore the number
of jobs allowed by the slave. Fix this by adding '--threads=%(jobs)s' to the LIT
args and deduce the value using properties.

Modified:
    zorg/trunk/buildbot/osuosl/master/config/slaves.py
    zorg/trunk/zorg/buildbot/builders/LibcxxAndAbiBuilder.py

Modified: zorg/trunk/buildbot/osuosl/master/config/slaves.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/master/config/slaves.py?rev=220523&r1=220522&r2=220523&view=diff
==============================================================================
--- zorg/trunk/buildbot/osuosl/master/config/slaves.py (original)
+++ zorg/trunk/buildbot/osuosl/master/config/slaves.py Thu Oct 23 17:15:34 2014
@@ -168,7 +168,7 @@ def get_build_slaves():
         create_slave("systemz-1", properties={'jobs': 4}, max_builds=1),
 
         # Ubuntu 14.04 x86_64, Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz
-        create_slave("ericwf-buildslave", properties={'jobs': 4}, max_builds=1),
+        create_slave("ericwf-buildslave", properties={'jobs': 4}, max_builds=2),
 
         # Defunct.
 

Modified: zorg/trunk/zorg/buildbot/builders/LibcxxAndAbiBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/LibcxxAndAbiBuilder.py?rev=220523&r1=220522&r2=220523&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/LibcxxAndAbiBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/LibcxxAndAbiBuilder.py Thu Oct 23 17:15:34 2014
@@ -72,7 +72,10 @@ def getLibcxxAndAbiBuilder(f=None, env={
         env['CXXFLAGS'] = (env.get('CXXFLAGS', '') +
                            ' -D_LIBCPP_HAS_NO_MONOTONIC_CLOCK')
 
-    litTestArgs = '-sv --show-unsupported --show-xfail'
+    # Specify the max number of threads using properties so LIT doesn't use
+    # all the threads on the system.
+    litTestArgs = '-sv --show-unsupported --show-xfail --threads=%(jobs)s'
+
     if additional_features:
         litTestArgs += (' --param=additional_features=' +
                        ','.join(additional_features))
@@ -80,7 +83,7 @@ def getLibcxxAndAbiBuilder(f=None, env={
     for key in lit_extra_opts:
         litTestArgs += (' --param=' + key + '=' + lit_extra_opts[key])
 
-    cmake_opts = ['-DLLVM_LIT_ARGS='+litTestArgs]
+    cmake_opts = [properties.WithProperties('-DLLVM_LIT_ARGS='+litTestArgs)]
     for key in cmake_extra_opts:
         cmake_opts.append('-D' + key + '=' + cmake_extra_opts[key])
 





More information about the llvm-commits mailing list