diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-11-14 16:43:00 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-11-14 21:57:12 +0200 |
commit | 1bb5c8a4fb625d5ff296d0f31fc3b3cc92580d62 (patch) | |
tree | c5b1521d43a8ab02725e5626d2e51ba330fb7b55 /run_unittests.py | |
parent | 59cacbbfc17dffe4aede1dfaa93bd5e1a3e994b2 (diff) | |
download | meson-prelink.zip meson-prelink.tar.gz meson-prelink.tar.bz2 |
Add prelinking support for static libraries.prelink
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index 7f7df36..be7a2e4 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -7456,6 +7456,22 @@ class LinuxlikeTests(BasePlatformTests): content = f.read() self.assertNotIn('-lfoo', content) + def test_prelinking(self): + testdir = os.path.join(self.unit_test_dir, '87 prelinking') + self.init(testdir) + self.build() + outlib = os.path.join(self.builddir, 'libprelinked.a') + ar = shutil.which('ar') + self.assertTrue(os.path.exists(outlib)) + self.assertTrue(ar is not None) + p = subprocess.run([ar, 't', outlib], + stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL, + universal_newlines=True, timeout=1) + obj_files = p.stdout.strip().split('\n') + self.assertEqual(len(obj_files), 1) + self.assertTrue(obj_files[0].endswith('-prelink.o')) + class BaseLinuxCrossTests(BasePlatformTests): # Don't pass --libdir when cross-compiling. We have tests that # check whether meson auto-detects it correctly. |