[Lldb-commits] [lldb] r125584 - /lldb/trunk/test/dotest.py

Johnny Chen johnny.chen at apple.com
Tue Feb 15 10:50:19 PST 2011


Author: johnny
Date: Tue Feb 15 12:50:19 2011
New Revision: 125584

URL: http://llvm.org/viewvc/llvm-project?rev=125584&view=rev
Log:
Refactored the test driver to abstract out the Python sys.path specification for
different build configurations.

Modified:
    lldb/trunk/test/dotest.py

Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=125584&r1=125583&r2=125584&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Tue Feb 15 12:50:19 2011
@@ -496,18 +496,19 @@
         return
         
     base = os.path.abspath(os.path.join(scriptPath, os.pardir))
-    dbgPath = os.path.join(base, 'build', 'Debug', 'LLDB.framework',
-                           'Resources', 'Python')
-    dbgPath2 = os.path.join(base, 'build', 'lldb', 'Build', 'Products', 
-                            'Debug', 'LLDB.framework', 'Resources', 'Python')
-    relPath = os.path.join(base, 'build', 'Release', 'LLDB.framework',
-                           'Resources', 'Python')
-    relPath2 = os.path.join(base, 'build', 'lldb', 'Build', 'Products', 
-                            'Release', 'LLDB.framework', 'Resources', 'Python')
-    baiPath = os.path.join(base, 'build', 'BuildAndIntegration',
-                           'LLDB.framework', 'Resources', 'Python')
-    baiPath2 = os.path.join(base, 'build', 'lldb', 'Build', 'Products', 
-                           'BuildAndIntegration', 'LLDB.framework', 'Resources', 'Python')
+
+    xcode3_build_dir = ['build']
+    xcode4_build_dir = ['build', 'lldb', 'Build', 'Products']
+    dbg = ['Debug']
+    rel = ['Release']
+    bai = ['BuildAndIntegration']
+    python_resource_dir = ['LLDB.framework', 'Resources', 'Python']
+    dbgPath  = os.path.join(base, *(xcode3_build_dir + dbg + python_resource_dir))
+    dbgPath2 = os.path.join(base, *(xcode4_build_dir + dbg + python_resource_dir))
+    relPath  = os.path.join(base, *(xcode3_build_dir + rel + python_resource_dir))
+    relPath2 = os.path.join(base, *(xcode4_build_dir + rel + python_resource_dir))
+    baiPath  = os.path.join(base, *(xcode3_build_dir + bai + python_resource_dir))
+    baiPath2 = os.path.join(base, *(xcode4_build_dir + bai + python_resource_dir))
 
     lldbPath = None
     if os.path.isfile(os.path.join(dbgPath, 'lldb.py')):





More information about the lldb-commits mailing list