Skip to content

Commit 8ee35c5

Browse files
committed
Update three tests to realpath paths that we compare to dyld paths
I get to my work directory through a symlink, so the pathnames the tests get for their build artifacts etc are via that symlink. There are three tests which compare those symlink paths to a directory received from dyld on macOS, which is the actual real pathname. These tests have always failed for me on my dekstop but I finally sat down to figure out why. Easy quick fix.
1 parent 9ee15bb commit 8ee35c5

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Diff for: lldb/test/API/commands/platform/sdk/TestPlatformSDK.py

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def test_macos_sdk(self):
5858

5959
# Create a fake 'SDK' directory.
6060
test_home = os.path.join(self.getBuildDir(), 'fake_home.noindex')
61+
test_home = os.path.realpath(test_home)
6162
macos_version = platform.mac_ver()[0]
6263
sdk_dir = os.path.join(test_home, 'Library', 'Developer', 'Xcode',
6364
'macOS DeviceSupport', macos_version)

Diff for: lldb/test/API/macosx/function-starts/TestFunctionStarts.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def do_function_starts(self, in_memory):
3535
"""Run the binary, stop at our unstripped function,
3636
make sure the caller has synthetic symbols"""
3737

38-
exe = self.getBuildArtifact(exe_name)
38+
exe = os.path.realpath(self.getBuildArtifact(exe_name))
3939
# Now strip the binary, but leave externals so we can break on dont_strip_me.
4040
self.runBuildCommand(["strip", "-u", "-x", "-S", exe])
4141

Diff for: lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def check_simulator_ostype(self, sdk, platform_name, arch=platform.machine()):
7272
'ARCH': arch,
7373
'ARCH_CFLAGS': '-target {} {}'.format(triple, version_min),
7474
})
75-
exe_path = self.getBuildArtifact(exe_name)
75+
exe_path = os.path.realpath(self.getBuildArtifact(exe_name))
7676
cmd = [
7777
'xcrun', 'simctl', 'spawn', '-s', deviceUDID, exe_path,
7878
'print-pid', 'sleep:10'

0 commit comments

Comments
 (0)