[AMDGPU] Add True16 register classes.
[llvm-project.git] / lldb / test / API / use_lldb_suite.py
blobe237dd4b8a5607c854da5dffc5a153c1cf8c0079
1 import inspect
2 import os
3 import sys
6 def find_lldb_root():
7 lldb_root = os.path.realpath(
8 os.path.dirname(inspect.getfile(inspect.currentframe()))
10 while True:
11 parent = os.path.dirname(lldb_root)
12 if parent == lldb_root: # dirname('/') == '/'
13 raise Exception("use_lldb_suite_root.py not found")
14 lldb_root = parent
16 test_path = os.path.join(lldb_root, "use_lldb_suite_root.py")
17 if os.path.isfile(test_path):
18 return lldb_root
21 lldb_root = find_lldb_root()
23 import imp
25 fp, pathname, desc = imp.find_module("use_lldb_suite_root", [lldb_root])
26 try:
27 imp.load_module("use_lldb_suite_root", fp, pathname, desc)
28 finally:
29 if fp:
30 fp.close()