From 47df0196b834ecd1d94acf6057b783a4b5553fc2 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Wed, 12 Oct 2016 20:24:42 +0000 Subject: [PATCH] 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 llvm-svn: 284045 --- lldb/packages/Python/lldbsuite/test/decorators.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py index 805c707..1693735 100644 --- a/lldb/packages/Python/lldbsuite/test/decorators.py +++ b/lldb/packages/Python/lldbsuite/test/decorators.py @@ -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) -- 2.7.4