fix for unit tests finding path to LLDB.h http://reviews.llvm.org/D6177
authorShawn Best <sbest@blueshiftinc.com>
Sat, 8 Nov 2014 00:04:04 +0000 (00:04 +0000)
committerShawn Best <sbest@blueshiftinc.com>
Sat, 8 Nov 2014 00:04:04 +0000 (00:04 +0000)
llvm-svn: 221566

lldb/test/lldbtest.py

index 3b99f4b..3e2e8a0 100644 (file)
@@ -565,7 +565,10 @@ def skipIfNoSBHeaders(func):
     def wrapper(*args, **kwargs):
         from unittest2 import case
         self = args[0]
-        header = os.path.join(self.lib_dir, 'LLDB.framework', 'Versions','Current','Headers','LLDB.h')
+        if sys.platform.startswith("darwin"):
+            header = os.path.join(self.lib_dir, 'LLDB.framework', 'Versions','Current','Headers','LLDB.h')
+        else:
+            header = os.path.join(os.environ["LLDB_SRC"], "include", "lldb", "API", "LLDB.h")
         platform = sys.platform
         if not os.path.exists(header):
             self.skipTest("skip because LLDB.h header not found")