aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorStéphane Cerveau <scerveau@collabora.com>2020-01-14 11:11:52 +0100
committerXavier Claessens <xclaesse@gmail.com>2020-01-22 15:42:13 -0500
commit958df63dac810246e84c2b8eaa32d22d19ace0ef (patch)
tree3ca9044222feb643f62dabdf061992e70c68018a /run_unittests.py
parentc5c0c467fedb909c1cfe7547abe477fdabb5526c (diff)
downloadmeson-958df63dac810246e84c2b8eaa32d22d19ace0ef.zip
meson-958df63dac810246e84c2b8eaa32d22d19ace0ef.tar.gz
meson-958df63dac810246e84c2b8eaa32d22d19ace0ef.tar.bz2
envconfig: add pkg_config_libdir property
In order to unify the use of sysroot in the cross-file, the pkg_config_libdir can now be passed directly in the file.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py30
1 files changed, 29 insertions, 1 deletions
diff --git a/run_unittests.py b/run_unittests.py
index ad3d2a3..b034773 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -3621,6 +3621,34 @@ recommended as it is not supported on some platforms''')
self.wipe()
self.init(testdir, extra_args=['-Dstart_native=true'], override_envvars=env)
+ @skipIfNoPkgconfig
+ @unittest.skipIf(is_windows(), 'Help needed with fixing this test on windows')
+ def test_pkg_config_libdir(self):
+ testdir = os.path.join(self.unit_test_dir,
+ '46 native dep pkgconfig var')
+ with tempfile.NamedTemporaryFile(mode='w', delete=False) as crossfile:
+ crossfile.write(textwrap.dedent(
+ '''[binaries]
+ pkgconfig = 'pkg-config'
+
+ [properties]
+ pkg_config_libdir = [r'{0}']
+
+ [host_machine]
+ system = 'linux'
+ cpu_family = 'arm'
+ cpu = 'armv7'
+ endian = 'little'
+ '''.format(os.path.join(testdir, 'cross_pkgconfig'))))
+ crossfile.flush()
+ self.meson_cross_file = crossfile.name
+
+ env = {'PKG_CONFIG_LIBDIR': os.path.join(testdir,
+ 'native_pkgconfig')}
+ self.init(testdir, extra_args=['-Dstart_native=false'], override_envvars=env)
+ self.wipe()
+ self.init(testdir, extra_args=['-Dstart_native=true'], override_envvars=env)
+
def __reconfigure(self, change_minor=False):
# Set an older version to force a reconfigure from scratch
filename = os.path.join(self.privatedir, 'coredata.dat')
@@ -6838,7 +6866,7 @@ class NativeFileTests(BasePlatformTests):
class CrossFileTests(BasePlatformTests):
- """Tests for cross file functioality not directly related to
+ """Tests for cross file functionality not directly related to
cross compiling.
This is mainly aimed to testing overrides from cross files.