diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-06-18 12:58:29 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-06-18 09:57:18 +0000 |
commit | d7466066e468f9297bcad480003af882920c1159 (patch) | |
tree | d51f9eab67fdb3eeefee04dea748580e49fb2621 /run_unittests.py | |
parent | 5ef38d880f54a848474e5faa23c6a2c8377d9d61 (diff) | |
download | meson-d7466066e468f9297bcad480003af882920c1159.zip meson-d7466066e468f9297bcad480003af882920c1159.tar.gz meson-d7466066e468f9297bcad480003af882920c1159.tar.bz2 |
meson_install: Don't add DESTDIR to install_name
This was added accidentally. Includes a test for it.
Also fix a rebase error. The variable was defined incorrectly and was
overwritten with the correct value immediately afterwards.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/run_unittests.py b/run_unittests.py index 0cfb4a9..11deb13 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -89,7 +89,7 @@ def skipIfNoPkgconfig(f): Note: Yes, we provide pkg-config even while running Windows CI ''' def wrapped(*args, **kwargs): - if is_ci() and shutil.which('pkg-config') is None: + if not is_ci() and shutil.which('pkg-config') is None: raise unittest.SkipTest('pkg-config not found') return f(*args, **kwargs) return wrapped @@ -3362,7 +3362,7 @@ endian = 'little' self.prefix = oldprefix self.build() self.install(use_destdir=False) - # New builddir for the consumer + ## New builddir for the consumer self.new_builddir() os.environ['LIBRARY_PATH'] = os.path.join(installdir, self.libdir) os.environ['PKG_CONFIG_PATH'] = os.path.join(installdir, self.libdir, 'pkgconfig') @@ -3380,6 +3380,19 @@ endian = 'little' self._run([prog]) out = self._run(['otool', '-L', prog]) self.assertNotIn('@rpath', out) + ## New builddir for testing that DESTDIR is not added to install_name + self.new_builddir() + # install into installdir with DESTDIR + self.init(testdir) + self.build() + # test running after installation + self.install() + prog = self.installdir + os.path.join(self.prefix, 'bin', 'prog') + lib = self.installdir + os.path.join(self.prefix, 'lib', 'libbar_built.dylib') + for f in prog, lib: + out = self._run(['otool', '-L', f]) + # Ensure that the otool output does not contain self.installdir + self.assertNotRegex(out, self.installdir + '.*dylib ') class LinuxArmCrossCompileTests(BasePlatformTests): |