aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2018-04-27 11:11:22 -0400
committerXavier Claessens <xavier.claessens@collabora.com>2018-04-27 11:19:12 -0400
commit6de68e520141f73088f8b8aaeb39abc59661da6d (patch)
tree87517f8129e759d41ffb4871a9688f6ba03dae90 /run_unittests.py
parent5970f1be3c5299851f4e2c7e70e3f8c9975391ab (diff)
downloadmeson-6de68e520141f73088f8b8aaeb39abc59661da6d.zip
meson-6de68e520141f73088f8b8aaeb39abc59661da6d.tar.gz
meson-6de68e520141f73088f8b8aaeb39abc59661da6d.tar.bz2
Passing --default-library=both should override project value
Looks like this has always been broken, had_argument_for() was checking if we have --default_library instead of --default-library.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 204fbfe..de383a4 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -2077,6 +2077,7 @@ recommended as it can lead to undefined behaviour on some platforms''')
# Verify default values when passing no args
self.init(testdir)
obj = mesonbuild.coredata.load(self.builddir)
+ self.assertEqual(obj.builtins['default_library'].value, 'static')
self.assertEqual(obj.builtins['warning_level'].value, '1')
self.wipe()
@@ -2110,6 +2111,15 @@ recommended as it can lead to undefined behaviour on some platforms''')
self.assertIn('passed as both', e.stderr)
self.wipe()
+ # --default-library should override default value from project()
+ self.init(testdir, extra_args=['--default-library=both'])
+ obj = mesonbuild.coredata.load(self.builddir)
+ self.assertEqual(obj.builtins['default_library'].value, 'both')
+ self.setconf('--default-library=shared')
+ obj = mesonbuild.coredata.load(self.builddir)
+ self.assertEqual(obj.builtins['default_library'].value, 'shared')
+ self.wipe()
+
class FailureTests(BasePlatformTests):
'''