aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-06-16 15:23:15 -0700
committerDylan Baker <dylan@pnwbakers.com>2020-08-01 22:00:06 -0700
commit601789cc7ce3692fbefe14047d8b8cc68a3d5160 (patch)
tree16d0f0df1b28effb84519ef0145464d882e8e6e8 /run_unittests.py
parente981798e0b5ccb53cdb94a616c9bccc20f091e6b (diff)
downloadmeson-601789cc7ce3692fbefe14047d8b8cc68a3d5160.zip
meson-601789cc7ce3692fbefe14047d8b8cc68a3d5160.tar.gz
meson-601789cc7ce3692fbefe14047d8b8cc68a3d5160.tar.bz2
machine-files: deprecate the paths section
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index bce0bda..7bab408 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -8151,6 +8151,40 @@ class NativeFileTests(BasePlatformTests):
else:
self.fail('Did not find c_args in build options?')
+ def test_builtin_options_paths(self):
+ # the properties section can have lang_args, and those need to be
+ # overwritten by the built-in options
+ testcase = os.path.join(self.common_test_dir, '1 trivial')
+ config = self.helper_create_native_file({
+ 'built-in options': {'bindir': 'foo'},
+ 'paths': {'bindir': 'bar'},
+ })
+
+ self.init(testcase, extra_args=['--native-file', config])
+ configuration = self.introspect('--buildoptions')
+ for each in configuration:
+ if each['name'] == 'bindir':
+ self.assertEqual(each['value'], 'foo')
+ break
+ else:
+ self.fail('Did not find bindir in build options?')
+
+ def test_builtin_options_paths_legacy(self):
+ testcase = os.path.join(self.common_test_dir, '1 trivial')
+ config = self.helper_create_native_file({
+ 'built-in options': {'default_library': 'static'},
+ 'paths': {'bindir': 'bar'},
+ })
+
+ self.init(testcase, extra_args=['--native-file', config])
+ configuration = self.introspect('--buildoptions')
+ for each in configuration:
+ if each['name'] == 'bindir':
+ self.assertEqual(each['value'], 'bar')
+ break
+ else:
+ self.fail('Did not find bindir in build options?')
+
class CrossFileTests(BasePlatformTests):