|
|
|
@ -1439,7 +1439,7 @@ class AllPlatformTests(BasePlatformTests): |
|
|
|
|
# Get name of static library |
|
|
|
|
targets = self.introspect('--targets') |
|
|
|
|
self.assertEqual(len(targets), 1) |
|
|
|
|
libname = targets[0]['filename'] # TODO Change filename back to a list again |
|
|
|
|
libname = targets[0]['filename'][0] |
|
|
|
|
# Build and get contents of static library |
|
|
|
|
self.build() |
|
|
|
|
before = self._run(['ar', 't', os.path.join(self.builddir, libname)]).split() |
|
|
|
@ -1496,8 +1496,8 @@ class AllPlatformTests(BasePlatformTests): |
|
|
|
|
intro = self.introspect('--targets') |
|
|
|
|
if intro[0]['type'] == 'executable': |
|
|
|
|
intro = intro[::-1] |
|
|
|
|
self.assertPathListEqual([intro[0]['install_filename']], ['/usr/lib/libstat.a']) |
|
|
|
|
self.assertPathListEqual([intro[1]['install_filename']], ['/usr/bin/prog' + exe_suffix]) |
|
|
|
|
self.assertPathListEqual(intro[0]['install_filename'], ['/usr/lib/libstat.a']) |
|
|
|
|
self.assertPathListEqual(intro[1]['install_filename'], ['/usr/bin/prog' + exe_suffix]) |
|
|
|
|
|
|
|
|
|
def test_install_introspection_multiple_outputs(self): |
|
|
|
|
''' |
|
|
|
@ -1514,14 +1514,10 @@ class AllPlatformTests(BasePlatformTests): |
|
|
|
|
intro = self.introspect('--targets') |
|
|
|
|
if intro[0]['type'] == 'executable': |
|
|
|
|
intro = intro[::-1] |
|
|
|
|
#self.assertPathListEqual(intro[0]['install_filename'], ['/usr/include/diff.h', '/usr/bin/diff.sh']) |
|
|
|
|
#self.assertPathListEqual(intro[1]['install_filename'], ['/opt/same.h', '/opt/same.sh']) |
|
|
|
|
#self.assertPathListEqual(intro[2]['install_filename'], ['/usr/include/first.h', None]) |
|
|
|
|
#self.assertPathListEqual(intro[3]['install_filename'], [None, '/usr/bin/second.sh']) |
|
|
|
|
self.assertPathListEqual([intro[0]['install_filename']], ['/usr/include/diff.h']) |
|
|
|
|
self.assertPathListEqual([intro[1]['install_filename']], ['/opt/same.h']) |
|
|
|
|
self.assertPathListEqual([intro[2]['install_filename']], ['/usr/include/first.h']) |
|
|
|
|
self.assertPathListEqual([intro[3]['install_filename']], [None]) |
|
|
|
|
self.assertPathListEqual(intro[0]['install_filename'], ['/usr/include/diff.h', '/usr/bin/diff.sh']) |
|
|
|
|
self.assertPathListEqual(intro[1]['install_filename'], ['/opt/same.h', '/opt/same.sh']) |
|
|
|
|
self.assertPathListEqual(intro[2]['install_filename'], ['/usr/include/first.h', None]) |
|
|
|
|
self.assertPathListEqual(intro[3]['install_filename'], [None, '/usr/bin/second.sh']) |
|
|
|
|
|
|
|
|
|
def test_uninstall(self): |
|
|
|
|
exename = os.path.join(self.installdir, 'usr/bin/prog' + exe_suffix) |
|
|
|
@ -2569,7 +2565,7 @@ int main(int argc, char **argv) { |
|
|
|
|
for t in t_intro: |
|
|
|
|
id = t['id'] |
|
|
|
|
tf_intro = self.introspect(['--target-files', id]) |
|
|
|
|
#tf_intro = list(map(lambda x: os.path.relpath(x, testdir), tf_intro)) TODO make paths absolute in future PR |
|
|
|
|
tf_intro = list(map(lambda x: os.path.relpath(x, testdir), tf_intro)) |
|
|
|
|
self.assertEqual(tf_intro, expected[id]) |
|
|
|
|
self.wipe() |
|
|
|
|
|
|
|
|
@ -2584,9 +2580,7 @@ int main(int argc, char **argv) { |
|
|
|
|
for t in t_intro: |
|
|
|
|
id = t['id'] |
|
|
|
|
tf_intro = self.introspect(['--target-files', id]) |
|
|
|
|
print(tf_intro) |
|
|
|
|
#tf_intro = list(map(lambda x: os.path.relpath(x, testdir), tf_intro)) TODO make paths absolute in future PR |
|
|
|
|
print(tf_intro) |
|
|
|
|
tf_intro = list(map(lambda x: os.path.relpath(x, testdir), tf_intro)) |
|
|
|
|
self.assertEqual(tf_intro, expected[id]) |
|
|
|
|
self.wipe() |
|
|
|
|
|
|
|
|
@ -3180,7 +3174,7 @@ recommended as it is not supported on some platforms''') |
|
|
|
|
('name', str), |
|
|
|
|
('id', str), |
|
|
|
|
('type', str), |
|
|
|
|
('filename', str), |
|
|
|
|
('filename', list), |
|
|
|
|
('build_by_default', bool), |
|
|
|
|
('target_sources', list), |
|
|
|
|
('installed', bool), |
|
|
|
@ -4417,7 +4411,7 @@ class LinuxlikeTests(BasePlatformTests): |
|
|
|
|
break |
|
|
|
|
self.assertIsInstance(docbook_target, dict) |
|
|
|
|
ifile = self.introspect(['--target-files', 'generated-gdbus-docbook@cus'])[0] |
|
|
|
|
self.assertListEqual([t['filename']], ['gdbus/generated-gdbus-doc-' + os.path.basename(ifile)]) |
|
|
|
|
self.assertListEqual(t['filename'], [os.path.join(self.builddir ,'gdbus/generated-gdbus-doc-' + os.path.basename(ifile))]) |
|
|
|
|
|
|
|
|
|
def test_build_rpath(self): |
|
|
|
|
if is_cygwin(): |
|
|
|
|