[PATCH] Add support of multiple test compilers and architecture for LLDB cmake builder

Siva Chandra sivachandra at google.com
Tue Mar 17 03:52:20 PDT 2015


Please address comments before committing.


================
Comment at: buildbot/osuosl/master/config/builders.py:722
@@ -722,1 +721,3 @@
                     build_type="Debug",
+                    test_arch=['x86_64', 'i386'],
+                    test_compilers=['clang', 'totclang', 'gcc4.8.2'],
----------------
chying wrote:
> sivachandra wrote:
> > chying wrote:
> > > sivachandra wrote:
> > > > Can we have two archs on the same build slave??
> > > Yes, it's one of the test branches to run i386 build on x86_64 machine.
> > > The test result of i386 build running on x86_64 vs. i386 build running on 32 bit machine might be different, so next step would be to run i386 build on 32 bit machine. 
> > > 
> > OK. Since getLLDBUbuntuCMakeBuildFactory is a generic utility, you should check whether the architectures listed are compatible in getLLDBUbuntuCMakeBuildFactory. For example, using x86_64 lldb to debug x86_64 binaries on i386 is fine. But, using i386 LLDB is probably not OK for debugging x86_64 binaries. You could for now keep something very simple like and stick to x86_64 and i386 like this:
> > 
> >     if platform.machine() == 'x86_64':
> >         compatible_archs = ['x86_64', 'i386']
> >         assert(all([x in compatible_archs for x in test_archs]))
> This code will run on buildbot master machine, so it will return the machine architecture of master host. And assert will also fail on master side if any unsupported arch is specified.
> The only way to run code on slave side is by factory.addStep(...). 
> We need to create some script on the fly and invoke script on slave machine to achieve this.
> I suggest to keep the code as is for now, and come back to this when we have more time.
OK. Sorry, I missed the fact that this runs on the master. If you do not have a simple solution for now, put a TODO about this just so that readers are aware of the problem.

================
Comment at: zorg/buildbot/builders/LLDBBuilder.py:241
@@ -230,3 +240,3 @@
 
-#Cmake bulids on Ubuntu
-#Build command sequnce - cmake, ninja, ninja check-lldb
+# Cmake bulids on Ubuntu
+# Build command sequnce - cmake, ninja, ./doset
----------------
s/bulids/builds

================
Comment at: zorg/buildbot/builders/LLDBBuilder.py:242
@@ +241,3 @@
+# Cmake bulids on Ubuntu
+# Build command sequnce - cmake, ninja, ./doset
+# Note: If test_archs or test_compilers is not specified, lldb-test will be skipped
----------------
s/sequnce/sequence
s/doset/dosep

================
Comment at: zorg/buildbot/builders/LLDBBuilder.py:243
@@ -233,1 +242,3 @@
+# Build command sequnce - cmake, ninja, ./doset
+# Note: If test_archs or test_compilers is not specified, lldb-test will be skipped
 def getLLDBUbuntuCMakeBuildFactory(
----------------
Just so that it doesn't seem I missed, you should ideally put pydoc style comments. However, it does not seem to be the style in this file. Hence, I leave it up to you.

================
Comment at: zorg/buildbot/builders/LLDBBuilder.py:243
@@ -233,1 +242,3 @@
+# Build command sequnce - cmake, ninja, ./doset
+# Note: If test_archs or test_compilers is not specified, lldb-test will be skipped
 def getLLDBUbuntuCMakeBuildFactory(
----------------
sivachandra wrote:
> Just so that it doesn't seem I missed, you should ideally put pydoc style comments. However, it does not seem to be the style in this file. Hence, I leave it up to you.
I think a better comment would be:

If test_archs or test_compilers are None or empty, test steps will not be added to the build factory.

================
Comment at: zorg/buildbot/builders/LLDBBuilder.py:259
@@ -244,1 +258,3 @@
+    if test_compilers is None:
+        test_compilers=[]
 
----------------
Please modify lines 256 to 259 to this:

    if (not test_archs) or (not test_compilers):
        return f

and move these two lines to after line 305.

http://reviews.llvm.org/D8335

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list