[Lldb-commits] [lldb] r187121 - Fix test execution on FreeBSD versions other than 9.x

Ed Maste emaste at freebsd.org
Thu Jul 25 06:24:34 PDT 2013

Author: emaste
Date: Thu Jul 25 08:24:34 2013
New Revision: 187121

URL: http://llvm.org/viewvc/llvm-project?rev=187121&view=rev
Fix test execution on FreeBSD versions other than 9.x

The tests use a plugin based on the name from sys.platform.
Unfortunately that string includes the major version number in
Python 2.7, so the tests would look for builder_freebsd9.py,
builder_freebsd10.py, etc.

The issue doesn't affect Linux as Python returns 'linux2' also
on Linux 3.x -- see http://bugs.python.org/issue12326 for details.

It seems later versions of Python will drop the major version
number, so adopt this convention now for FreeBSD.

      - copied unchanged from r187106, lldb/trunk/test/plugins/builder_freebsd9.py

Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=187121&r1=187120&r2=187121&view=diff
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Thu Jul 25 08:24:34 2013
@@ -296,6 +296,8 @@ def getsource_if_available(obj):
         return repr(obj)
 def builder_module():
+    if sys.platform.startswith("freebsd"):
+        return __import__("builder_freebsd")
     return __import__("builder_" + sys.platform)

Removed: lldb/trunk/test/plugins/builder_freebsd9.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/plugins/builder_freebsd9.py?rev=187120&view=auto
--- lldb/trunk/test/plugins/builder_freebsd9.py (original)
+++ lldb/trunk/test/plugins/builder_freebsd9.py (removed)
@@ -1,4 +0,0 @@
-from builder_base import *
-def buildDsym(sender=None, architecture=None, compiler=None, dictionary=None, clean=True):
-    return False

More information about the lldb-commits mailing list