[Lldb-commits] [PATCH] D25488: Fix test suite lookup path for LLDB.h

Chris Bieneman via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 11 14:09:22 PDT 2016


beanz created this revision.
beanz added reviewers: tfiala, zturner.
beanz added a subscriber: lldb-commits.

When running on Darwin, the test suite assumes a specific directory structure for the build directory. This works for the Xcode project builds, but fails for CMake builds regardless of whether or not you are generating the LLDB framework.

This patch allows the Darwin code path to fall back to the more generic code path used by other platforms in the event that LLDB.h isn't where the test suite expects it.

This allows API tests to run on Darwin when building with CMake with the framework build enabled or disabled.


https://reviews.llvm.org/D25488

Files:
  packages/Python/lldbsuite/test/decorators.py


Index: packages/Python/lldbsuite/test/decorators.py
===================================================================
--- packages/Python/lldbsuite/test/decorators.py
+++ packages/Python/lldbsuite/test/decorators.py
@@ -512,13 +512,15 @@
                 'Current',
                 'Headers',
                 'LLDB.h')
-        else:
-            header = os.path.join(
-                os.environ["LLDB_SRC"],
-                "include",
-                "lldb",
-                "API",
-                "LLDB.h")
+            if os.path.exists(header):
+                return None
+        
+        header = os.path.join(
+            os.environ["LLDB_SRC"],
+            "include",
+            "lldb",
+            "API",
+            "LLDB.h")
         if not os.path.exists(header):
             return "skip because LLDB.h header not found"
         return None


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25488.74294.patch
Type: text/x-patch
Size: 875 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20161011/04d42fe5/attachment.bin>


More information about the lldb-commits mailing list