summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/scripts/use_lldb_suite.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/scripts/use_lldb_suite.py b/lldb/scripts/use_lldb_suite.py
index 6e24b9da8d3..a1a2e8b9367 100644
--- a/lldb/scripts/use_lldb_suite.py
+++ b/lldb/scripts/use_lldb_suite.py
@@ -6,9 +6,10 @@ import sys
def find_lldb_root():
lldb_root = os.path.dirname(inspect.getfile(inspect.currentframe()))
while True:
- lldb_root = os.path.dirname(lldb_root)
- if lldb_root is None:
- return None
+ parent = os.path.dirname(lldb_root)
+ if parent == lldb_root: # dirname('/') == '/'
+ break
+ lldb_root = parent
test_path = os.path.join(lldb_root, "use_lldb_suite_root.py")
if os.path.isfile(test_path):
OpenPOWER on IntegriCloud