diff options
author | Chris Bieneman <beanz@apple.com> | 2016-10-12 20:22:02 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-10-12 20:22:02 +0000 |
commit | c6667075b3474cc9e0519e99843df8ebb92d6b30 (patch) | |
tree | bc26a3828d87e92d4092f6e750fdbde30f2d7351 /lldb/packages/Python/lldbsuite/test | |
parent | 4c63acc39e317183bfb7b4e20e8107430035fadc (diff) | |
download | bcm5719-llvm-c6667075b3474cc9e0519e99843df8ebb92d6b30.tar.gz bcm5719-llvm-c6667075b3474cc9e0519e99843df8ebb92d6b30.zip |
Fix test suite lookup path for LLDB.h
Summary:
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.
Reviewers: tfiala, zturner
Subscribers: labath, lldb-commits
Differential Revision: https://reviews.llvm.org/D25488
llvm-svn: 284043
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/decorators.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py index ceb9f520621..805c707a3f8 100644 --- a/lldb/packages/Python/lldbsuite/test/decorators.py +++ b/lldb/packages/Python/lldbsuite/test/decorators.py @@ -512,13 +512,15 @@ def skipIfNoSBHeaders(func): '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 |