Fix --force-fallack-for with --wrap-mode=nofallback

Fixes: #9065
pull/9073/head
Xavier Claessens 3 years ago committed by Daniel Mensinger
parent 1dcde9da61
commit 943596abbb
  1. 8
      mesonbuild/interpreter/dependencyfallbacks.py
  2. 6
      unittests/allplatformstests.py

@ -105,13 +105,13 @@ class DependencyFallbacksHolder(MesonInterpreterObject):
return None
def _do_subproject(self, kwargs: TYPE_nkwargs, func_args: TYPE_nvar, func_kwargs: TYPE_nkwargs) -> T.Optional[Dependency]:
if self.nofallback:
mlog.log('Not looking for a fallback subproject for the dependency',
mlog.bold(self.display_name), 'because:\nUse of fallback dependencies is disabled.')
return None
if self.forcefallback:
mlog.log('Looking for a fallback subproject for the dependency',
mlog.bold(self.display_name), 'because:\nUse of fallback dependencies is forced.')
elif self.nofallback:
mlog.log('Not looking for a fallback subproject for the dependency',
mlog.bold(self.display_name), 'because:\nUse of fallback dependencies is disabled.')
return None
else:
mlog.log('Looking for a fallback subproject for the dependency',
mlog.bold(self.display_name))

@ -556,6 +556,12 @@ class AllPlatformTests(BasePlatformTests):
self.build()
self.run_tests()
def test_force_fallback_for_nofallback(self):
testdir = os.path.join(self.unit_test_dir, '31 forcefallback')
self.init(testdir, extra_args=['--force-fallback-for=zlib,foo', '--wrap-mode=nofallback'])
self.build()
self.run_tests()
def test_testrepeat(self):
testdir = os.path.join(self.common_test_dir, '206 tap tests')
self.init(testdir)

Loading…
Cancel
Save