aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-02-12 15:51:46 -0800
committerDylan Baker <dylan@pnwbakers.com>2019-04-05 15:08:17 -0700
commit569e646e1e3556fb5fdb7c4fb012a30145c7145d (patch)
tree1e42b0750bb3e0f0cce0cb1857916c0b2d7d97b6 /run_unittests.py
parent25eb86382b4b081c1d3992b9bfd9ebc4ab9b3d10 (diff)
downloadmeson-569e646e1e3556fb5fdb7c4fb012a30145c7145d.zip
meson-569e646e1e3556fb5fdb7c4fb012a30145c7145d.tar.gz
meson-569e646e1e3556fb5fdb7c4fb012a30145c7145d.tar.bz2
dependencies: Add command line option for pkg_config_path
This creates a new command line option to store pkg_config_path into, and store the environment variable into that option. Currently this works like the environment variable, for both cross and native targets.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/run_unittests.py b/run_unittests.py
index bc28eea..34307f6 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')