aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/API/python_api
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2022-04-13 15:37:44 +0200
committerPavel Labath <pavel@labath.sk>2022-04-13 15:38:36 +0200
commit7d70b1a4058cc07e527a3b16eef000b892e29797 (patch)
treeb1475e9063237980af14bfb6ef4b86a5f523ca68 /lldb/test/API/python_api
parente2d77a160c5b8141eca3db1fca6dafd97e78288d (diff)
downloadllvm-7d70b1a4058cc07e527a3b16eef000b892e29797.zip
llvm-7d70b1a4058cc07e527a3b16eef000b892e29797.tar.gz
llvm-7d70b1a4058cc07e527a3b16eef000b892e29797.tar.bz2
[lldb] Fixup af921006d3792f for non-linux platforms
Diffstat (limited to 'lldb/test/API/python_api')
-rw-r--r--lldb/test/API/python_api/debugger/TestDebuggerAPI.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/lldb/test/API/python_api/debugger/TestDebuggerAPI.py b/lldb/test/API/python_api/debugger/TestDebuggerAPI.py
index f0ba1d1..ff1ebd9 100644
--- a/lldb/test/API/python_api/debugger/TestDebuggerAPI.py
+++ b/lldb/test/API/python_api/debugger/TestDebuggerAPI.py
@@ -108,7 +108,8 @@ class DebuggerAPITestCase(TestBase):
False, error)
self.assertSuccess(error)
platform2 = target2.GetPlatform()
- self.assertEqual(platform2.GetWorkingDirectory(), "/foo/bar")
+ self.assertTrue(platform2.GetWorkingDirectory().endswith("bar"),
+ platform2.GetWorkingDirectory())
# ... but create a new one if it doesn't.
self.dbg.SetSelectedPlatform(lldb.SBPlatform("remote-windows"))
@@ -123,9 +124,11 @@ class DebuggerAPITestCase(TestBase):
if lldbplatformutil.getHostPlatform() == 'linux':
self.yaml2obj("macho.yaml", exe)
arch = "x86_64-apple-macosx"
+ expected_platform = "remote-macosx"
else:
self.yaml2obj("elf.yaml", exe)
arch = "x86_64-pc-linux"
+ expected_platform = "remote-linux"
fbsd = lldb.SBPlatform("remote-freebsd")
self.dbg.SetSelectedPlatform(fbsd)
@@ -134,7 +137,7 @@ class DebuggerAPITestCase(TestBase):
target1 = self.dbg.CreateTarget(exe, arch, None, False, error)
self.assertSuccess(error)
platform1 = target1.GetPlatform()
- self.assertEqual(platform1.GetName(), "remote-macosx")
+ self.assertEqual(platform1.GetName(), expected_platform)
platform1.SetWorkingDirectory("/foo/bar")
# Reuse a platform even if it is not currently selected.
@@ -142,5 +145,6 @@ class DebuggerAPITestCase(TestBase):
target2 = self.dbg.CreateTarget(exe, arch, None, False, error)
self.assertSuccess(error)
platform2 = target2.GetPlatform()
- self.assertEqual(platform2.GetName(), "remote-macosx")
- self.assertEqual(platform2.GetWorkingDirectory(), "/foo/bar")
+ self.assertEqual(platform2.GetName(), expected_platform)
+ self.assertTrue(platform2.GetWorkingDirectory().endswith("bar"),
+ platform2.GetWorkingDirectory())