@@ -108,7 +108,9 @@ def test_CreateTarget_platform(self):
108
108
False , error )
109
109
self .assertSuccess (error )
110
110
platform2 = target2 .GetPlatform ()
111
- self .assertEqual (platform2 .GetWorkingDirectory (), "/foo/bar" )
111
+ # On windows, the path will come back as \foo\bar. That's most likely a
112
+ # bug, but this is not related to what we're testing here.
113
+ self .assertIn (platform2 .GetWorkingDirectory (), ["/foo/bar" , r"\foo\bar" ])
112
114
113
115
# ... but create a new one if it doesn't.
114
116
self .dbg .SetSelectedPlatform (lldb .SBPlatform ("remote-windows" ))
@@ -123,9 +125,11 @@ def test_CreateTarget_arch(self):
123
125
if lldbplatformutil .getHostPlatform () == 'linux' :
124
126
self .yaml2obj ("macho.yaml" , exe )
125
127
arch = "x86_64-apple-macosx"
128
+ platform_name = "remote-macosx"
126
129
else :
127
130
self .yaml2obj ("elf.yaml" , exe )
128
131
arch = "x86_64-pc-linux"
132
+ platform_name = "remote-linux"
129
133
130
134
fbsd = lldb .SBPlatform ("remote-freebsd" )
131
135
self .dbg .SetSelectedPlatform (fbsd )
@@ -134,13 +138,15 @@ def test_CreateTarget_arch(self):
134
138
target1 = self .dbg .CreateTarget (exe , arch , None , False , error )
135
139
self .assertSuccess (error )
136
140
platform1 = target1 .GetPlatform ()
137
- self .assertEqual (platform1 .GetName (), "remote-macosx" )
141
+ self .assertEqual (platform1 .GetName (), platform_name )
138
142
platform1 .SetWorkingDirectory ("/foo/bar" )
139
143
140
144
# Reuse a platform even if it is not currently selected.
141
145
self .dbg .SetSelectedPlatform (fbsd )
142
146
target2 = self .dbg .CreateTarget (exe , arch , None , False , error )
143
147
self .assertSuccess (error )
144
148
platform2 = target2 .GetPlatform ()
145
- self .assertEqual (platform2 .GetName (), "remote-macosx" )
146
- self .assertEqual (platform2 .GetWorkingDirectory (), "/foo/bar" )
149
+ self .assertEqual (platform2 .GetName (), platform_name )
150
+ # On windows, the path will come back as \foo\bar. That's most likely a
151
+ # bug, but this is not related to what we're testing here.
152
+ self .assertIn (platform2 .GetWorkingDirectory (), ["/foo/bar" , r"\foo\bar" ])
0 commit comments