Skip to content

Commit

Permalink
Update three tests to realpath paths that we compare to dyld paths
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jasonmolenda committed May 26, 2022
1 parent 9ee15bb commit 8ee35c5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lldb/test/API/commands/platform/sdk/TestPlatformSDK.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def test_macos_sdk(self):

# Create a fake 'SDK' directory.
test_home = os.path.join(self.getBuildDir(), 'fake_home.noindex')
test_home = os.path.realpath(test_home)
macos_version = platform.mac_ver()[0]
sdk_dir = os.path.join(test_home, 'Library', 'Developer', 'Xcode',
'macOS DeviceSupport', macos_version)
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/API/macosx/function-starts/TestFunctionStarts.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def do_function_starts(self, in_memory):
"""Run the binary, stop at our unstripped function,
make sure the caller has synthetic symbols"""

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def check_simulator_ostype(self, sdk, platform_name, arch=platform.machine()):
'ARCH': arch,
'ARCH_CFLAGS': '-target {} {}'.format(triple, version_min),
})
exe_path = self.getBuildArtifact(exe_name)
exe_path = os.path.realpath(self.getBuildArtifact(exe_name))
cmd = [
'xcrun', 'simctl', 'spawn', '-s', deviceUDID, exe_path,
'print-pid', 'sleep:10'
Expand Down

0 comments on commit 8ee35c5

Please sign in to comment.