summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/paths/TestPaths.py
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-05-13 19:44:57 +0000
committerZachary Turner <zturner@google.com>2015-05-13 19:44:57 +0000
commitff33eefcc7d35bf11330240416a26804c6ff0d2e (patch)
tree58e2c45307105009d13669d078eb65d37b738733 /lldb/test/functionalities/paths/TestPaths.py
parent1aa755ce772a311a1c5280578d6303be8d088203 (diff)
downloadbcm5719-llvm-ff33eefcc7d35bf11330240416a26804c6ff0d2e.tar.gz
bcm5719-llvm-ff33eefcc7d35bf11330240416a26804c6ff0d2e.zip
Fix an issue with finding python on Windows.
Someone must have changed the behavior of FileSpec slightly relating to whether or not there is a trailing backslash when calling GetPath() and GetDirectory(). This caused ScriptInterpreterPython to find the wrong values when initializing sys.path, and as a result we couldn't find the lldb module. This patch fixes the issue, and also adds a test to make sure that GetDirectory() does not return a string containing a trailing slash. llvm-svn: 237282
Diffstat (limited to 'lldb/test/functionalities/paths/TestPaths.py')
-rw-r--r--lldb/test/functionalities/paths/TestPaths.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/test/functionalities/paths/TestPaths.py b/lldb/test/functionalities/paths/TestPaths.py
index bc549a64bf8..abc13d83c45 100644
--- a/lldb/test/functionalities/paths/TestPaths.py
+++ b/lldb/test/functionalities/paths/TestPaths.py
@@ -34,6 +34,12 @@ class TestPaths(TestBase):
# file path if it doesn't exist in the current directory.
self.assertTrue (file_only.GetDirectory() == None)
+ def test_directory_doesnt_end_with_slash(self):
+ current_directory_spec = lldb.SBFileSpec(os.path.curdir)
+ current_directory_string = current_directory_spec.GetDirectory()
+ self.assertNotEqual(current_directory_string[-1:], '/')
+ pass
+
@skipUnlessPlatform(["windows"])
def test_windows_double_slash (self):
'''Test to check the path with double slash is handled correctly '''
OpenPOWER on IntegriCloud