diff options
-rw-r--r-- | mesonbuild/coredata.py | 2 | ||||
-rwxr-xr-x | run_unittests.py | 6 |
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']) |