[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / lldb / packages / Python / lldbsuite / __init__.py
blob4b59e4119b2a1f429e889d764f114fc58913eb3f
1 # Module level initialization for the `lldbsuite` module.
3 import inspect
4 import os
5 import sys
8 def find_lldb_root():
9 lldb_root = os.path.dirname(inspect.getfile(inspect.currentframe()))
10 while True:
11 lldb_root = os.path.dirname(lldb_root)
12 if lldb_root is None:
13 return None
15 test_path = os.path.join(lldb_root, "use_lldb_suite_root.py")
16 if os.path.isfile(test_path):
17 return lldb_root
18 return None
20 # lldbsuite.lldb_root refers to the root of the git/svn source checkout
21 lldb_root = find_lldb_root()
23 # lldbsuite.lldb_test_root refers to the root of the python test tree
24 lldb_test_root = os.path.join(
25 lldb_root,
26 "packages",
27 "Python",
28 "lldbsuite",
29 "test")