|
|
|
@ -1466,6 +1466,7 @@ class BasePlatformTests(unittest.TestCase): |
|
|
|
|
self.framework_test_dir = os.path.join(src_root, 'test cases/frameworks') |
|
|
|
|
self.unit_test_dir = os.path.join(src_root, 'test cases/unit') |
|
|
|
|
self.rewrite_test_dir = os.path.join(src_root, 'test cases/rewrite') |
|
|
|
|
self.linuxlike_test_dir = os.path.join(src_root, 'test cases/linuxlike') |
|
|
|
|
# Misc stuff |
|
|
|
|
self.orig_env = os.environ.copy() |
|
|
|
|
if self.backend is Backend.ninja: |
|
|
|
@ -5770,6 +5771,31 @@ class LinuxlikeTests(BasePlatformTests): |
|
|
|
|
self.assertIsInstance(docbook_target, dict) |
|
|
|
|
self.assertEqual(os.path.basename(t['filename'][0]), 'generated-gdbus-doc-' + os.path.basename(t['target_sources'][0]['sources'][0])) |
|
|
|
|
|
|
|
|
|
def test_introspect_installed(self): |
|
|
|
|
testdir = os.path.join(self.linuxlike_test_dir, '7 library versions') |
|
|
|
|
self.init(testdir) |
|
|
|
|
|
|
|
|
|
install = self.introspect('--installed') |
|
|
|
|
install = {os.path.basename(k): v for k, v in install.items()} |
|
|
|
|
self.assertDictEqual(install, { |
|
|
|
|
'libmodule.so': '/usr/lib/libmodule.so', |
|
|
|
|
'libnoversion.so': '/usr/lib/libnoversion.so', |
|
|
|
|
'libonlysoversion.so': '/usr/lib/libonlysoversion.so', |
|
|
|
|
'libonlysoversion.so.5': '/usr/lib/libonlysoversion.so.5', |
|
|
|
|
'libonlyversion.so': '/usr/lib/libonlyversion.so', |
|
|
|
|
'libonlyversion.so.1': '/usr/lib/libonlyversion.so.1', |
|
|
|
|
'libonlyversion.so.1.4.5': '/usr/lib/libonlyversion.so.1.4.5', |
|
|
|
|
'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', |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
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'])) |
|
|
|
|
|
|
|
|
|
def test_build_rpath(self): |
|
|
|
|
if is_cygwin(): |
|
|
|
|
raise unittest.SkipTest('Windows PE/COFF binaries do not use RPATH') |
|
|
|
|