aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek.chauhan@gmail.com>2019-04-07 07:55:36 +0000
committerGitHub <noreply@github.com>2019-04-07 07:55:36 +0000
commitef87d11dcdcd2685e6dd5fa994e155a0801a630b (patch)
tree4bd887dd6c6b837036dda6ab90c5ebf623d3fa41 /run_unittests.py
parenta2c3ba474a5ad47539b5ecf7218db272fab8359f (diff)
parent91b2475e30d7659dad24eb35b47e4d098c716792 (diff)
downloadmeson-ef87d11dcdcd2685e6dd5fa994e155a0801a630b.zip
meson-ef87d11dcdcd2685e6dd5fa994e155a0801a630b.tar.gz
meson-ef87d11dcdcd2685e6dd5fa994e155a0801a630b.tar.bz2
Merge pull request #4931 from dcbaker/pkg-config-builtin
dependencies: Add command line option for pkg_config_path
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/run_unittests.py b/run_unittests.py
index d803e12..19426b8 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -4837,9 +4837,9 @@ endian = 'little'
testdir = os.path.join(self.unit_test_dir, '58 pkgconfig relative paths')
pkg_dir = os.path.join(testdir, 'pkgconfig')
self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'librelativepath.pc')))
- os.environ['PKG_CONFIG_PATH'] = pkg_dir
env = get_fake_env(testdir, self.builddir, self.prefix)
+ env.coredata.set_options({'pkg_config_path': pkg_dir}, '')
kwargs = {'required': True, 'silent': True}
relative_path_dep = PkgConfigDependency('librelativepath', env, kwargs)
self.assertTrue(relative_path_dep.found())
@@ -5068,6 +5068,11 @@ endian = 'little'
# Assert that
self.assertEqual(len(line.split(lib)), 2, msg=(lib, line))
+ @skipIfNoPkgconfig
+ def test_pkg_config_option(self):
+ testdir = os.path.join(self.unit_test_dir, '55 pkg_config_path option')
+ self.init(testdir, extra_args=['-Dpkg_config_path=' + os.path.join(testdir, 'extra_path')])
+
def should_run_cross_arm_tests():
return shutil.which('arm-linux-gnueabihf-gcc') and not platform.machine().lower().startswith('arm')
@@ -5164,6 +5169,11 @@ class LinuxCrossMingwTests(BasePlatformTests):
# Must run in-process or we'll get a generic CalledProcessError
self.run_tests(inprocess=True)
+ @skipIfNoPkgconfig
+ def test_cross_pkg_config_option(self):
+ testdir = os.path.join(self.unit_test_dir, '55 pkg_config_path option')
+ self.init(testdir, extra_args=['-Dcross_pkg_config_path=' + os.path.join(testdir, 'extra_path')])
+
class PythonTests(BasePlatformTests):
'''