[Lldb-commits] [lldb] r284045 - Use LLDB_SRC for relative paths
Chris Bieneman via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 12 13:24:43 PDT 2016
Author: cbieneman
Date: Wed Oct 12 15:24:42 2016
New Revision: 284045
URL: http://llvm.org/viewvc/llvm-project?rev=284045&view=rev
Log:
Use LLDB_SRC for relative paths
Summary:
Going from LLDB_SRC instead of the file path is safer when looking for compiler-rt. Also need to add support for looking inside the LLVM runtimes subdirectory.
Eventually we should just get CMake to provide these paths during configuration.
Reviewers: tfiala, zturner
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D25489
Modified:
lldb/trunk/packages/Python/lldbsuite/test/decorators.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/decorators.py?rev=284045&r1=284044&r2=284045&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/decorators.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/decorators.py Wed Oct 12 15:24:42 2016
@@ -649,14 +649,22 @@ def skipUnlessCompilerRt(func):
"""Decorate the item to skip tests if testing remotely."""
def is_compiler_rt_missing():
compilerRtPath = os.path.join(
- os.path.dirname(__file__),
- "..",
+ os.environ["LLDB_SRC"],
"..",
"..",
"..",
"llvm",
"projects",
"compiler-rt")
+ if not os.path.exists(compilerRtPath):
+ compilerRtPath = os.path.join(
+ os.environ["LLDB_SRC"],
+ "..",
+ "..",
+ "..",
+ "llvm",
+ "runtimes",
+ "compiler-rt")
return "compiler-rt not found" if not os.path.exists(
compilerRtPath) else None
return skipTestIfFn(is_compiler_rt_missing)(func)
More information about the lldb-commits
mailing list