From badbfa125ca1ceb1d159d0a336c161bf0a8a3b6f Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 1 May 2018 17:54:54 +0530 Subject: pkgconfig: Don't expose internal libraries in .pc files Libraries that have been linked with link_whole: are internal implementation details and should never be exposed to the outside world in either Libs: or Libs.private: Closes https://github.com/mesonbuild/meson/issues/3509 --- run_unittests.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'run_unittests.py') diff --git a/run_unittests.py b/run_unittests.py index fd1b576..834aadb 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -3108,11 +3108,12 @@ endian = 'little' self.init(testdir) myenv = os.environ.copy() myenv['PKG_CONFIG_PATH'] = self.privatedir - ro = subprocess.run(['pkg-config', '--libs', 'libsomething'], stdout=subprocess.PIPE, - env=myenv) - self.assertEqual(ro.returncode, 0) - self.assertIn(b'-lgobject-2.0', ro.stdout) - self.assertIn(b'-lgio-2.0', ro.stdout) + stdo = subprocess.check_output(['pkg-config', '--libs-only-l', 'libsomething'], env=myenv) + deps = [b'-lgobject-2.0', b'-lgio-2.0', b'-lglib-2.0', b'-lsomething'] + if is_windows() or is_cygwin(): + # On Windows, libintl is a separate library + deps.append(b'-lintl') + self.assertEqual(set(deps), set(stdo.split())) class LinuxArmCrossCompileTests(BasePlatformTests): ''' -- cgit v1.1