aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2020-12-15 11:21:40 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2021-01-14 18:29:28 +0000
commit5db77fd103eb7a1248791402caa3c977f6a8241c (patch)
tree0a36ad98d8c8db4f8dbae1eff9c326486f1b5d6f
parent4b3d48a8c94e28e12dc928fb343f52f3b669510d (diff)
downloadmeson-5db77fd103eb7a1248791402caa3c977f6a8241c.zip
meson-5db77fd103eb7a1248791402caa3c977f6a8241c.tar.gz
meson-5db77fd103eb7a1248791402caa3c977f6a8241c.tar.bz2
coredata: Add missing nopromote wrap_mode choice
-rw-r--r--mesonbuild/coredata.py2
-rwxr-xr-xrun_unittests.py6
2 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index f2aba80..39da863 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -1108,7 +1108,7 @@ BUILTIN_CORE_OPTIONS: 'KeyedOptionDictType' = OrderedDict([
(OptionKey('unity_size'), BuiltinOption(UserIntegerOption, 'Unity block size', (2, None, 4))),
(OptionKey('warning_level'), BuiltinOption(UserComboOption, 'Compiler warning level to use', '1', choices=['0', '1', '2', '3'], yielding=False)),
(OptionKey('werror'), BuiltinOption(UserBooleanOption, 'Treat warnings as errors', False, yielding=False)),
- (OptionKey('wrap_mode'), BuiltinOption(UserComboOption, 'Wrap mode', 'default', choices=['default', 'nofallback', 'nodownload', 'forcefallback'])),
+ (OptionKey('wrap_mode'), BuiltinOption(UserComboOption, 'Wrap mode', 'default', choices=['default', 'nofallback', 'nodownload', 'forcefallback', 'nopromote'])),
(OptionKey('force_fallback_for'), BuiltinOption(UserArrayOption, 'Force fallback for those subprojects', [])),
])
diff --git a/run_unittests.py b/run_unittests.py
index 58ebff4..e40ebc4 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -2295,6 +2295,12 @@ class AllPlatformTests(BasePlatformTests):
self.build()
self.run_tests()
+ def test_nopromote(self):
+ testdir = os.path.join(self.common_test_dir, '99 subproject subdir')
+ with self.assertRaises(subprocess.CalledProcessError) as cm:
+ self.init(testdir, extra_args=['--wrap-mode=nopromote'])
+ self.assertIn('Dependency "subsub" not found', cm.exception.stdout)
+
def test_force_fallback_for(self):
testdir = os.path.join(self.unit_test_dir, '31 forcefallback')
self.init(testdir, extra_args=['--force-fallback-for=zlib,foo'])