Fix introspection of symlink targets on macOS.
@@ -5792,7 +5792,23 @@ class LinuxlikeTests(BasePlatformTests):
install = self.introspect('--installed')
install = {os.path.basename(k): v for k, v in install.items()}
- self.assertDictEqual(install, {
+ print(install)
+ if is_osx():
+ the_truth = {
+ 'libmodule.dylib': '/usr/lib/libmodule.dylib',
+ 'libnoversion.dylib': '/usr/lib/libnoversion.dylib',
+ 'libonlysoversion.5.dylib': '/usr/lib/libonlysoversion.5.dylib',
+ 'libonlysoversion.dylib': '/usr/lib/libonlysoversion.dylib',
+ 'libonlyversion.1.dylib': '/usr/lib/libonlyversion.1.dylib',
+ 'libonlyversion.dylib': '/usr/lib/libonlyversion.dylib',
+ 'libsome.0.dylib': '/usr/lib/libsome.0.dylib',
+ 'libsome.dylib': '/usr/lib/libsome.dylib',
+ }
+ the_truth_2 = {'/usr/lib/libsome.dylib',
+ '/usr/lib/libsome.0.dylib',
+ }
+ else:
+ the_truth = {
'libmodule.so': '/usr/lib/libmodule.so',
'libnoversion.so': '/usr/lib/libnoversion.so',
'libonlysoversion.so': '/usr/lib/libonlysoversion.so',
@@ -5803,13 +5819,17 @@ class LinuxlikeTests(BasePlatformTests):
'libsome.so': '/usr/lib/libsome.so',
'libsome.so.0': '/usr/lib/libsome.so.0',
'libsome.so.1.2.3': '/usr/lib/libsome.so.1.2.3',
- })
+ }
+ the_truth_2 = {'/usr/lib/libsome.so',
+ '/usr/lib/libsome.so.0',
+ '/usr/lib/libsome.so.1.2.3'}
+ self.assertDictEqual(install, the_truth)
targets = self.introspect('--targets')
for t in targets:
if t['name'] != 'some':
continue
- self.assertSetEqual({'/usr/lib/libsome.so', '/usr/lib/libsome.so.0', '/usr/lib/libsome.so.1.2.3'}, set(t['install_filename']))
+ self.assertSetEqual(the_truth_2, set(t['install_filename']))
def test_build_rpath(self):
if is_cygwin():
