summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test cases/common/223 persubproject options/meson.build2
-rw-r--r--test cases/common/223 persubproject options/test.json7
-rw-r--r--unittests/machinefiletests.py9
3 files changed, 6 insertions, 12 deletions
diff --git a/test cases/common/223 persubproject options/meson.build b/test cases/common/223 persubproject options/meson.build
index 25a01008a..abe3bee7e 100644
--- a/test cases/common/223 persubproject options/meson.build
+++ b/test cases/common/223 persubproject options/meson.build
@@ -1,5 +1,5 @@
project('persubproject options', 'c', 'cpp',
- default_options : ['werror=true',
+ default_options : ['werror=true', 'default_library=both',
'warning_level=3',
'cpp_std=c++11'])
diff --git a/test cases/common/223 persubproject options/test.json b/test cases/common/223 persubproject options/test.json
deleted file mode 100644
index ccfa9ff5f..000000000
--- a/test cases/common/223 persubproject options/test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "matrix": {
- "options": {
- "default_library": [ { "val": "both" } ]
- }
- }
-}
diff --git a/unittests/machinefiletests.py b/unittests/machinefiletests.py
index b2839e6b2..1c65c0ceb 100644
--- a/unittests/machinefiletests.py
+++ b/unittests/machinefiletests.py
@@ -550,8 +550,8 @@ class NativeFileTests(BasePlatformTests):
# into augments.
self.assertEqual(found, 2, 'Did not find all two sections')
- def test_builtin_options_subprojects_overrides_buildfiles(self):
- # If the buildfile says subproject(... default_library: shared), ensure that's overwritten
+ def test_builtin_options_machinefile_overrides_subproject(self):
+ # The buildfile says subproject(... default_library: static), the machinefile overrides it
testcase = os.path.join(self.common_test_dir, '223 persubproject options')
config = self.helper_create_native_file({'sub2:built-in options': {'default_library': 'shared'}})
@@ -563,8 +563,9 @@ class NativeFileTests(BasePlatformTests):
check = cm.exception.stdout
self.assertIn(check, 'Parent should override default_library')
- def test_builtin_options_subprojects_dont_inherits_parent_override(self):
- # If the buildfile says subproject(... default_library: shared), ensure that's overwritten
+ def test_builtin_options_machinefile_global_loses_over_subproject(self):
+ # The buildfile says subproject(... default_library: static), ensure that it overrides the machinefile
+ # FIXME: Should it??
testcase = os.path.join(self.common_test_dir, '223 persubproject options')
config = self.helper_create_native_file({'built-in options': {'default_library': 'both'}})
self.init(testcase, extra_args=['--native-file', config])