Make the script more friendly when running under python debugger.
authorJohnny Chen <johnny.chen@apple.com>
Wed, 16 May 2012 19:43:14 +0000 (19:43 +0000)
committerJohnny Chen <johnny.chen@apple.com>
Wed, 16 May 2012 19:43:14 +0000 (19:43 +0000)
llvm-svn: 156939

lldb/test/redo.py

index e8ca91b..eee1130 100755 (executable)
@@ -113,6 +113,8 @@ def main():
     global filename_components
 
     test_dir = sys.path[0]
+    if not test_dir:
+        test_dir = os.getcwd()
     if not test_dir.endswith('test'):
         print "This script expects to reside in lldb's test directory."
         sys.exit(-1)